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 { 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.introduction)
|
if (data.version > manifest.version) {
|
||||||
commonStore.setIntroduction(data.introduction);
|
if (data.introduction)
|
||||||
if (data.about)
|
commonStore.setIntroduction(data.introduction);
|
||||||
commonStore.setAbout(data.about);
|
if (data.about)
|
||||||
}).then(saveCache);
|
commonStore.setAbout(data.about);
|
||||||
|
saveCache();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function initConfig() {
|
async function initConfig() {
|
||||||
|
6
main.go
6
main.go
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user