GetPlatform
This commit is contained in:
parent
da033ab096
commit
deb9e030cb
@ -1,5 +1,5 @@
|
|||||||
import commonStore from './stores/commonStore';
|
import commonStore from './stores/commonStore';
|
||||||
import { ReadJson } from '../wailsjs/go/backend_golang/App';
|
import { GetPlatform, ReadJson } from '../wailsjs/go/backend_golang/App';
|
||||||
import { Cache, checkUpdate, downloadProgramFiles, LocalConfig, refreshModels, saveCache } from './utils';
|
import { Cache, checkUpdate, downloadProgramFiles, LocalConfig, refreshModels, saveCache } from './utils';
|
||||||
import { getStatus } from './apis';
|
import { getStatus } from './apis';
|
||||||
import { EventsOn } from '../wailsjs/runtime';
|
import { EventsOn } from '../wailsjs/runtime';
|
||||||
@ -15,6 +15,7 @@ export async function startup() {
|
|||||||
|
|
||||||
initCache().then(initRemoteText);
|
initCache().then(initRemoteText);
|
||||||
|
|
||||||
|
await GetPlatform().then(commonStore.setPlatform);
|
||||||
await initConfig();
|
await initConfig();
|
||||||
|
|
||||||
if (commonStore.settings.autoUpdatesCheck) // depends on config settings
|
if (commonStore.settings.autoUpdatesCheck) // depends on config settings
|
||||||
|
@ -33,6 +33,7 @@ class CommonStore {
|
|||||||
device_name: 'CPU'
|
device_name: 'CPU'
|
||||||
};
|
};
|
||||||
depComplete: boolean = false;
|
depComplete: boolean = false;
|
||||||
|
platform: string = 'windows';
|
||||||
// home
|
// home
|
||||||
introduction: IntroductionContent = manifest.introduction;
|
introduction: IntroductionContent = manifest.introduction;
|
||||||
// chat
|
// chat
|
||||||
@ -168,6 +169,10 @@ class CommonStore {
|
|||||||
setCompletionGenerating(value: boolean) {
|
setCompletionGenerating(value: boolean) {
|
||||||
this.completionGenerating = value;
|
this.completionGenerating = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setPlatform(value: string) {
|
||||||
|
this.platform = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new CommonStore();
|
export default new CommonStore();
|
Loading…
Reference in New Issue
Block a user