Added loading animation switch

This commit is contained in:
2025-09-21 22:17:41 +08:00
parent 3cda88371e
commit 0012a5dc19
8 changed files with 36 additions and 538 deletions

View File

@@ -64,6 +64,7 @@ const GENERAL_CONFIG_KEY_MAP: GeneralConfigKeyMap = {
enableGlobalHotkey: 'general.enableGlobalHotkey',
globalHotkey: 'general.globalHotkey',
enableWindowSnap: 'general.enableWindowSnap',
enableLoadingAnimation: 'general.enableLoadingAnimation',
} as const;
const EDITING_CONFIG_KEY_MAP: EditingConfigKeyMap = {
@@ -179,6 +180,7 @@ const DEFAULT_CONFIG: AppConfig = {
key: 'X'
},
enableWindowSnap: true,
enableLoadingAnimation: true,
},
editing: {
fontSize: CONFIG_LIMITS.fontSize.default,
@@ -526,6 +528,9 @@ export const useConfigStore = defineStore('config', () => {
// 窗口吸附配置相关方法
setEnableWindowSnap: async (value: boolean) => await updateGeneralConfig('enableWindowSnap', value),
// 加载动画配置相关方法
setEnableLoadingAnimation: async (value: boolean) => await updateGeneralConfig('enableLoadingAnimation', value),
// 更新配置相关方法
setAutoUpdate: async (value: boolean) => await updateUpdatesConfig('autoUpdate', value),