* Update app menu to add item for history (#2870)

This commit is contained in:
PikachuEXE 2022-11-25 01:47:44 +08:00 committed by GitHub
parent d32739eb9c
commit 2ad431622a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

View File

@ -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',

View File

@ -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'
},
]
},
{