fix(state): preserve readonly runes and remove inert export flag

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
leefer
2026-10-22 02:57:22 +08:00
co-authored by multica-agent
parent 88965fa70d
commit 99574c2226
3 changed files with 3 additions and 4 deletions
@@ -254,7 +254,7 @@
// Bay (挑选台) state — mode, deep links, open/collapse
// ------------------------------------------------------------------
type TaskMode = WorkflowUsage | 'all';
let mode = $state<TaskMode>(untrack(initMode));
const mode = $state<TaskMode>(untrack(initMode));
function initMode(): TaskMode {
const q = page.url.searchParams.get('mode');
return q && USAGE_BY_KIND[kind].includes(q as WorkflowUsage)
@@ -12,7 +12,6 @@
let { onExportVideo }: { onExportVideo?: () => void } = $props();
let trackEl: HTMLDivElement | null = null;
let exporting = $state(false);
let draggingKeyframeId: string | null = null;
const duration = $derived(shotStore.playback.duration);
@@ -176,7 +175,7 @@
<button
class="export"
onclick={onExportVideo}
disabled={exporting || !canExport}
disabled={!canExport}
title={canExport ? t('shot.exportTitle') : exportDisabledReason}
>
{t('shot.exportVideo')}
@@ -153,7 +153,7 @@
// ---- graph sync ----------------------------------------------------------
let syncVersion = $state(0);
const syncVersion = $state(0);
// While a drag is active the persisted-graph effect must NOT rebuild: any
// SSE-driven refetch (job.started, canvas.updated from another tab, …)
// would replace `nodes` with stale DB positions mid-drag and snap the