Manually check for updates in 'Control Center'

This commit is contained in:
tk103331
2023-01-04 13:19:01 +08:00
parent a7cd73b314
commit 883f36b26d
4 changed files with 9 additions and 9 deletions

View File

@@ -3,8 +3,7 @@ import {Layout, Menu, Button, Tooltip, message} from 'antd';
import { SyncOutlined } from '@ant-design/icons';
import { useNavigate, useLocation } from 'react-router-dom';
import { getName, getVersion } from '@tauri-apps/api/app';
import { checkUpdate, installUpdate } from '@tauri-apps/api/updater';
import { relaunch } from '@tauri-apps/api/process';
import { invoke } from '@tauri-apps/api';
import Routes, { menuItems } from '@/routes';
import './index.scss';
@@ -24,11 +23,7 @@ const ChatLayout: FC<ChatLayoutProps> = ({ children }) => {
const go = useNavigate();
const checkAppUpdate = async () => {
try {
await checkUpdate();
}catch (e) {
console.log(e)
}
await invoke('run_check_update');
}
return (