remote text

This commit is contained in:
josc146
2023-05-19 22:18:38 +08:00
parent 21c200d767
commit 5a0514c72d
7 changed files with 80 additions and 13 deletions

View File

@@ -1,6 +1,7 @@
import {makeAutoObservable} from 'mobx';
import {getUserLanguage, isSystemLightMode, saveConfigs, Settings} from '../utils';
import {WindowSetDarkTheme, WindowSetLightTheme} from '../../wailsjs/runtime';
import manifest from '../../../manifest.json';
export enum ModelStatus {
Offline,
@@ -88,6 +89,8 @@ class CommonStore {
darkMode: !isSystemLightMode(),
autoUpdatesCheck: true
};
introduction: { [lang: string]: string } = manifest.introduction;
about: { [lang: string]: string } = manifest.about;
getCurrentModelConfig = () => {
return this.modelConfigs[this.currentModelConfigIndex];
@@ -157,6 +160,14 @@ class CommonStore {
if (saveConfig)
saveConfigs();
};
setIntroduction = (value: { [lang: string]: string }) => {
this.introduction = value;
};
setAbout = (value: { [lang: string]: string }) => {
this.about = value;
};
}
export default new CommonStore();