Skip to content

Commit

Permalink
v1.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
doviettung96 committed Jun 26, 2017
1 parent 5a8f8f2 commit 236775a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
17 changes: 14 additions & 3 deletions autoupdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,43 @@ autoUpdater.on('error', (event, error) => {
autoUpdater.on('update-available', () => {
dialog.showMessageBox({
type: 'info',
title: 'Found Updates',
title: 'Found updates',
message: 'Found updates, do you want update now?',
buttons: ['Sure', 'No']
}, (buttonIndex) => {
if (buttonIndex === 0) {
autoUpdater.downloadUpdate()
dialog.showMessageBox({
title: 'Downloading',
message: 'The update is being downloaded. Please wait.'
})
}
})
})

autoUpdater.on('update-not-available', () => {
dialog.showMessageBox({
title: 'No Updates',
title: 'No updates',
message: 'Current version is up-to-date.'
})
})

autoUpdater.on('update-downloaded', () => {
dialog.showMessageBox({
title: 'Install Updates',
title: 'Install updates',
message: 'Updates downloaded, application will be quit for update...'
}, () => {
autoUpdater.quitAndInstall()
})
})

autoUpdater.on('checking-for-update', () => {
dialog.showMessageBox({
title: 'Check for updates',
message: 'The app is checking for updates. Wait for a second'
})
})

// export this to MenuItem click callback
function checkForUpdates () {
autoUpdater.checkForUpdates()
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ let createWindow = function () {
mainWindow.focus();

// Open the DevTools.
mainWindow.webContents.openDevTools();
mainWindow.webContents.openDevTools();

// Emitted when the window is closed.
mainWindow.on("closed", function () {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Node-Express-EJS-Mysql",
"version": "1.0.15",
"version": "1.0.16",
"description": "A simple app with Node-Express-EJS-Mysql",
"main": "main.js",
"scripts": {
Expand Down

0 comments on commit 236775a

Please sign in to comment.