diff --git a/.eslintrc.js b/.eslintrc.js index d1af5515a..be982e46f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -33,7 +33,7 @@ module.exports = { rules: { 'space-before-function-paren': 'off', - 'comma-dangle': ['error', 'never'], + 'comma-dangle': ['error', 'only-multiline'], 'vue/no-v-html': 'off', 'no-console': ['error', { allow: ['warn', 'error'] }], 'no-unused-vars': 'warn', diff --git a/src/main/index.js b/src/main/index.js index b1d724c25..15a38879d 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -998,7 +998,23 @@ function runApp() { { role: 'zoomout' }, { role: 'zoomout', accelerator: 'CmdOrCtrl+numsub', visible: false }, { type: 'separator' }, - { role: 'togglefullscreen' } + { role: 'togglefullscreen' }, + { type: 'separator' }, + { + label: 'History', + // MacOS: Command + Y + // Other OS: Ctrl + H + accelerator: process.platform === 'darwin' ? 'Cmd+Y' : 'Ctrl+H', + click: (_menuItem, browserWindow, _event) => { + if (browserWindow == null) { return } + + browserWindow.webContents.send( + 'change-view', + { route: '/history' } + ) + }, + type: 'normal' + }, ] }, {