From e06046f93d3aaf35c5605c2502ebba955d04e09f Mon Sep 17 00:00:00 2001 From: pbca26 Date: Sat, 11 Feb 2017 13:40:12 +0300 Subject: [PATCH] added support menu tab with links --- private/mainmenu.js | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/private/mainmenu.js b/private/mainmenu.js index 978e996..10ab994 100644 --- a/private/mainmenu.js +++ b/private/mainmenu.js @@ -1,6 +1,7 @@ const {Menu} = require('electron') const electron = require('electron') const app = electron.app +const {shell} = require('electron') const template = [ { @@ -85,10 +86,37 @@ const template = [ }, { role: 'help', + label: 'Support', submenu: [ { - label: 'Learn More', - click () { require('electron').shell.openExternal('http://electron.atom.io') } + label: 'Supernet.org', + click () { + if (process.platform === 'linux') { + require('child_process').exec('xdg-open http://support.supernet.org'); + } else { + shell.openExternal('http://support.supernet.org') + } + } + }, + { + label: 'Slack', + click () { + if (process.platform === 'linux') { + require('child_process').exec('xdg-open https://sprnt.slack.com/messages/support'); + } else { + shell.openExternal('https://sprnt.slack.com/messages/support') + } + } + }, + { + label: 'Github', + click () { + if (process.platform === 'linux') { + require('child_process').exec('xdg-open https://github.com/SuperNETorg/iguana/issues'); + } else { + shell.openExternal('https://github.com/SuperNETorg/iguana/issues') + } + } } ] }