* Update app menu to add item for new window (#2306)

with keyboard shortcut
This commit is contained in:
PikachuEXE 2022-06-21 10:31:47 +08:00 committed by GitHub
parent 6e25d35459
commit 10f0af1efa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View File

@ -770,7 +770,21 @@ function runApp() {
const template = [ const template = [
{ {
label: 'File', label: 'File',
submenu: [{ role: 'quit' }] submenu: [
{
label: 'New Window',
accelerator: 'CmdOrCtrl+N',
click: (_menuItem, _browserWindow, _event) => {
createWindow({
replaceMainWindow: false,
showWindowNow: true
})
},
type: 'normal'
},
{ type: 'separator' },
{ role: 'quit' }
]
}, },
{ {
label: 'Edit', label: 'Edit',

View File

@ -7,6 +7,7 @@ FreeTube: FreeTube
# Webkit Menu Bar # Webkit Menu Bar
File: File File: File
New Window: New Window
Quit: Quit Quit: Quit
Edit: Edit Edit: Edit
Undo: Undo Undo: Undo