修复识别系统默认语言

This commit is contained in:
whyour
2026-07-04 01:13:59 +08:00
parent 38d84f9f31
commit 1953022b99
5 changed files with 25 additions and 53 deletions
+8
View File
@@ -8,11 +8,13 @@ import path from 'path';
export enum EKeyv {
'apps' = 'apps',
'authInfo' = 'authInfo',
'lang' = 'lang',
}
export interface IKeyvStore {
apps: App[];
authInfo: AuthInfo;
lang: string;
}
const keyvSqlite = new KeyvSqlite(path.join(config.dbPath, 'keyv.sqlite'));
@@ -31,4 +33,10 @@ export const shareStore = {
updateApps(apps: App[]) {
return keyvStore.set<IKeyvStore['apps']>(EKeyv.apps, apps);
},
getLang() {
return keyvStore.get<IKeyvStore['lang']>(EKeyv.lang);
},
setLang(value: IKeyvStore['lang']) {
return keyvStore.set<IKeyvStore['lang']>(EKeyv.lang, value);
},
};