🎨 Sort roles alphabetically

This commit is contained in:
Kevin Sawicki 2016-06-22 13:15:20 -07:00
parent c0562d16d5
commit 653370974a

View file

@ -1,23 +1,51 @@
const roles = { const roles = {
undo: { about: {
label: 'Undo', get label () {
accelerator: 'CmdOrCtrl+Z', const {app} = require('electron')
method: 'undo' return `About ${app.getName()}`
}
}, },
redo: { close: {
label: 'Redo', label: 'Close',
accelerator: 'Shift+CmdOrCtrl+Z', accelerator: 'CmdOrCtrl+W',
method: 'redo' method: 'close'
},
copy: {
label: 'Copy',
accelerator: 'CmdOrCtrl+C',
method: 'copy'
}, },
cut: { cut: {
label: 'Cut', label: 'Cut',
accelerator: 'CmdOrCtrl+X', accelerator: 'CmdOrCtrl+X',
method: 'cut' method: 'cut'
}, },
copy: { delete: {
label: 'Copy', label: 'Delete',
accelerator: 'CmdOrCtrl+C', accelerator: 'Delete',
method: 'copy' method: 'delete'
},
front: {
label: 'Bring All to Front'
},
help: {
label: 'Help'
},
hide: {
get label () {
const {app} = require('electron')
return `Hide ${app.getName()}`
},
accelerator: 'Command+H'
},
hideothers: {
label: 'Hide Others',
accelerator: 'Command+Alt+H'
},
minimize: {
label: 'Minimize',
accelerator: 'CmdOrCtrl+M',
method: 'minimize'
}, },
paste: { paste: {
label: 'Paste', label: 'Paste',
@ -29,26 +57,6 @@ const roles = {
accelerator: 'Shift+Command+V', accelerator: 'Shift+Command+V',
method: 'pasteAndMatchStyle' method: 'pasteAndMatchStyle'
}, },
selectall: {
label: 'Select All',
accelerator: 'CmdOrCtrl+A',
method: 'selectAll'
},
minimize: {
label: 'Minimize',
accelerator: 'CmdOrCtrl+M',
method: 'minimize'
},
close: {
label: 'Close',
accelerator: 'CmdOrCtrl+W',
method: 'close'
},
delete: {
label: 'Delete',
accelerator: 'Delete',
method: 'delete'
},
quit: { quit: {
get label () { get label () {
const {app} = require('electron') const {app} = require('electron')
@ -57,45 +65,37 @@ const roles = {
accelerator: process.platform === 'win32' ? null : 'Command+Q', accelerator: process.platform === 'win32' ? null : 'Command+Q',
method: 'quit' method: 'quit'
}, },
redo: {
label: 'Redo',
accelerator: 'Shift+CmdOrCtrl+Z',
method: 'redo'
},
selectall: {
label: 'Select All',
accelerator: 'CmdOrCtrl+A',
method: 'selectAll'
},
services: {
label: 'Services'
},
togglefullscreen: { togglefullscreen: {
label: 'Toggle Full Screen', label: 'Toggle Full Screen',
accelerator: process.platform === 'darwin' ? 'Ctrl+Command+F' : 'F11', accelerator: process.platform === 'darwin' ? 'Ctrl+Command+F' : 'F11',
method: 'toggleFullScreen' method: 'toggleFullScreen'
}, },
help: { undo: {
label: 'Help' label: 'Undo',
accelerator: 'CmdOrCtrl+Z',
method: 'undo'
},
unhide: {
label: 'Show All'
}, },
window: { window: {
label: 'Window' label: 'Window'
}, },
services: {
label: 'Services'
},
zoom: { zoom: {
label: 'Zoom' label: 'Zoom'
},
front: {
label: 'Bring All to Front'
},
about: {
get label () {
const {app} = require('electron')
return `About ${app.getName()}`
}
},
hide: {
get label () {
const {app} = require('electron')
return return `Hide ${app.getName()}`
},
accelerator: 'Command+H'
},
hideothers: {
label: 'Hide Others',
accelerator: 'Command+Alt+H'
},
unhide: {
label: 'Show All'
} }
} }