mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-10 18:02:55 +00:00
no message
This commit is contained in:
parent
6c44abded9
commit
86886ded16
14
electron/electron.js
vendored
14
electron/electron.js
vendored
@ -118,9 +118,11 @@ function createSubWindow(args) {
|
||||
})
|
||||
|
||||
browser.on('close', event => {
|
||||
utils.onBeforeUnload(event).then(() => {
|
||||
event.sender.destroy()
|
||||
})
|
||||
if (!willQuitApp) {
|
||||
utils.onBeforeUnload(event).then(() => {
|
||||
event.sender.destroy()
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
browser.on('closed', () => {
|
||||
@ -187,7 +189,7 @@ app.on('activate', () => {
|
||||
})
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
if (willQuitApp || process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
@ -439,8 +441,8 @@ ipcMain.on('updateCheckAndDownload', (event, args) => {
|
||||
*/
|
||||
ipcMain.on('updateQuitAndInstall', (event) => {
|
||||
event.returnValue = "ok"
|
||||
autoUpdater.quitAndInstall()
|
||||
app.quit()
|
||||
willQuitApp = true
|
||||
setTimeout(() => autoUpdater.quitAndInstall(), 1)
|
||||
})
|
||||
|
||||
//================================================================
|
||||
|
||||
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
251c1fcec9ce9d71
|
||||
d15abd25e49c5bc9
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<MarkdownPreview class="notification-body overlay-y" :initialValue="updateNote"/>
|
||||
<div slot="footer" class="adaption">
|
||||
<Button type="default" @click="updateShow=false">{{$L('稍后')}}</Button>
|
||||
<Button type="primary" @click="updateQuitAndInstall">{{$L($Platform === 'mac' ? '重新启动' : '立即升级')}}</Button>
|
||||
<Button type="primary" :loading="updateIng" @click="updateQuitAndInstall">{{$L($Platform === 'mac' ? '重新启动' : '立即升级')}}</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
@ -55,6 +55,7 @@ export default {
|
||||
updateVersion: '',
|
||||
updateNote: '',
|
||||
updateShow: false,
|
||||
updateIng: false,
|
||||
|
||||
downloadUrl: '',
|
||||
}
|
||||
@ -158,7 +159,10 @@ export default {
|
||||
},
|
||||
|
||||
updateQuitAndInstall() {
|
||||
this.$Electron.sendMessage('updateQuitAndInstall')
|
||||
this.updateIng = true
|
||||
setTimeout(() => {
|
||||
this.$Electron.sendMessage('updateQuitAndInstall')
|
||||
}, 301)
|
||||
},
|
||||
|
||||
useSSOLogin() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user