diff --git a/src/config/layouts.ts b/src/config/layouts.ts index 8d95cdf..8728431 100644 --- a/src/config/layouts.ts +++ b/src/config/layouts.ts @@ -1,6 +1,6 @@ import { getConfigLayout } from "@/utils/cache/local-storage" -/** 项目配置 */ +/** 项目配置类型 */ export interface LayoutSettings { /** 是否显示 Settings Panel */ showSettings: boolean @@ -28,7 +28,8 @@ export interface LayoutSettings { showColorWeakness: boolean } -export const layoutSettings: LayoutSettings = getConfigLayout() ?? { +/** 默认配置 */ +const defaultSettings: LayoutSettings = { layoutMode: "left", showSettings: true, showTagsView: true, @@ -42,3 +43,6 @@ export const layoutSettings: LayoutSettings = getConfigLayout() ?? { showGreyMode: false, showColorWeakness: false } + +/** 项目配置 */ +export const layoutSettings: LayoutSettings = { ...defaultSettings, ...getConfigLayout() }