summaryrefslogtreecommitdiff
path: root/web/src/lib/ui/NoteRow.svelte
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2026-11-23 13:43:23 +0100
committerJoel Klinghed <the_jk@spawned.biz>2026-11-23 13:43:23 +0100
commitb3ca050156f10aae285d2f7bfb873d9fa43bf3f4 (patch)
tree02e8ce305f2a7b2038f778c52a6b9fe967d00237 /web/src/lib/ui/NoteRow.svelte
parent93970f361b831f17d48ff2a345fc78488ac71fba (diff)
web: fix state_referenced_locally warnings
Read the session's stores through $derived instead of top-level consts, so the session prop is read reactively and the existing store-rune references keep their reactivity; make the card width/height constants derived from the scale prop; seed the transient edit buffers (note/figure note, rename fields) from props once on mount with an explicit svelte-ignore, since the menu is remounted when opened and a later prop change must not clobber an in-progress edit. Also fixes a latent bug in LootEnhancementCounter where the buttons tested !player (the store object, always truthy) instead of !$player, so the enhancement buttons were never disabled for spectators.
Diffstat (limited to 'web/src/lib/ui/NoteRow.svelte')
-rw-r--r--web/src/lib/ui/NoteRow.svelte2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/src/lib/ui/NoteRow.svelte b/web/src/lib/ui/NoteRow.svelte
index f237c13..0147d32 100644
--- a/web/src/lib/ui/NoteRow.svelte
+++ b/web/src/lib/ui/NoteRow.svelte
@@ -23,7 +23,7 @@
onEdit: (item: NoteRowItem) => void;
} = $props();
- const gameState = session.state;
+ const gameState = $derived(session.state);
// Base tones for monster targets, which have no per-figure colour.
const ENEMY_BASE = 0x8e2a2a;