started adding copay shell to copay
This commit is contained in:
parent
45ffa94bbe
commit
e7c5addfab
19 changed files with 781 additions and 3 deletions
143
shell/lib/app-menu.js
Normal file
143
shell/lib/app-menu.js
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
/*
|
||||
** copay-shell - native app menu
|
||||
*/
|
||||
|
||||
module.exports = function(app, web) {
|
||||
|
||||
var Menu = require('menu');
|
||||
var menu = []
|
||||
|
||||
// add the mac osx app menu entry
|
||||
if (process.platform === 'darwin') {
|
||||
menu.push({
|
||||
label: 'Copay',
|
||||
submenu: [
|
||||
{
|
||||
label: 'About Copay',
|
||||
selector: 'orderFrontStandardAboutPanel:'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Hide Copay',
|
||||
accelerator: 'Command+H',
|
||||
selector: 'hide:'
|
||||
},
|
||||
{
|
||||
label: 'Hide Others',
|
||||
accelerator: 'Command+Shift+H',
|
||||
selector: 'hideOtherApplications:'
|
||||
},
|
||||
{
|
||||
label: 'Show All',
|
||||
selector: 'unhideAllApplications:'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Quit',
|
||||
accelerator: 'Command+Q',
|
||||
click: function() {
|
||||
app.quit();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
menu.push({
|
||||
label: 'Addresses',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Create New',
|
||||
click: function() {
|
||||
web.send('address:create');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
menu.push({
|
||||
label: 'Transactions',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Send Money',
|
||||
click: function() {
|
||||
web.send('transactions:send');
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Pending',
|
||||
click: function() {
|
||||
web.send('transactions:pending');
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'All',
|
||||
click: function() {
|
||||
web.send('transactions:all');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
menu.push({
|
||||
label: 'Backup',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Download File',
|
||||
click: function() {
|
||||
web.send('backup:download');
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Backup to Email',
|
||||
click: function() {
|
||||
web.send('backup:email');
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Import a Backup',
|
||||
click: function() {
|
||||
web.send('backup:import');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
if (process.platform === 'darwin') {
|
||||
menu.push({
|
||||
label: 'Window',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Minimize',
|
||||
accelerator: 'Command+M',
|
||||
selector: 'performMiniaturize:'
|
||||
},
|
||||
{
|
||||
label: 'Close',
|
||||
accelerator: 'Command+W',
|
||||
selector: 'performClose:'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Bring All to Front',
|
||||
selector: 'arrangeInFront:'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
return Menu.buildFromTemplate(menu);
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue