mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-06-29 08:34:51 +00:00
Upload code
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import {useAppStore} from '/@/store/modules/app';
|
||||
import {repositoryValueMap} from '/@/settings/repositorySeeing';
|
||||
|
||||
export async function initAppConfigStore() {
|
||||
const appStore = useAppStore();
|
||||
const config = await window.__electron_preload__getAlasConfig();
|
||||
appStore.setTheme(config?.theme ?? 'light');
|
||||
appStore.setLanguage(config?.language ?? 'zh-CN');
|
||||
appStore.setRepository(
|
||||
(repositoryValueMap[config?.repository] as 'global' | 'china') ?? 'global',
|
||||
);
|
||||
appStore.setWebuiUrl(config?.webuiUrl ?? '127.0.0.1:22367');
|
||||
appStore.setAlasPath(config?.alasPath ?? '');
|
||||
}
|
||||
Reference in New Issue
Block a user