From a21b7706cd9a12db31bdb64a881365a4cc5cbb08 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Fri, 27 Oct 2017 15:09:26 +0200 Subject: feat(Menu): Add "About Franz" Menu item to Windows/Linux --- src/lib/Menu.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/lib') diff --git a/src/lib/Menu.js b/src/lib/Menu.js index a6cde4d36..d828f8e1a 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js @@ -4,6 +4,7 @@ import { autorun, computed, observable, toJS } from 'mobx'; import { isDevMode, isMac } from '../environment'; const { app, Menu } = remote; +const { app, Menu, dialog } = remote; const template = [ { @@ -218,6 +219,18 @@ export default class FranzMenu { role: 'front', }, ]; + } else { + tpl[4].submenu.unshift({ + role: 'about', + click: () => { + dialog.showMessageBox({ + type: 'info', + title: 'Franz', + message: 'Franz', + detail: `Version: ${remote.app.getVersion()}\nRelease: ${process.versions.electron} / ${process.platform} / ${process.arch}`, + }); + }, + }); } const serviceTpl = this.serviceTpl; -- cgit v1.2.3-54-g00ecf From 8281c43ac30ad420899524a8a78ec4d34b08e8f4 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Fri, 27 Oct 2017 15:09:56 +0200 Subject: Add info & support links to "Help" menu --- src/lib/Menu.js | 46 +++++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 13 deletions(-) (limited to 'src/lib') diff --git a/src/lib/Menu.js b/src/lib/Menu.js index d828f8e1a..c29cd00ae 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js @@ -1,9 +1,8 @@ import { remote, shell } from 'electron'; import { autorun, computed, observable, toJS } from 'mobx'; -import { isDevMode, isMac } from '../environment'; +import { isMac } from '../environment'; -const { app, Menu } = remote; const { app, Menu, dialog } = remote; const template = [ @@ -85,6 +84,28 @@ const template = [ label: 'Learn More', click() { shell.openExternal('http://meetfranz.com'); }, }, + { + label: 'Changelog', + click() { shell.openExternal('https://github.com/meetfranz/franz/blob/master/CHANGELOG.md'); }, + }, + { + type: 'separator', + }, + { + label: 'Support', + click() { shell.openExternal('http://meetfranz.com/support'); }, + }, + { + type: 'separator', + }, + { + label: 'Terms of Service', + click() { shell.openExternal('https://meetfranz.com/terms'); }, + }, + { + label: 'Privacy Statement', + click() { shell.openExternal('https://meetfranz.com/privacy'); }, + }, ], }, ]; @@ -102,17 +123,16 @@ export default class FranzMenu { _build() { const tpl = toJS(this.tpl); - if (isDevMode) { - tpl[1].submenu.push({ - role: 'toggledevtools', - }, { - label: 'Toggle Service Developer Tools', - accelerator: 'CmdOrCtrl+Shift+Alt+i', - click: () => { - this.actions.service.openDevToolsForActiveService(); - }, - }); - } + tpl[1].submenu.push({ + role: 'toggledevtools', + }, { + label: 'Toggle Service Developer Tools', + accelerator: 'CmdOrCtrl+Shift+Alt+i', + click: () => { + this.actions.service.openDevToolsForActiveService(); + }, + }); + tpl[1].submenu.unshift({ label: 'Reload Service', -- cgit v1.2.3-54-g00ecf