diff options
author | 2021-10-31 13:46:21 +0530 | |
---|---|---|
committer | 2021-10-31 13:46:21 +0530 | |
commit | 2e256968131f2a3a7de83b0ee51746fe575efd6c (patch) | |
tree | 67cff332e13f4b4ea5f04bac612506e60da88a48 /src/components/services/tabs | |
parent | docs: add DarsiSreelekha as a contributor for code (#2170) (diff) | |
download | ferdium-app-2e256968131f2a3a7de83b0ee51746fe575efd6c.tar.gz ferdium-app-2e256968131f2a3a7de83b0ee51746fe575efd6c.tar.zst ferdium-app-2e256968131f2a3a7de83b0ee51746fe575efd6c.zip |
Add shortcuts for toggling service from the context menu (#2148)
Diffstat (limited to 'src/components/services/tabs')
-rw-r--r-- | src/components/services/tabs/TabItem.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/components/services/tabs/TabItem.js b/src/components/services/tabs/TabItem.js index a07652284..5381d7c2b 100644 --- a/src/components/services/tabs/TabItem.js +++ b/src/components/services/tabs/TabItem.js | |||
@@ -11,7 +11,7 @@ import ms from 'ms'; | |||
11 | import { observable, autorun, reaction } from 'mobx'; | 11 | import { observable, autorun, reaction } from 'mobx'; |
12 | import { mdiExclamation } from '@mdi/js'; | 12 | import { mdiExclamation } from '@mdi/js'; |
13 | import ServiceModel from '../../../models/Service'; | 13 | import ServiceModel from '../../../models/Service'; |
14 | import { cmdOrCtrlShortcutKey } from '../../../environment'; | 14 | import { cmdOrCtrlShortcutKey, shiftKey, altKey } from '../../../environment'; |
15 | import globalMessages from '../../../i18n/globalMessages'; | 15 | import globalMessages from '../../../i18n/globalMessages'; |
16 | import SettingsStore from '../../../stores/SettingsStore'; | 16 | import SettingsStore from '../../../stores/SettingsStore'; |
17 | import { Icon } from '../../ui/icon'; | 17 | import { Icon } from '../../ui/icon'; |
@@ -255,24 +255,28 @@ class TabItem extends Component { | |||
255 | ? intl.formatMessage(messages.disableNotifications) | 255 | ? intl.formatMessage(messages.disableNotifications) |
256 | : intl.formatMessage(messages.enableNotifications), | 256 | : intl.formatMessage(messages.enableNotifications), |
257 | click: () => toggleNotifications(), | 257 | click: () => toggleNotifications(), |
258 | accelerator: `${cmdOrCtrlShortcutKey()}+${altKey()}+N`, | ||
258 | }, | 259 | }, |
259 | { | 260 | { |
260 | label: service.isMuted | 261 | label: service.isMuted |
261 | ? intl.formatMessage(messages.enableAudio) | 262 | ? intl.formatMessage(messages.enableAudio) |
262 | : intl.formatMessage(messages.disableAudio), | 263 | : intl.formatMessage(messages.disableAudio), |
263 | click: () => toggleAudio(), | 264 | click: () => toggleAudio(), |
265 | accelerator: `${cmdOrCtrlShortcutKey()}+${shiftKey()}+A`, | ||
264 | }, | 266 | }, |
265 | { | 267 | { |
266 | label: service.isDarkModeEnabled | 268 | label: service.isDarkModeEnabled |
267 | ? intl.formatMessage(messages.disableDarkMode) | 269 | ? intl.formatMessage(messages.disableDarkMode) |
268 | : intl.formatMessage(messages.enableDarkMode), | 270 | : intl.formatMessage(messages.enableDarkMode), |
269 | click: () => toggleDarkMode(), | 271 | click: () => toggleDarkMode(), |
272 | accelerator: `${shiftKey()}+${altKey()}+D`, | ||
270 | }, | 273 | }, |
271 | { | 274 | { |
272 | label: intl.formatMessage( | 275 | label: intl.formatMessage( |
273 | service.isEnabled ? messages.disableService : messages.enableService, | 276 | service.isEnabled ? messages.disableService : messages.enableService, |
274 | ), | 277 | ), |
275 | click: () => (service.isEnabled ? disableService() : enableService()), | 278 | click: () => (service.isEnabled ? disableService() : enableService()), |
279 | accelerator: `${cmdOrCtrlShortcutKey()}+${shiftKey()}+S`, | ||
276 | }, | 280 | }, |
277 | { | 281 | { |
278 | label: intl.formatMessage( | 282 | label: intl.formatMessage( |