improve macOS and Linux user guides

This commit is contained in:
josc146
2023-06-06 22:12:26 +08:00
parent 4814b88172
commit 72d601370d
4 changed files with 31 additions and 19 deletions

View File

@@ -16,6 +16,7 @@ import { Button } from '@fluentui/react-components';
import { Language, Languages, SettingsType } from '../pages/Settings';
import { ModelSourceItem } from '../pages/Models';
import { ModelConfig, ModelParameters } from '../pages/Configs';
import { BrowserOpenURL } from '../../wailsjs/runtime';
export type Cache = {
models: ModelSourceItem[]
@@ -245,20 +246,24 @@ export async function checkUpdate(notifyEvenLatest: boolean = false) {
`https://gitee.com/josc146/RWKV-Runner/releases/download/${versionTag}/${asset.name}`;
toastWithButton(t('New Version Available') + ': ' + versionTag, t('Update'), () => {
DeleteFile('cache.json');
toast(t('Downloading update, please wait. If it is not completed, please manually download the program from GitHub and replace the original program.'), {
type: 'info',
position: 'bottom-left',
autoClose: 20000
});
setTimeout(() => {
UpdateApp(updateUrl).catch((e) => {
toast(t('Update Error') + ' - ' + e.message || e, {
type: 'error',
position: 'bottom-left',
autoClose: false
});
if (commonStore.platform != 'darwin') {
toast(t('Downloading update, please wait. If it is not completed, please manually download the program from GitHub and replace the original program.'), {
type: 'info',
position: 'bottom-left',
autoClose: 20000
});
}, 500);
setTimeout(() => {
UpdateApp(updateUrl).catch((e) => {
toast(t('Update Error') + ' - ' + e.message || e, {
type: 'error',
position: 'bottom-left',
autoClose: false
});
});
}, 500);
} else {
BrowserOpenURL(updateUrl);
}
}, {
autoClose: false,
position: 'bottom-left'