aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-03-21 16:20:53 +0100
committerLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-03-21 16:20:53 +0100
commit558e23652fb317f96c09d391a9ef8cf7aa6d4dbd (patch)
tree9c6dc336cf39bcd8fec9a26d038ef0b691f111bd /src
parentsmall fixes (diff)
downloadferdium-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')
-rw-r--r--src/features/workspaces/components/WorkspaceDrawer.js13
-rw-r--r--src/i18n/locales/defaultMessages.json21
-rw-r--r--src/i18n/locales/en-US.json1
-rw-r--r--src/i18n/messages/src/features/workspaces/components/WorkspaceDrawer.json21
4 files changed, 48 insertions, 8 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';
4import injectSheet from 'react-jss'; 4import injectSheet from 'react-jss';
5import { defineMessages, intlShape } from 'react-intl'; 5import { defineMessages, intlShape } from 'react-intl';
6import { H1, Icon } from '@meetfranz/ui'; 6import { H1, Icon } from '@meetfranz/ui';
7import ReactTooltip from 'react-tooltip';
8
7import { workspacesState } from '../state'; 9import { workspacesState } from '../state';
8import WorkspaceDrawerItem from './WorkspaceDrawerItem'; 10import WorkspaceDrawerItem from './WorkspaceDrawerItem';
9import { workspaceActions } from '../actions'; 11import { workspaceActions } from '../actions';
12import { ctrlKey } from '../../../environment';
10 13
11const messages = defineMessages({ 14const 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
22const styles = theme => ({ 29const 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 }
diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json
index c1634df8e..d4d2a55cc 100644
--- a/src/i18n/locales/defaultMessages.json
+++ b/src/i18n/locales/defaultMessages.json
@@ -3326,26 +3326,39 @@
3326 "defaultMessage": "!!!Workspaces", 3326 "defaultMessage": "!!!Workspaces",
3327 "end": { 3327 "end": {
3328 "column": 3, 3328 "column": 3,
3329 "line": 15 3329 "line": 18
3330 }, 3330 },
3331 "file": "src/features/workspaces/components/WorkspaceDrawer.js", 3331 "file": "src/features/workspaces/components/WorkspaceDrawer.js",
3332 "id": "workspaceDrawer.headline", 3332 "id": "workspaceDrawer.headline",
3333 "start": { 3333 "start": {
3334 "column": 12, 3334 "column": 12,
3335 "line": 12 3335 "line": 15
3336 } 3336 }
3337 }, 3337 },
3338 { 3338 {
3339 "defaultMessage": "!!!All services", 3339 "defaultMessage": "!!!All services",
3340 "end": { 3340 "end": {
3341 "column": 3, 3341 "column": 3,
3342 "line": 19 3342 "line": 22
3343 }, 3343 },
3344 "file": "src/features/workspaces/components/WorkspaceDrawer.js", 3344 "file": "src/features/workspaces/components/WorkspaceDrawer.js",
3345 "id": "workspaceDrawer.allServices", 3345 "id": "workspaceDrawer.allServices",
3346 "start": { 3346 "start": {
3347 "column": 15, 3347 "column": 15,
3348 "line": 16 3348 "line": 19
3349 }
3350 },
3351 {
3352 "defaultMessage": "!!!Add workspace",
3353 "end": {
3354 "column": 3,
3355 "line": 26
3356 },
3357 "file": "src/features/workspaces/components/WorkspaceDrawer.js",
3358 "id": "workspaceDrawer.addWorkspaceTooltip",
3359 "start": {
3360 "column": 23,
3361 "line": 23
3349 } 3362 }
3350 } 3363 }
3351 ], 3364 ],
diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json
index f37237ac2..f7b5fe2b8 100644
--- a/src/i18n/locales/en-US.json
+++ b/src/i18n/locales/en-US.json
@@ -300,6 +300,7 @@
300 "validation.url": "{field} is not a valid URL", 300 "validation.url": "{field} is not a valid URL",
301 "welcome.loginButton": "Login to your account", 301 "welcome.loginButton": "Login to your account",
302 "welcome.signupButton": "Create a free account", 302 "welcome.signupButton": "Create a free account",
303 "workspaceDrawer.addWorkspaceTooltip": "Add workspace",
303 "workspaceDrawer.allServices": "All services", 304 "workspaceDrawer.allServices": "All services",
304 "workspaceDrawer.headline": "Workspaces", 305 "workspaceDrawer.headline": "Workspaces",
305 "workspaceDrawer.item.noServicesAddedYet": "No services added yet", 306 "workspaceDrawer.item.noServicesAddedYet": "No services added yet",
diff --git a/src/i18n/messages/src/features/workspaces/components/WorkspaceDrawer.json b/src/i18n/messages/src/features/workspaces/components/WorkspaceDrawer.json
index c875b82cb..7026708e2 100644
--- a/src/i18n/messages/src/features/workspaces/components/WorkspaceDrawer.json
+++ b/src/i18n/messages/src/features/workspaces/components/WorkspaceDrawer.json
@@ -4,11 +4,11 @@
4 "defaultMessage": "!!!Workspaces", 4 "defaultMessage": "!!!Workspaces",
5 "file": "src/features/workspaces/components/WorkspaceDrawer.js", 5 "file": "src/features/workspaces/components/WorkspaceDrawer.js",
6 "start": { 6 "start": {
7 "line": 12, 7 "line": 15,
8 "column": 12 8 "column": 12
9 }, 9 },
10 "end": { 10 "end": {
11 "line": 15, 11 "line": 18,
12 "column": 3 12 "column": 3
13 } 13 }
14 }, 14 },
@@ -17,11 +17,24 @@
17 "defaultMessage": "!!!All services", 17 "defaultMessage": "!!!All services",
18 "file": "src/features/workspaces/components/WorkspaceDrawer.js", 18 "file": "src/features/workspaces/components/WorkspaceDrawer.js",
19 "start": { 19 "start": {
20 "line": 16, 20 "line": 19,
21 "column": 15 21 "column": 15
22 }, 22 },
23 "end": { 23 "end": {
24 "line": 19, 24 "line": 22,
25 "column": 3
26 }
27 },
28 {
29 "id": "workspaceDrawer.addWorkspaceTooltip",
30 "defaultMessage": "!!!Add workspace",
31 "file": "src/features/workspaces/components/WorkspaceDrawer.js",
32 "start": {
33 "line": 23,
34 "column": 23
35 },
36 "end": {
37 "line": 26,
25 "column": 3 38 "column": 3
26 } 39 }
27 } 40 }