This commit is contained in:
josc146 2023-05-29 20:37:00 +08:00
parent 142e30622e
commit 0fc429f5a3
2 changed files with 12 additions and 8 deletions

View File

@ -4,6 +4,7 @@ import { Cache, checkUpdate, downloadProgramFiles, LocalConfig, refreshModels, s
import { getStatus } from './apis'; import { getStatus } from './apis';
import { EventsOn } from '../wailsjs/runtime'; import { EventsOn } from '../wailsjs/runtime';
import { defaultModelConfigs } from './pages/Configs'; import { defaultModelConfigs } from './pages/Configs';
import manifest from '../../manifest.json';
export async function startup() { export async function startup() {
downloadProgramFiles(); downloadProgramFiles();
@ -28,11 +29,14 @@ export async function startup() {
async function initRemoteText() { async function initRemoteText() {
await fetch('https://cdn.jsdelivr.net/gh/josstorer/RWKV-Runner@master/manifest.json', { cache: 'no-cache' }) await fetch('https://cdn.jsdelivr.net/gh/josstorer/RWKV-Runner@master/manifest.json', { cache: 'no-cache' })
.then(r => r.json()).then((data) => { .then(r => r.json()).then((data) => {
if (data.version > manifest.version) {
if (data.introduction) if (data.introduction)
commonStore.setIntroduction(data.introduction); commonStore.setIntroduction(data.introduction);
if (data.about) if (data.about)
commonStore.setAbout(data.about); commonStore.setAbout(data.about);
}).then(saveCache); saveCache();
}
});
} }
async function initConfig() { async function initConfig() {

View File

@ -23,9 +23,9 @@ var cyacInfo embed.FS
var py embed.FS var py embed.FS
func main() { func main() {
go backend.CopyEmbed(cyac) backend.CopyEmbed(cyac)
go backend.CopyEmbed(cyacInfo) backend.CopyEmbed(cyacInfo)
go backend.CopyEmbed(py) backend.CopyEmbed(py)
// Create an instance of the app structure // Create an instance of the app structure
app := backend.NewApp() app := backend.NewApp()