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

with keyboard shortcut
This commit is contained in:
PikachuEXE 2022-06-21 10:31:56 +08:00 committed by GitHub
parent 2be06bfa93
commit 6c198b47a3
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 = [
{
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',

View File

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