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