Browse Source

added KIX

pull/943/head
phischdev 8 years ago
parent
commit
da6c4bbeb1
  1. 19
      app/Application.js
  2. 281
      electron/menu.js

19
app/Application.js

@ -206,6 +206,23 @@ Ext.define('Rambox.Application', {
"js_unread": "", "js_unread": "",
"zoomLevel": 0, "zoomLevel": 0,
"id": 9 "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(); //Rambox.ux.Auth0.init();
// EXPORT DEFUALT SERVICES // EXPORT DEFUALT SERVICES
// this.exportDefaultServices();
this.defaultServices(); this.defaultServices();
//TestForEmptyServices(); //TestForEmptyServices();

281
electron/menu.js

@ -17,59 +17,133 @@ function sendAction(action) {
} }
const helpSubmenu = [ 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 = `
// <!-- Please describe here your issue and steps to reproduce it. -->
//
//
//
// <!-- DON'T REMOVE THE FOLLOWING LINES -->
// -
// > ${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');
// }
// },
// {
// 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: `&Visit ${appName} Website`, label: '&View',
click() { submenu: [
shell.openExternal('http://rambox.pro');
}
},
{ {
label: `&Facebook`, label: '&Reload',
click() { accelerator: 'CmdOrCtrl+R',
shell.openExternal('https://www.facebook.com/ramboxapp'); click(item, focusedWindow) {
if (focusedWindow) focusedWindow.reload();
} }
}, },
{ {
label: `&Twitter`, label: '&Reload current Service',
accelerator: 'CmdOrCtrl+Shift+R',
click() { click() {
shell.openExternal('https://www.twitter.com/ramboxapp'); sendAction('reloadCurrentService');
} }
}, },
{ {
label: `&GitHub`, type: 'separator'
click() {
shell.openExternal('https://www.github.com/saenzramiro/rambox');
}
}, },
{ {
type: 'separator' role: 'zoomin'
}, },
{ {
label: '&Report an Issue...', role: 'zoomout'
click() {
const body = `
<!-- Please describe here your issue and steps to reproduce it. -->
<!-- DON'T REMOVE THE FOLLOWING LINES -->
-
> ${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`, role: 'resetzoom'
click() {
shell.openExternal('https://gitter.im/saenzramiro/rambox');
}
}, },
{ {
label: `&Tools`, type: 'separator'
submenu: [ },
{ {
label: `&Clear Cache`, label: `&Clear Cache`,
click(item, win) { click(item, win) {
@ -90,81 +164,6 @@ const helpSubmenu = [
} }
] ]
}, },
{
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: '&View',
submenu: [
{
label: '&Reload',
accelerator: 'CmdOrCtrl+R',
click(item, focusedWindow) {
if (focusedWindow) focusedWindow.reload();
}
},
{
label: '&Reload current Service',
accelerator: 'CmdOrCtrl+Shift+R',
click() {
sendAction('reloadCurrentService');
}
},
{
type: 'separator'
},
{
role: 'zoomin'
},
{
role: 'zoomout'
},
{
role: 'resetzoom'
}
]
},
{ {
label: '&Window', label: '&Window',
role: 'window', role: 'window',
@ -194,10 +193,10 @@ let tpl = [
} }
] ]
}, },
{ // {
label: '&Help', // label: '&Help',
role: 'help' // role: 'help'
} // }
]; ];
if (process.platform === 'darwin') { if (process.platform === 'darwin') {
@ -252,34 +251,34 @@ if (process.platform === 'darwin') {
] ]
}); });
} else { } else {
tpl.unshift({ // tpl.unshift({
label: '&File', // label: '&File',
submenu: [ // submenu: [
{ // {
role: 'quit' // role: 'quit'
} // }
] // ]
}); // });
helpSubmenu.push({ // helpSubmenu.push({
type: 'separator' // type: 'separator'
}); // });
helpSubmenu.push({ // helpSubmenu.push({
label: `&Check for updates...`, // label: `&Check for updates...`,
click(item, win) { // click(item, win) {
const webContents = win.webContents; // const webContents = win.webContents;
const send = webContents.send.bind(win.webContents); // const send = webContents.send.bind(win.webContents);
send('autoUpdater:check-update'); // send('autoUpdater:check-update');
} // }
}); // });
helpSubmenu.push({ // helpSubmenu.push({
label: `&About ${appName}`, // label: `&About ${appName}`,
click() { // click() {
sendAction('showAbout') // sendAction('showAbout')
} // }
}); // });
} }
tpl[tpl.length - 1].submenu = helpSubmenu; // tpl[tpl.length - 1].submenu = helpSubmenu;
var menu = electron.Menu.buildFromTemplate(tpl); var menu = electron.Menu.buildFromTemplate(tpl);
module.exports = menu; module.exports = menu;

Loading…
Cancel
Save