Browse Source

fix

tags/v1.0.0 v1.0.0
3136352472 5 years ago
parent
commit
2b43084946
  1. 10
      lib/tray.js

10
lib/tray.js

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

Loading…
Cancel
Save