refactor: apply a bulk level in the Hub scripts editor without a filter

This commit is contained in:
AlexRV12
2026-12-03 11:28:18 +01:00
parent db3e6b6946
commit 82f299b7f4
@@ -132,11 +132,6 @@
onchange(next)
}
function setMany(names: string[], to: Level) {
const changed = names.filter((n) => level(n) !== to)
if (changed.length > 0) apply(changed, to)
}
const changes = $derived.by(() => {
const names = Array.from(new Set([...Object.keys(saved), ...Object.keys(value)]))
const count = (f: (n: string) => boolean) => names.filter(f).length
@@ -345,7 +340,7 @@
tooltip={LEVEL_TOOLTIPS[to]}
small
{item}
onActivate={() => setMany(selection, to)}
onActivate={() => apply(selection, to)}
/>
{/each}
{/snippet}