MCPcopy Create free account
hub / github.com/devnomad-byte/EvolveHub / saveToStorage

Function saveToStorage

frontend/src/stores/window.ts:27–37  ·  view source on GitHub ↗
(windows: Record<string, WindowState>, activeId: string | null, maxZ: number)

Source from the content-addressed store, hash-verified

25}
26
27function saveToStorage(windows: Record<string, WindowState>, activeId: string | null, maxZ: number) {
28 try {
29 localStorage.setItem(STORAGE_KEY, JSON.stringify({
30 windows,
31 activeId,
32 maxZ
33 }))
34 } catch {
35 // ignore storage errors
36 }
37}
38
39export const useWindowStore = defineStore('window', () => {
40 // 页面加载时从 localStorage 恢复窗口状态

Callers 1

window.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected