chore
This commit is contained in:
parent
142e30622e
commit
0fc429f5a3
@ -4,6 +4,7 @@ import { Cache, checkUpdate, downloadProgramFiles, LocalConfig, refreshModels, s
|
||||
import { getStatus } from './apis';
|
||||
import { EventsOn } from '../wailsjs/runtime';
|
||||
import { defaultModelConfigs } from './pages/Configs';
|
||||
import manifest from '../../manifest.json';
|
||||
|
||||
export async function startup() {
|
||||
downloadProgramFiles();
|
||||
@ -28,11 +29,14 @@ export async function startup() {
|
||||
async function initRemoteText() {
|
||||
await fetch('https://cdn.jsdelivr.net/gh/josstorer/RWKV-Runner@master/manifest.json', { cache: 'no-cache' })
|
||||
.then(r => r.json()).then((data) => {
|
||||
if (data.introduction)
|
||||
commonStore.setIntroduction(data.introduction);
|
||||
if (data.about)
|
||||
commonStore.setAbout(data.about);
|
||||
}).then(saveCache);
|
||||
if (data.version > manifest.version) {
|
||||
if (data.introduction)
|
||||
commonStore.setIntroduction(data.introduction);
|
||||
if (data.about)
|
||||
commonStore.setAbout(data.about);
|
||||
saveCache();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function initConfig() {
|
||||
|
6
main.go
6
main.go
@ -23,9 +23,9 @@ var cyacInfo embed.FS
|
||||
var py embed.FS
|
||||
|
||||
func main() {
|
||||
go backend.CopyEmbed(cyac)
|
||||
go backend.CopyEmbed(cyacInfo)
|
||||
go backend.CopyEmbed(py)
|
||||
backend.CopyEmbed(cyac)
|
||||
backend.CopyEmbed(cyacInfo)
|
||||
backend.CopyEmbed(py)
|
||||
|
||||
// Create an instance of the app structure
|
||||
app := backend.NewApp()
|
||||
|
Loading…
Reference in New Issue
Block a user