diff options
author | 2022-06-21 01:13:52 +0100 | |
---|---|---|
committer | 2022-06-21 01:13:52 +0100 | |
commit | 6fec8365f601d71f4d8e0863683f34cbe8dd111e (patch) | |
tree | eecb873ee26a351b828468960805d308c9818940 /src/lib | |
parent | Fix images with query strings (#318) (diff) | |
download | ferdium-app-6fec8365f601d71f4d8e0863683f34cbe8dd111e.tar.gz ferdium-app-6fec8365f601d71f4d8e0863683f34cbe8dd111e.tar.zst ferdium-app-6fec8365f601d71f4d8e0863683f34cbe8dd111e.zip |
Feature: Add Toggle Navbar to View Menu (global) (#317)
Add Toggle Navbar to View Menu (global)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Menu.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 50145dd47..98de80884 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -124,6 +124,10 @@ const menuItems = defineMessages({ | |||
124 | id: 'menu.view.toggleFullScreen', | 124 | id: 'menu.view.toggleFullScreen', |
125 | defaultMessage: 'Toggle Full Screen', | 125 | defaultMessage: 'Toggle Full Screen', |
126 | }, | 126 | }, |
127 | toggleNavigationBar: { | ||
128 | id: 'menu.view.toggleNavigationBar', | ||
129 | defaultMessage: 'Toggle Navigation Bar', | ||
130 | }, | ||
127 | toggleDarkMode: { | 131 | toggleDarkMode: { |
128 | id: 'menu.view.toggleDarkMode', | 132 | id: 'menu.view.toggleDarkMode', |
129 | defaultMessage: 'Toggle Dark Mode', | 133 | defaultMessage: 'Toggle Dark Mode', |
@@ -460,6 +464,21 @@ const _titleBarTemplateFactory = (intl, locked) => [ | |||
460 | role: 'toggleFullScreen', | 464 | role: 'toggleFullScreen', |
461 | }, | 465 | }, |
462 | { | 466 | { |
467 | label: intl.formatMessage(menuItems.toggleNavigationBar), | ||
468 | accelerator: `${cmdOrCtrlShortcutKey()}+B`, | ||
469 | role: 'toggleNavigationBar', | ||
470 | type: 'checkbox', | ||
471 | checked: window['ferdium'].stores.settings.app.navigationBarManualActive, | ||
472 | click: () => { | ||
473 | window['ferdium'].actions.settings.update({ | ||
474 | type: 'app', | ||
475 | data: { | ||
476 | navigationBarManualActive: !window['ferdium'].stores.settings.app.navigationBarManualActive, | ||
477 | } | ||
478 | }); | ||
479 | } | ||
480 | }, | ||
481 | { | ||
463 | label: intl.formatMessage(menuItems.toggleDarkMode), | 482 | label: intl.formatMessage(menuItems.toggleDarkMode), |
464 | type: 'checkbox', | 483 | type: 'checkbox', |
465 | accelerator: `${cmdOrCtrlShortcutKey()}+${shiftKey()}+D`, | 484 | accelerator: `${cmdOrCtrlShortcutKey()}+${shiftKey()}+D`, |