This commit is contained in:
Kevin Sawicki 2016-11-15 10:49:51 -08:00
Родитель 28c39d5151
Коммит 0698b5f1be
2 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@ -84,11 +84,7 @@ app.once('ready', () => {
label: 'View', label: 'View',
submenu: [ submenu: [
{ {
label: 'Reload', role: 'reload'
accelerator: 'CmdOrCtrl+R',
click (item, focusedWindow) {
if (focusedWindow) focusedWindow.reload()
}
}, },
{ {
label: 'Toggle Developer Tools', label: 'Toggle Developer Tools',

Просмотреть файл

@ -72,6 +72,11 @@ const roles = {
accelerator: process.platform === 'win32' ? 'Control+Y' : 'Shift+CommandOrControl+Z', accelerator: process.platform === 'win32' ? 'Control+Y' : 'Shift+CommandOrControl+Z',
webContentsMethod: 'redo' webContentsMethod: 'redo'
}, },
reload: {
label: 'Reload',
accelerator: 'CmdOrCtrl+R',
windowMethod: 'reload'
},
resetzoom: { resetzoom: {
label: 'Actual Size', label: 'Actual Size',
accelerator: 'CommandOrControl+0', accelerator: 'CommandOrControl+0',
@ -138,7 +143,7 @@ const canExecuteRole = (role) => {
if (!roles.hasOwnProperty(role)) return false if (!roles.hasOwnProperty(role)) return false
if (process.platform !== 'darwin') return true if (process.platform !== 'darwin') return true
// macOS handles all roles natively except the ones listed below // macOS handles all roles natively except the ones listed below
return ['zoomin', 'zoomout', 'resetzoom'].includes(role) return ['reload', 'resetzoom', 'zoomin', 'zoomout'].includes(role)
} }
exports.getDefaultLabel = (role) => { exports.getDefaultLabel = (role) => {