From b631f0f664dc85c81032b02eebdd8eb1e8796a81 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sun, 28 May 2023 22:11:03 +0530 Subject: Allow the 10th service to also be accessible via keyboard shortcut combo --- src/components/services/tabs/TabItem.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/components') diff --git a/src/components/services/tabs/TabItem.tsx b/src/components/services/tabs/TabItem.tsx index 289597db9..c883066ce 100644 --- a/src/components/services/tabs/TabItem.tsx +++ b/src/components/services/tabs/TabItem.tsx @@ -15,6 +15,7 @@ import globalMessages from '../../../i18n/globalMessages'; import Icon from '../../ui/icon'; import { Stores } from '../../../@types/stores.types'; import MenuItemConstructorOptions = Electron.MenuItemConstructorOptions; +import { acceleratorString } from '../../../jsUtils'; const IS_SERVICE_DEBUGGING_ENABLED = ( localStorage.getItem('debug') || '' @@ -358,11 +359,10 @@ class TabItem extends Component { onKeyDown={noop} role="presentation" onContextMenu={() => menu.popup()} - data-tip={`${service.name} ${ - shortcutIndex <= 9 - ? `(${cmdOrCtrlShortcutKey(false)}+${shortcutIndex})` - : '' - }`} + data-tip={`${service.name} ${acceleratorString( + shortcutIndex, + cmdOrCtrlShortcutKey(false), + )}`} > {showServiceNameSetting && ( @@ -407,8 +407,8 @@ class TabItem extends Component { /> )} - {shortcutIndex <= 9 && this.state.showShortcutIndex && ( - {shortcutIndex} + {shortcutIndex <= 10 && this.state.showShortcutIndex && ( + {shortcutIndex % 10} )} ); -- cgit v1.2.3-70-g09d2