diff --git a/lib/tray.js b/lib/tray.js index 183ad58..ab3d1b6 100644 --- a/lib/tray.js +++ b/lib/tray.js @@ -204,6 +204,9 @@ ipcMain.on('put-in-tray', (event) => { dialog.showMessageBoxSync({ "message": "更新完成" }) + + + mainwin.MainWindow.isClose = true; app.quit() app.relaunch(); }) @@ -212,15 +215,20 @@ ipcMain.on('put-in-tray', (event) => { simpleGit.checkIsRepo(function (err, ok) { if (ok) { simpleGit.pull(function (r, d) { + isUpdate = false; if (d.files.length > 0) { require('sync-copydir')("resources/ouxuan.oa/", "resources/app/") dialog.showMessageBoxSync({ "message": "更新完成" }) - isUpdate = false; + mainwin.MainWindow.isClose = true; app.quit() app.relaunch(); + } else { + dialog.showMessageBoxSync({ + "message": "无需更新" + }) } }) } else {