diff options
author | 2024-04-18 16:46:39 +0100 | |
---|---|---|
committer | 2024-04-18 16:46:39 +0100 | |
commit | b73c5f999e80d6dc54fe3a625f45edc9846a3855 (patch) | |
tree | 6c0e2269c6b7cee135be4ba1bbc3c41e80bba58f /src | |
parent | refactor: bring down eslint warnings to zero (#1714) (diff) | |
download | ferdium-app-b73c5f999e80d6dc54fe3a625f45edc9846a3855.tar.gz ferdium-app-b73c5f999e80d6dc54fe3a625f45edc9846a3855.tar.zst ferdium-app-b73c5f999e80d6dc54fe3a625f45edc9846a3855.zip |
feat: add openProcessManager to View menu (#1715)
Diffstat (limited to 'src')
-rw-r--r-- | src/i18n/locales/en-US.json | 1 | ||||
-rw-r--r-- | src/lib/Menu.ts | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json index 622f758c3..1941ecd86 100644 --- a/src/i18n/locales/en-US.json +++ b/src/i18n/locales/en-US.json | |||
@@ -124,6 +124,7 @@ | |||
124 | "menu.view.back": "Back", | 124 | "menu.view.back": "Back", |
125 | "menu.view.forward": "Forward", | 125 | "menu.view.forward": "Forward", |
126 | "menu.view.lockFerdium": "Lock Ferdium", | 126 | "menu.view.lockFerdium": "Lock Ferdium", |
127 | "menu.view.openProcessManager": "Open Process Manager", | ||
127 | "menu.view.openQuickSwitch": "Open Quick Switch", | 128 | "menu.view.openQuickSwitch": "Open Quick Switch", |
128 | "menu.view.reloadFerdium": "Reload Ferdium", | 129 | "menu.view.reloadFerdium": "Reload Ferdium", |
129 | "menu.view.reloadService": "Reload Service", | 130 | "menu.view.reloadService": "Reload Service", |
diff --git a/src/lib/Menu.ts b/src/lib/Menu.ts index d72bf53e5..bb8eead3a 100644 --- a/src/lib/Menu.ts +++ b/src/lib/Menu.ts | |||
@@ -7,6 +7,7 @@ import { | |||
7 | systemPreferences, | 7 | systemPreferences, |
8 | webContents, | 8 | webContents, |
9 | } from '@electron/remote'; | 9 | } from '@electron/remote'; |
10 | import { ipcRenderer } from 'electron'; | ||
10 | import { type MenuItemConstructorOptions, clipboard } from 'electron'; | 11 | import { type MenuItemConstructorOptions, clipboard } from 'electron'; |
11 | import { fromJS } from 'immutable'; | 12 | import { fromJS } from 'immutable'; |
12 | import { action, autorun, makeObservable, observable } from 'mobx'; | 13 | import { action, autorun, makeObservable, observable } from 'mobx'; |
@@ -163,6 +164,10 @@ const menuItems = defineMessages({ | |||
163 | id: 'menu.view.toggleServiceDevTools', | 164 | id: 'menu.view.toggleServiceDevTools', |
164 | defaultMessage: 'Toggle Service Developer Tools', | 165 | defaultMessage: 'Toggle Service Developer Tools', |
165 | }, | 166 | }, |
167 | openProcessManager: { | ||
168 | id: 'menu.view.openProcessManager', | ||
169 | defaultMessage: 'Open Process Manager', | ||
170 | }, | ||
166 | reloadService: { | 171 | reloadService: { |
167 | id: 'menu.view.reloadService', | 172 | id: 'menu.view.reloadService', |
168 | defaultMessage: 'Reload Service', | 173 | defaultMessage: 'Reload Service', |
@@ -764,6 +769,13 @@ class FranzMenu implements StoresProps { | |||
764 | type: 'separator', | 769 | type: 'separator', |
765 | }, | 770 | }, |
766 | { | 771 | { |
772 | label: intl.formatMessage(menuItems.openProcessManager), | ||
773 | accelerator: `${shiftKey()}+Escape`, | ||
774 | click: () => { | ||
775 | ipcRenderer.send('openProcessManager'); | ||
776 | }, | ||
777 | }, | ||
778 | { | ||
767 | label: intl.formatMessage(menuItems.toggleDevTools), | 779 | label: intl.formatMessage(menuItems.toggleDevTools), |
768 | accelerator: `${cmdOrCtrlShortcutKey()}+${altKey()}+I`, | 780 | accelerator: `${cmdOrCtrlShortcutKey()}+${altKey()}+I`, |
769 | enabled: webContents.fromId(1) !== undefined, | 781 | enabled: webContents.fromId(1) !== undefined, |