From d8007f7200b1c770205476019efe520b54a056c0 Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Thu, 27 Oct 2022 11:05:01 +0800 Subject: [PATCH] * Update app menu to add item for preferences --- src/main/index.js | 14 ++++++++++++++ static/locales/en-US.yaml | 1 + 2 files changed, 15 insertions(+) diff --git a/src/main/index.js b/src/main/index.js index d1bc8f0428195..f6751d1cddf13 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -929,6 +929,20 @@ function runApp() { type: 'normal' }, { type: 'separator' }, + { + label: 'Preferences', + accelerator: 'CmdOrCtrl+,', + click: (_menuItem, browserWindow, _event) => { + if (browserWindow == null) { return } + + browserWindow.webContents.send( + 'change-view', + { route: '/settings' } + ) + }, + type: 'normal' + }, + { type: 'separator' }, { role: 'quit' } ] }, diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index 89ee7e2e38404..b73fe1f3ae974 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -8,6 +8,7 @@ FreeTube: FreeTube # Webkit Menu Bar File: File New Window: New Window +Preferences: Preferences Quit: Quit Edit: Edit Undo: Undo