Skip to content

Commit

Permalink
Show correct update channel in the about dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
morajabi committed Apr 17, 2018
1 parent 14ea665 commit 9a04c12
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions main/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,27 @@ 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: [],
})
}

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()

return buildFromTemplate([
{
label: is.macos ? `About ${appName}` : 'About',
click() {
showAboutDialog()
showAboutDialog(updateChannel)
},
},
{
Expand Down Expand Up @@ -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)
},
},
{
Expand Down

0 comments on commit 9a04c12

Please sign in to comment.