断网后再次打开升级弹窗
This commit is contained in:
parent
e0ac4b2223
commit
7f9e62027a
4
main.js
4
main.js
|
|
@ -160,6 +160,10 @@ app.on('ready', () => {
|
|||
startNumber++
|
||||
}
|
||||
});
|
||||
// 更新
|
||||
ipcMain.handle('updateHandle', () => {
|
||||
updateHandle()
|
||||
});
|
||||
// socket
|
||||
ipcMain.handle('startSignalr', (event, user) => {
|
||||
startSignalr(user)
|
||||
|
|
|
|||
|
|
@ -91,6 +91,10 @@ window.electron = {
|
|||
setEnv: (str) => {
|
||||
ipcRenderer.invoke('setEnv', str)
|
||||
},
|
||||
// 更新
|
||||
updateHandle: () => {
|
||||
ipcRenderer.invoke('updateHandle')
|
||||
},
|
||||
// 通知下载最新的包
|
||||
onDownload: (type) => {
|
||||
ipcRenderer.invoke('updateDownload', type)
|
||||
|
|
|
|||
|
|
@ -260,6 +260,12 @@ const App: React.FC = () => {
|
|||
storage.removeItem('user')
|
||||
navigate('/login')
|
||||
}
|
||||
} else if (e.key === 'reconnect') {
|
||||
if (e.value == true) {
|
||||
if (location.hash.indexOf('/meeting') === -1) {
|
||||
window.electron.updateHandle()
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ export interface IElectronAPI {
|
|||
quitAndInstall: (callBack: Function) => void;
|
||||
isOpenWindows: (callBack: Function) => void;
|
||||
setEnv: (str: string) => any;
|
||||
updateHandle: () => any;
|
||||
getVersion: () => Promise<string>;
|
||||
isVisible: () => Promise<string>;
|
||||
setRegistry: (uuid: string) => any;
|
||||
|
|
|
|||
Loading…
Reference in New Issue