Desktop: Add type 'info' and 'OK' button to update dialog when version up-to-date (#1148)

* Add type 'info' and 'OK' button to update dialogue when current version is up to date

* remove whitespace and fix space to tabs

* remove created newline at end of file
pull/1257/head
Mats Estensen 2019-02-24 11:54:50 +01:00 committed by Laurent Cozic
parent b40ccc7a15
commit 1e0c4cc5cd
1 changed files with 5 additions and 1 deletions

View File

@ -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;