From 0f0ef637dfd2e1b0ca9e11a45cf3a2321cdfac1e Mon Sep 17 00:00:00 2001 From: Mats Estensen Date: Fri, 25 Jan 2019 12:38:51 +0100 Subject: [PATCH 1/3] Add type 'info' and 'OK' button to update dialogue when current version is up to date --- ElectronClient/app/checkForUpdates.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ElectronClient/app/checkForUpdates.js b/ElectronClient/app/checkForUpdates.js index 4018bd077f3..134cefd2ef2 100644 --- a/ElectronClient/app/checkForUpdates.js +++ b/ElectronClient/app/checkForUpdates.js @@ -120,7 +120,11 @@ function checkForUpdates(inBackground, window, logFilePath, options) { autoUpdateLogger_.info('Is Pre-release:', release.prerelease); if (compareVersions(release.version, packageInfo.version) <= 0) { - if (!checkInBackground_) dialog.showMessageBox({ message: _('Current version is up-to-date.') }) + if (!checkInBackground_) dialog.showMessageBox({ + type: 'info', + message: _('Current version is up-to-date.'), + buttons: [_('OK')], + }) } else { const releaseNotes = release.notes.trim() ? "\n\n" + release.notes.trim() : ''; const newVersionString = release.prerelease ? _('%s (pre-release)', release.version) : release.version; @@ -141,4 +145,4 @@ function checkForUpdates(inBackground, window, logFilePath, options) { }); } -module.exports.checkForUpdates = checkForUpdates \ No newline at end of file +module.exports.checkForUpdates = checkForUpdates From ff2a55851203a484484b04e61de8ed2af1bfe343 Mon Sep 17 00:00:00 2001 From: Mats Estensen Date: Fri, 25 Jan 2019 12:42:11 +0100 Subject: [PATCH 2/3] remove whitespace and fix space to tabs --- ElectronClient/app/checkForUpdates.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ElectronClient/app/checkForUpdates.js b/ElectronClient/app/checkForUpdates.js index 134cefd2ef2..af884838aa7 100644 --- a/ElectronClient/app/checkForUpdates.js +++ b/ElectronClient/app/checkForUpdates.js @@ -120,10 +120,10 @@ function checkForUpdates(inBackground, window, logFilePath, options) { autoUpdateLogger_.info('Is Pre-release:', release.prerelease); if (compareVersions(release.version, packageInfo.version) <= 0) { - if (!checkInBackground_) dialog.showMessageBox({ - type: 'info', - message: _('Current version is up-to-date.'), - buttons: [_('OK')], + if (!checkInBackground_) dialog.showMessageBox({ + type: 'info', + message: _('Current version is up-to-date.'), + buttons: [_('OK')], }) } else { const releaseNotes = release.notes.trim() ? "\n\n" + release.notes.trim() : ''; From 9a16a63635b82bf03dd09da280647fede37ec37c Mon Sep 17 00:00:00 2001 From: Mats Estensen Date: Fri, 25 Jan 2019 13:06:01 +0100 Subject: [PATCH 3/3] remove created newline at end of file --- ElectronClient/app/checkForUpdates.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElectronClient/app/checkForUpdates.js b/ElectronClient/app/checkForUpdates.js index af884838aa7..9730c5503a4 100644 --- a/ElectronClient/app/checkForUpdates.js +++ b/ElectronClient/app/checkForUpdates.js @@ -145,4 +145,4 @@ function checkForUpdates(inBackground, window, logFilePath, options) { }); } -module.exports.checkForUpdates = checkForUpdates +module.exports.checkForUpdates = checkForUpdates \ No newline at end of file