fix(storage): setItem 同内容跳过;lastUsed 移出分板文件;库/data.json 按变化写
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 52s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 52s
This commit is contained in:
1 parent
a3b85be79c
commit
16f33128da
1 file changed
+1
-1
@@ -3273,7 +3273,7 @@ try { if (window.IWBMiniMapFit && typeof window.IWBMiniMapFit.install === 'funct
|
||||
try { stripBigDataUrlsSync({ workspaces: list }, true) } catch (e) { /* 尽力而为 */ }
|
||||
for (const w of list) {
|
||||
if (!w || !w.id) continue
|
||||
const rec = { id: w.id, name: w.name || '未命名画布', nodes: w.nodes || [], edges: w.edges || [], groups: w.groups || [], category: w.category || '', starred: !!w.starred, deleted: !!w.deleted, lastUsed: typeof w.lastUsed === 'number' ? w.lastUsed : 0 }
|
||||
const rec = { id: w.id, name: w.name || '未命名画布', nodes: w.nodes || [], edges: w.edges || [], groups: w.groups || [], category: w.category || '', starred: !!w.starred, deleted: !!w.deleted } // 2026-12-04:lastUsed 只进索引,避免每次保存都重写画布文件
|
||||
// 兜底精简:所有 localStorage 写盘必经此处,漏了就会把 result 里的 job/snapshot 落盘(体积翻十倍)
|
||||
if (GenerationResults) rec.nodes = rec.nodes.map(GenerationResults.slimNode)
|
||||
const sig = wsBoardSig(rec)
|
||||
|
||||
Reference in new issue
Block a user