优化目录

This commit is contained in:
zwgczx committed 2026-03-17 12:05:22 +08:00
1 parent 4e343cccf1
commit 2b18fe9991
46 files changed
+1061 -1308

No files matched your search

+8 -8
View File
@@ -1,6 +1,5 @@
export type WorkspaceMode = 'home' | 'project' | 'quick'
export const HOME_TAB_ID = 'HomeView'
export const PROJECT_TAB_ID = 'ProjectCalcView'
export const QUICK_TAB_ID = 'QuickCalcView'
export const LEGACY_PROJECT_TAB_ID = 'XmView'
@@ -37,16 +36,17 @@ export const readWorkspaceMode = (): WorkspaceMode => {
}
}
export const writeWorkspaceMode = (mode: WorkspaceMode) => {
try {
window.localStorage.setItem(WORKSPACE_MODE_STORAGE_KEY, normalizeWorkspaceMode(mode))
} catch {
// 忽略只读或隐私模式下的写入失败。
}
}
export const createDefaultQuickContractMeta = (): QuickContractMeta => ({
id: QUICK_CONTRACT_ID,
name: QUICK_CONTRACT_FALLBACK_NAME,
updatedAt: new Date().toISOString()
})
export const writeWorkspaceMode = (mode: WorkspaceMode) => {
try {
window.localStorage.setItem(WORKSPACE_MODE_STORAGE_KEY, normalizeWorkspaceMode(mode))
} catch {
// 忽略只读或隐私模式下的写入失败。
}
}