Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show update channel in About window #2102

Merged
merged 2 commits into from
Aug 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions app/menus/menu.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Packages
const {app, dialog} = require('electron');

const {getKeymaps} = require('../config');
// Utilities
const {getKeymaps, getConfig} = require('../config');
const {icon} = require('../config/paths');

// menus
const viewMenu = require('./menus/view');
const shellMenu = require('./menus/shell');
const editMenu = require('./menus/edit');
Expand All @@ -16,15 +16,20 @@ const appName = app.getName();
const appVersion = app.getVersion();

module.exports = (createWindow, updatePlugins, getLoadedPluginVersions) => {
const commands = getKeymaps().commands;
const config = getConfig();
const {commands} = getKeymaps();

const updateChannel = config.canaryUpdates ? 'canary' : 'stable';

const showAbout = () => {
const loadedPlugins = getLoadedPluginVersions();
const pluginList = loadedPlugins.length === 0 ?
'none' :
loadedPlugins.map(plugin => `\n ${plugin.name} (${plugin.version})`);

dialog.showMessageBox({
title: `About ${appName}`,
message: `${appName} ${appVersion}`,
message: `${appName} ${appVersion} (${updateChannel})`,
detail: `Plugins: ${pluginList}\n\nCreated by Guillermo Rauch\nCopyright © 2017 Zeit, Inc.`,
buttons: [],
icon
Expand Down