Skip to content

Commit

Permalink
actually fix the update checking
Browse files Browse the repository at this point in the history
  • Loading branch information
night committed Dec 31, 2022
1 parent 21a7fc3 commit 55b6621
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,16 @@ class Pussh {
if (error || !response || response.statusCode !== 200 || !body.version) return;

if (this.version !== body.version) {
const msg = 'puSSH has an update available. Click "OK" to open the puSSH download page.';
if (!confirm(msg)) return;
this.openInBrowser('https://pussh.me/');
dialog.showMessageBox({
type: 'question',
buttons: ['Maybe later', 'OK'],
title: 'Update available',
message: 'puSSH has an update available. Click "OK" to open the puSSH download page.'
}).then(({response: buttonClicked}) => {
if (buttonClicked === 1) {
this.openInBrowser('https://pussh.me/');
}
});
}
});
}
Expand Down

0 comments on commit 55b6621

Please sign in to comment.