aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/services
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2023-05-28 22:11:03 +0530
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2023-05-28 22:25:33 +0530
commitb631f0f664dc85c81032b02eebdd8eb1e8796a81 (patch)
treee4a50a32f7836953c0a6af34389fe9898e24215a /src/components/services
parentFix issues reported by sonarqube linter (diff)
downloadferdium-app-b631f0f664dc85c81032b02eebdd8eb1e8796a81.tar.gz
ferdium-app-b631f0f664dc85c81032b02eebdd8eb1e8796a81.tar.zst
ferdium-app-b631f0f664dc85c81032b02eebdd8eb1e8796a81.zip
Allow the 10th service to also be accessible via keyboard shortcut combo
Diffstat (limited to 'src/components/services')
-rw-r--r--src/components/services/tabs/TabItem.tsx14
1 files changed, 7 insertions, 7 deletions
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';
15import Icon from '../../ui/icon'; 15import Icon from '../../ui/icon';
16import { Stores } from '../../../@types/stores.types'; 16import { Stores } from '../../../@types/stores.types';
17import MenuItemConstructorOptions = Electron.MenuItemConstructorOptions; 17import MenuItemConstructorOptions = Electron.MenuItemConstructorOptions;
18import { acceleratorString } from '../../../jsUtils';
18 19
19const IS_SERVICE_DEBUGGING_ENABLED = ( 20const IS_SERVICE_DEBUGGING_ENABLED = (
20 localStorage.getItem('debug') || '' 21 localStorage.getItem('debug') || ''
@@ -358,11 +359,10 @@ class TabItem extends Component<IProps, IState> {
358 onKeyDown={noop} 359 onKeyDown={noop}
359 role="presentation" 360 role="presentation"
360 onContextMenu={() => menu.popup()} 361 onContextMenu={() => menu.popup()}
361 data-tip={`${service.name} ${ 362 data-tip={`${service.name} ${acceleratorString(
362 shortcutIndex <= 9 363 shortcutIndex,
363 ? `(${cmdOrCtrlShortcutKey(false)}+${shortcutIndex})` 364 cmdOrCtrlShortcutKey(false),
364 : '' 365 )}`}
365 }`}
366 > 366 >
367 <img src={service.icon} className="tab-item__icon" alt="" /> 367 <img src={service.icon} className="tab-item__icon" alt="" />
368 {showServiceNameSetting && ( 368 {showServiceNameSetting && (
@@ -407,8 +407,8 @@ class TabItem extends Component<IProps, IState> {
407 /> 407 />
408 </> 408 </>
409 )} 409 )}
410 {shortcutIndex <= 9 && this.state.showShortcutIndex && ( 410 {shortcutIndex <= 10 && this.state.showShortcutIndex && (
411 <span className="tab-item__shortcut-index">{shortcutIndex}</span> 411 <span className="tab-item__shortcut-index">{shortcutIndex % 10}</span>
412 )} 412 )}
413 </li> 413 </li>
414 ); 414 );