From 9a04c1293b049e48f5e2fb789aea4a9134656199 Mon Sep 17 00:00:00 2001 From: Mohammad Rajabifard Date: Tue, 17 Apr 2018 18:53:59 +0430 Subject: [PATCH] Show correct update channel in the about dialog --- main/menu.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/main/menu.js b/main/menu.js index c85a828..29533a7 100644 --- a/main/menu.js +++ b/main/menu.js @@ -22,10 +22,10 @@ const logout = require('./utils/logout') const appName = app.getName() const appVersion = app.getVersion() -const showAboutDialog = () => { +const showAboutDialog = updateChannel => { dialog.showMessageBox({ title: `About ${appName}`, - message: `${appName} ${appVersion} (stable)`, + message: `${appName} ${appVersion} (${updateChannel})`, detail: `Created by Mo\nCopyright © 2018 Mohammad Rajabifard.`, buttons: [], }) @@ -33,7 +33,8 @@ const showAboutDialog = () => { exports.innerMenu = function(app, tray, windows) { const user = getUser() - const isCanary = getUpdateChannel() === 'canary' + const updateChannel = getUpdateChannel() + const isCanary = updateChannel === 'canary' const displayFormat12Hour = getDisplayFormat() === '12h' const { openAtLogin } = app.getLoginItemSettings() @@ -41,7 +42,7 @@ exports.innerMenu = function(app, tray, windows) { { label: is.macos ? `About ${appName}` : 'About', click() { - showAboutDialog() + showAboutDialog(updateChannel) }, }, { @@ -136,11 +137,13 @@ exports.innerMenu = function(app, tray, windows) { } exports.outerMenu = function(app, tray, windows) { + const updateChannel = updateChannel + return buildFromTemplate([ { label: is.macos ? `About ${appName}` : 'About', click() { - showAboutDialog() + showAboutDialog(updateChannel) }, }, {