code format

This commit is contained in:
josc146
2023-05-22 10:52:06 +08:00
parent 035c6ab8de
commit bbad153ecb
28 changed files with 429 additions and 429 deletions

View File

@@ -19,32 +19,22 @@ export enum ModelStatus {
}
class CommonStore {
constructor() {
makeAutoObservable(this);
}
// global
modelStatus: ModelStatus = ModelStatus.Offline;
depComplete: boolean = false;
// home
introduction: IntroductionContent = manifest.introduction;
// chat
conversations: Conversations = {};
conversationsOrder: string[] = [];
// configs
currentModelConfigIndex: number = 0;
modelConfigs: ModelConfig[] = [];
// models
modelSourceManifestList: string = 'https://cdn.jsdelivr.net/gh/josstorer/RWKV-Runner/manifest.json;';
modelSourceList: ModelSourceItem[] = [];
// downloads
downloadList: DownloadStatus[] = [];
// settings
settings: SettingsType = {
language: getUserLanguage(),
@@ -53,10 +43,13 @@ class CommonStore {
giteeUpdatesSource: getUserLanguage() === 'zh',
cnMirror: getUserLanguage() === 'zh'
};
// about
about: AboutContent = manifest.about;
constructor() {
makeAutoObservable(this);
}
getCurrentModelConfig = () => {
return this.modelConfigs[this.currentModelConfigIndex];
};