diff options
author | 2019-03-21 16:20:53 +0100 | |
---|---|---|
committer | 2019-03-21 16:20:53 +0100 | |
commit | 558e23652fb317f96c09d391a9ef8cf7aa6d4dbd (patch) | |
tree | 9c6dc336cf39bcd8fec9a26d038ef0b691f111bd /src/features | |
parent | small fixes (diff) | |
download | ferdium-app-558e23652fb317f96c09d391a9ef8cf7aa6d4dbd.tar.gz ferdium-app-558e23652fb317f96c09d391a9ef8cf7aa6d4dbd.tar.zst ferdium-app-558e23652fb317f96c09d391a9ef8cf7aa6d4dbd.zip |
add tooltip to add workspace button in drawer
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/workspaces/components/WorkspaceDrawer.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/features/workspaces/components/WorkspaceDrawer.js b/src/features/workspaces/components/WorkspaceDrawer.js index 28e74b287..5a8d5d854 100644 --- a/src/features/workspaces/components/WorkspaceDrawer.js +++ b/src/features/workspaces/components/WorkspaceDrawer.js | |||
@@ -4,9 +4,12 @@ import { observer } from 'mobx-react'; | |||
4 | import injectSheet from 'react-jss'; | 4 | import injectSheet from 'react-jss'; |
5 | import { defineMessages, intlShape } from 'react-intl'; | 5 | import { defineMessages, intlShape } from 'react-intl'; |
6 | import { H1, Icon } from '@meetfranz/ui'; | 6 | import { H1, Icon } from '@meetfranz/ui'; |
7 | import ReactTooltip from 'react-tooltip'; | ||
8 | |||
7 | import { workspacesState } from '../state'; | 9 | import { workspacesState } from '../state'; |
8 | import WorkspaceDrawerItem from './WorkspaceDrawerItem'; | 10 | import WorkspaceDrawerItem from './WorkspaceDrawerItem'; |
9 | import { workspaceActions } from '../actions'; | 11 | import { workspaceActions } from '../actions'; |
12 | import { ctrlKey } from '../../../environment'; | ||
10 | 13 | ||
11 | const messages = defineMessages({ | 14 | const messages = defineMessages({ |
12 | headline: { | 15 | headline: { |
@@ -17,6 +20,10 @@ const messages = defineMessages({ | |||
17 | id: 'workspaceDrawer.allServices', | 20 | id: 'workspaceDrawer.allServices', |
18 | defaultMessage: '!!!All services', | 21 | defaultMessage: '!!!All services', |
19 | }, | 22 | }, |
23 | addWorkspaceTooltip: { | ||
24 | id: 'workspaceDrawer.addWorkspaceTooltip', | ||
25 | defaultMessage: '!!!Add workspace', | ||
26 | }, | ||
20 | }); | 27 | }); |
21 | 28 | ||
22 | const styles = theme => ({ | 29 | const styles = theme => ({ |
@@ -54,6 +61,10 @@ class WorkspaceDrawer extends Component { | |||
54 | intl: intlShape, | 61 | intl: intlShape, |
55 | }; | 62 | }; |
56 | 63 | ||
64 | componentDidMount() { | ||
65 | ReactTooltip.rebuild(); | ||
66 | } | ||
67 | |||
57 | render() { | 68 | render() { |
58 | const { | 69 | const { |
59 | classes, | 70 | classes, |
@@ -69,6 +80,7 @@ class WorkspaceDrawer extends Component { | |||
69 | <span | 80 | <span |
70 | className={classes.addWorkspaceButton} | 81 | className={classes.addWorkspaceButton} |
71 | onClick={workspaceActions.openWorkspaceSettings} | 82 | onClick={workspaceActions.openWorkspaceSettings} |
83 | data-tip={`${intl.formatMessage(messages.addWorkspaceTooltip)}`} | ||
72 | > | 84 | > |
73 | <Icon | 85 | <Icon |
74 | icon="mdiPlusBox" | 86 | icon="mdiPlusBox" |
@@ -94,6 +106,7 @@ class WorkspaceDrawer extends Component { | |||
94 | /> | 106 | /> |
95 | ))} | 107 | ))} |
96 | </div> | 108 | </div> |
109 | <ReactTooltip place="right" type="dark" effect="solid" /> | ||
97 | </div> | 110 | </div> |
98 | ); | 111 | ); |
99 | } | 112 | } |