diff options
author | 2021-08-13 00:24:40 +0530 | |
---|---|---|
committer | 2021-08-13 00:24:40 +0530 | |
commit | 52dba987668f4962895e8298d8d32fe877240a76 (patch) | |
tree | 9ccbd1938ab9ee066918252347d7b87bad549529 /src/components/services/tabs | |
parent | Fix error while importing without workspaces (#1776) (diff) | |
download | ferdium-app-52dba987668f4962895e8298d8d32fe877240a76.tar.gz ferdium-app-52dba987668f4962895e8298d8d32fe877240a76.tar.zst ferdium-app-52dba987668f4962895e8298d8d32fe877240a76.zip |
refactor: Use the 'shortcutKey' function without exposing the 'ctrlKey' or the 'cmdKey'
Diffstat (limited to 'src/components/services/tabs')
-rw-r--r-- | src/components/services/tabs/TabItem.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/services/tabs/TabItem.js b/src/components/services/tabs/TabItem.js index 3c27cca73..6a6d2c8c5 100644 --- a/src/components/services/tabs/TabItem.js +++ b/src/components/services/tabs/TabItem.js | |||
@@ -10,7 +10,7 @@ import ms from 'ms'; | |||
10 | 10 | ||
11 | import { observable, autorun } from 'mobx'; | 11 | import { observable, autorun } from 'mobx'; |
12 | import ServiceModel from '../../../models/Service'; | 12 | import ServiceModel from '../../../models/Service'; |
13 | import { ctrlKey, cmdKey } from '../../../environment'; | 13 | import { shortcutKey } from '../../../environment'; |
14 | 14 | ||
15 | const IS_SERVICE_DEBUGGING_ENABLED = ( | 15 | const IS_SERVICE_DEBUGGING_ENABLED = ( |
16 | localStorage.getItem('debug') || '' | 16 | localStorage.getItem('debug') || '' |
@@ -201,7 +201,7 @@ class TabItem extends Component { | |||
201 | { | 201 | { |
202 | label: intl.formatMessage(messages.reload), | 202 | label: intl.formatMessage(messages.reload), |
203 | click: reload, | 203 | click: reload, |
204 | accelerator: `${cmdKey}+R`, | 204 | accelerator: `${shortcutKey()}+R`, |
205 | }, | 205 | }, |
206 | { | 206 | { |
207 | label: intl.formatMessage(messages.edit), | 207 | label: intl.formatMessage(messages.edit), |
@@ -307,7 +307,7 @@ class TabItem extends Component { | |||
307 | onClick={clickHandler} | 307 | onClick={clickHandler} |
308 | onContextMenu={() => menu.popup(getCurrentWindow())} | 308 | onContextMenu={() => menu.popup(getCurrentWindow())} |
309 | data-tip={`${service.name} ${ | 309 | data-tip={`${service.name} ${ |
310 | shortcutIndex <= 9 ? `(${ctrlKey}+${shortcutIndex})` : '' | 310 | shortcutIndex <= 9 ? `(${shortcutKey(false)}+${shortcutIndex})` : '' |
311 | }`} | 311 | }`} |
312 | > | 312 | > |
313 | <img src={service.icon} className="tab-item__icon" alt="" /> | 313 | <img src={service.icon} className="tab-item__icon" alt="" /> |