Skip to content

Commit

Permalink
v 1.0.5
Browse files Browse the repository at this point in the history
- Fixed updater bug
  • Loading branch information
kaiserdj committed Jan 15, 2021
1 parent af106ca commit 68d3a77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "darkorbit-client",
"version": "1.0.4",
"version": "1.0.5",
"description": "Open source darkorbit client",
"main": "index.js",
"repository": {
Expand Down
13 changes: 4 additions & 9 deletions update.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ autoUpdater.on('error', (error) => {
dialog.showErrorBox('Error: ', error == null ? "unknown" : (error.stack || error).toString())
})

autoUpdater.on('update-available', async () => {
autoUpdater.on('update-available', async (data) => {
let check = await dialog.showMessageBoxSync({
type: 'info',
title: 'Updates found',
title: `Updates found: ${data.version}`,
message: 'Updates found, do you want to update now?',
detail: data.releaseNotes.replace(/<a.*>.*?<\/a>/ig,'').replace(/<p>/ig,'').replace(/<\/p>/ig,'').replace(/<br \/>/ig,''),
buttons: ['Yes', 'No']
})

Expand All @@ -31,13 +32,7 @@ autoUpdater.on('update-available', async () => {
indeterminate: false,
title: 'Update in progress',
text: 'Preparing to download updates.',
detail: 'Downloading ...',
browserWindow: {
icon: `${__dirname}/assets/icon.ico`,
webPreferences: {
nodeIntegration: true
}
}
detail: 'Downloading ...'
})

progressBar.on('completed', function() {
Expand Down

0 comments on commit 68d3a77

Please sign in to comment.