Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Improve autoUpdater dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Nov 10, 2017
1 parent ccbfebf commit 5b8de7b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
13 changes: 5 additions & 8 deletions app/src/autoUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,16 @@ export default (app, win) => {
}, 24 * 60 * 60 * 1000);

autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName, releaseDate, updateUrl, quitAndUpdate) => {
const index = dialog.showMessageBox(win, {
const buttonPressedIndex = dialog.showMessageBox(win, {
type: 'info',
buttons: [i18n.t('Restart'), i18n.t('Later')],
title: i18n.t('Lisk Nano'),
message: i18n.t('The new version has been downloaded. Please restart the application to apply the updates.'),
detail: `${releaseName}\n\n${releaseNotes}`,
title: i18n.t('New version of Lisk Nano available'),
message: i18n.t('Version {{version}} has been downloaded. Please restart the application to apply the updates.', { version: '1.3.1' }),
});

if (index === 1) {
return;
if (buttonPressedIndex === 0) {
quitAndUpdate();
}

quitAndUpdate();
});

autoUpdater.on('error', (message) => {
Expand Down
3 changes: 2 additions & 1 deletion i18n/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"Multisignature Creation": "Multisignature Creation",
"Name": "Name",
"New Account": "New Account",
"New version of Lisk Nano available": "New version of Lisk Nano available",
"Next": "Next",
"No delegates found": "No delegates found",
"No matches": "No matches",
Expand Down Expand Up @@ -147,7 +148,6 @@
"Success": "Success",
"Testnet": "Testnet",
"The URL was invalid": "The URL was invalid",
"The new version has been downloaded. Please restart the application to apply the updates.": "The new version has been downloaded. Please restart the application to apply the updates.",
"There are no transactions, yet.": "There are no transactions, yet.",
"This account is protected by a second passphrase": "This account is protected by a second passphrase",
"This passphrase is not recoverable and if you lose it, you will lose access to your account forever.": "This passphrase is not recoverable and if you lose it, you will lose access to your account forever.",
Expand All @@ -169,6 +169,7 @@
"Username": "Username",
"Verify message": "Verify message",
"Version": "Version",
"Version {{version}} has been downloaded. Please restart the application to apply the updates.": "Version {{version}} has been downloaded. Please restart the application to apply the updates.",
"View": "View",
"Vote": "Vote",
"Vote for delegates": "Vote for delegates",
Expand Down

0 comments on commit 5b8de7b

Please sign in to comment.