From da6c4bbeb1ed5985b939943150f72bee07c3adc3 Mon Sep 17 00:00:00 2001 From: phischdev Date: Sat, 6 May 2017 20:07:19 +0200 Subject: [PATCH] added KIX --- app/Application.js | 19 ++- electron/menu.js | 285 ++++++++++++++++++++++----------------------- 2 files changed, 160 insertions(+), 144 deletions(-) diff --git a/app/Application.js b/app/Application.js index b8c2616c..a64f05ae 100644 --- a/app/Application.js +++ b/app/Application.js @@ -206,6 +206,23 @@ Ext.define('Rambox.Application', { "js_unread": "", "zoomLevel": 0, "id": 9 + }, + { + "position": 11, + "type": "custom", + "logo": "", + "name": "KIX", + "url": "https://kix.diehumanisten.de", + "align": "right", + "notifications": true, + "muted": false, + "displayTabUnreadCounter": true, + "includeInGlobalUnreadCounter": true, + "trust": true, + "enabled": false, + "js_unread": "", + "zoomLevel": 0, + "id": 13 } ]; @@ -249,7 +266,7 @@ Ext.define('Rambox.Application', { //Rambox.ux.Auth0.init(); // EXPORT DEFUALT SERVICES - + // this.exportDefaultServices(); this.defaultServices(); //TestForEmptyServices(); diff --git a/electron/menu.js b/electron/menu.js index 63faaa32..5f5685f4 100644 --- a/electron/menu.js +++ b/electron/menu.js @@ -17,123 +17,101 @@ function sendAction(action) { } const helpSubmenu = [ - { - label: `&Visit ${appName} Website`, - click() { - shell.openExternal('http://rambox.pro'); - } - }, - { - label: `&Facebook`, - click() { - shell.openExternal('https://www.facebook.com/ramboxapp'); - } - }, - { - label: `&Twitter`, - click() { - shell.openExternal('https://www.twitter.com/ramboxapp'); - } - }, - { - label: `&GitHub`, - click() { - shell.openExternal('https://www.github.com/saenzramiro/rambox'); - } - }, - { - type: 'separator' - }, - { - label: '&Report an Issue...', - click() { - const body = ` - - - +// { +// label: `&Visit ${appName} Website`, +// click() { +// shell.openExternal('http://rambox.pro'); +// } +// }, +// { +// label: `&Facebook`, +// click() { +// shell.openExternal('https://www.facebook.com/ramboxapp'); +// } +// }, +// { +// label: `&Twitter`, +// click() { +// shell.openExternal('https://www.twitter.com/ramboxapp'); +// } +// }, +// { +// label: `&GitHub`, +// click() { +// shell.openExternal('https://www.github.com/saenzramiro/rambox'); +// } +// }, +// { +// type: 'separator' +// }, +// { +// label: '&Report an Issue...', +// click() { +// const body = ` +// +// +// +// +// +// - +// > ${app.getName()} ${app.getVersion()} +// > Electron ${process.versions.electron} +// > ${process.platform} ${process.arch} ${os.release()}`; +// +// shell.openExternal(`https://github.com/saenzramiro/rambox/issues/new?body=${encodeURIComponent(body)}`); +// } +// }, +// { +// label: `&Ask for Help`, +// click() { +// shell.openExternal('https://gitter.im/saenzramiro/rambox'); +// } +// }, - -- -> ${app.getName()} ${app.getVersion()} -> Electron ${process.versions.electron} -> ${process.platform} ${process.arch} ${os.release()}`; - - shell.openExternal(`https://github.com/saenzramiro/rambox/issues/new?body=${encodeURIComponent(body)}`); - } - }, - { - label: `&Ask for Help`, - click() { - shell.openExternal('https://gitter.im/saenzramiro/rambox'); - } - }, - { - label: `&Tools`, - submenu: [ - { - label: `&Clear Cache`, - click(item, win) { - win.webContents.session.clearCache(function() { - win.reload(); - }); - } - }, - { - label: `&Clear Local Storage`, - click(item, win) { - win.webContents.session.clearStorageData({ - storages: ['localstorage'] - }, function() { - win.reload(); - }); - } - } - ] - }, - { - type: 'separator' - }, - { - label: `&Donate`, - click() { - shell.openExternal('https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WU75QWS7LH2CA'); - } - } + // { + // type: 'separator' + // }, + // { + // label: `&Donate`, + // click() { + // shell.openExternal('https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WU75QWS7LH2CA'); + // } + // } ]; let tpl = [ - { - label: '&Edit', - submenu: [ - { - role: 'undo' - }, - { - role: 'redo' - }, - { - type: 'separator' - }, - { - role: 'cut' - }, - { - role: 'copy' - }, - { - role: 'paste' - }, - { - role: 'pasteandmatchstyle' - }, - { - role: 'selectall' - }, - { - role: 'delete' - } - ] - }, + // { + // label: '&Edit', + // submenu: [ + // { + // role: 'undo' + // }, + // { + // role: 'redo' + // }, + // { + // type: 'separator' + // }, + // { + // role: 'cut' + // }, + // { + // role: 'copy' + // }, + // { + // role: 'paste' + // }, + // { + // role: 'pasteandmatchstyle' + // }, + // { + // role: 'selectall' + // }, + // { + // role: 'delete' + // } + // ] + // }, { label: '&View', submenu: [ @@ -162,6 +140,27 @@ let tpl = [ }, { role: 'resetzoom' + }, + { + type: 'separator' + }, + { + label: `&Clear Cache`, + click(item, win) { + win.webContents.session.clearCache(function() { + win.reload(); + }); + } + }, + { + label: `&Clear Local Storage`, + click(item, win) { + win.webContents.session.clearStorageData({ + storages: ['localstorage'] + }, function() { + win.reload(); + }); + } } ] }, @@ -194,10 +193,10 @@ let tpl = [ } ] }, - { - label: '&Help', - role: 'help' - } + // { + // label: '&Help', + // role: 'help' + // } ]; if (process.platform === 'darwin') { @@ -252,34 +251,34 @@ if (process.platform === 'darwin') { ] }); } else { - tpl.unshift({ - label: '&File', - submenu: [ - { - role: 'quit' - } - ] - }); - helpSubmenu.push({ - type: 'separator' - }); - helpSubmenu.push({ - label: `&Check for updates...`, - click(item, win) { - const webContents = win.webContents; - const send = webContents.send.bind(win.webContents); - send('autoUpdater:check-update'); - } - }); - helpSubmenu.push({ - label: `&About ${appName}`, - click() { - sendAction('showAbout') - } - }); + // tpl.unshift({ + // label: '&File', + // submenu: [ + // { + // role: 'quit' + // } + // ] + // }); + // helpSubmenu.push({ + // type: 'separator' + // }); + // helpSubmenu.push({ + // label: `&Check for updates...`, + // click(item, win) { + // const webContents = win.webContents; + // const send = webContents.send.bind(win.webContents); + // send('autoUpdater:check-update'); + // } + // }); + // helpSubmenu.push({ + // label: `&About ${appName}`, + // click() { + // sendAction('showAbout') + // } + // }); } -tpl[tpl.length - 1].submenu = helpSubmenu; +// tpl[tpl.length - 1].submenu = helpSubmenu; var menu = electron.Menu.buildFromTemplate(tpl); module.exports = menu;