introduction and about cache
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import commonStore from './stores/commonStore';
|
||||
import {ReadJson} from '../wailsjs/go/backend_golang/App';
|
||||
import {checkUpdate, downloadProgramFiles, LocalConfig, refreshModels} from './utils';
|
||||
import {Cache, checkUpdate, downloadProgramFiles, LocalConfig, refreshModels} from './utils';
|
||||
import {getStatus} from './apis';
|
||||
import {EventsOn} from '../wailsjs/runtime';
|
||||
import {defaultModelConfigs} from './pages/Configs';
|
||||
@@ -56,5 +56,12 @@ async function initConfig() {
|
||||
}
|
||||
|
||||
async function initCache() {
|
||||
await ReadJson('cache.json').then((cacheData: Cache) => {
|
||||
if (cacheData.introduction)
|
||||
commonStore.setIntroduction(cacheData.introduction);
|
||||
if (cacheData.about)
|
||||
commonStore.setAbout(cacheData.about);
|
||||
}).catch(() => {
|
||||
});
|
||||
await refreshModels(false);
|
||||
}
|
||||
Reference in New Issue
Block a user