diff options
author | 2019-10-09 09:48:41 +0200 | |
---|---|---|
committer | 2019-10-09 09:48:41 +0200 | |
commit | da9e8a3d5b11efcc8eeee325c0ac7eb7840f75af (patch) | |
tree | a189f4566c6380b86aeb04b9307aea23fc6e14d7 /src/features/workspaces/components | |
parent | Update zh-HANT.json (diff) | |
parent | Update CHANGELOG.md (diff) | |
download | ferdium-app-da9e8a3d5b11efcc8eeee325c0ac7eb7840f75af.tar.gz ferdium-app-da9e8a3d5b11efcc8eeee325c0ac7eb7840f75af.tar.zst ferdium-app-da9e8a3d5b11efcc8eeee325c0ac7eb7840f75af.zip |
Merge branch 'master' of https://github.com/meetfranz/franz into franz-5.4.0
Diffstat (limited to 'src/features/workspaces/components')
-rw-r--r-- | src/features/workspaces/components/WorkspaceDrawer.js | 4 | ||||
-rw-r--r-- | src/features/workspaces/components/WorkspaceDrawerItem.js | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/features/workspaces/components/WorkspaceDrawer.js b/src/features/workspaces/components/WorkspaceDrawer.js index f4ee89a14..e991b9909 100644 --- a/src/features/workspaces/components/WorkspaceDrawer.js +++ b/src/features/workspaces/components/WorkspaceDrawer.js | |||
@@ -199,8 +199,9 @@ class WorkspaceDrawer extends Component { | |||
199 | }} | 199 | }} |
200 | services={getServicesForWorkspace(null)} | 200 | services={getServicesForWorkspace(null)} |
201 | isActive={actualWorkspace == null} | 201 | isActive={actualWorkspace == null} |
202 | shortcutIndex={0} | ||
202 | /> | 203 | /> |
203 | {workspaces.map(workspace => ( | 204 | {workspaces.map((workspace, index) => ( |
204 | <WorkspaceDrawerItem | 205 | <WorkspaceDrawerItem |
205 | key={workspace.id} | 206 | key={workspace.id} |
206 | name={workspace.name} | 207 | name={workspace.name} |
@@ -212,6 +213,7 @@ class WorkspaceDrawer extends Component { | |||
212 | }} | 213 | }} |
213 | onContextMenuEditClick={() => workspaceActions.edit({ workspace })} | 214 | onContextMenuEditClick={() => workspaceActions.edit({ workspace })} |
214 | services={getServicesForWorkspace(workspace)} | 215 | services={getServicesForWorkspace(workspace)} |
216 | shortcutIndex={index + 1} | ||
215 | /> | 217 | /> |
216 | ))} | 218 | ))} |
217 | <div | 219 | <div |
diff --git a/src/features/workspaces/components/WorkspaceDrawerItem.js b/src/features/workspaces/components/WorkspaceDrawerItem.js index 59a2144d3..18f424d8a 100644 --- a/src/features/workspaces/components/WorkspaceDrawerItem.js +++ b/src/features/workspaces/components/WorkspaceDrawerItem.js | |||
@@ -5,6 +5,7 @@ import { observer } from 'mobx-react'; | |||
5 | import injectSheet from 'react-jss'; | 5 | import injectSheet from 'react-jss'; |
6 | import classnames from 'classnames'; | 6 | import classnames from 'classnames'; |
7 | import { defineMessages, intlShape } from 'react-intl'; | 7 | import { defineMessages, intlShape } from 'react-intl'; |
8 | import { ctrlKey } from '../../../environment'; | ||
8 | 9 | ||
9 | const { Menu } = remote; | 10 | const { Menu } = remote; |
10 | 11 | ||
@@ -69,6 +70,7 @@ class WorkspaceDrawerItem extends Component { | |||
69 | onClick: PropTypes.func.isRequired, | 70 | onClick: PropTypes.func.isRequired, |
70 | services: PropTypes.arrayOf(PropTypes.string).isRequired, | 71 | services: PropTypes.arrayOf(PropTypes.string).isRequired, |
71 | onContextMenuEditClick: PropTypes.func, | 72 | onContextMenuEditClick: PropTypes.func, |
73 | shortcutIndex: PropTypes.number.isRequired, | ||
72 | }; | 74 | }; |
73 | 75 | ||
74 | static defaultProps = { | 76 | static defaultProps = { |
@@ -87,6 +89,7 @@ class WorkspaceDrawerItem extends Component { | |||
87 | onClick, | 89 | onClick, |
88 | onContextMenuEditClick, | 90 | onContextMenuEditClick, |
89 | services, | 91 | services, |
92 | shortcutIndex, | ||
90 | } = this.props; | 93 | } = this.props; |
91 | const { intl } = this.context; | 94 | const { intl } = this.context; |
92 | 95 | ||
@@ -112,6 +115,7 @@ class WorkspaceDrawerItem extends Component { | |||
112 | onContextMenu={() => ( | 115 | onContextMenu={() => ( |
113 | onContextMenuEditClick && contextMenu.popup(remote.getCurrentWindow()) | 116 | onContextMenuEditClick && contextMenu.popup(remote.getCurrentWindow()) |
114 | )} | 117 | )} |
118 | data-tip={`${shortcutIndex <= 9 ? `(${ctrlKey}+Alt+${shortcutIndex})` : ''}`} | ||
115 | > | 119 | > |
116 | <span | 120 | <span |
117 | className={classnames([ | 121 | className={classnames([ |