From 7caccf36dd55a8c7ac9dcd5e154634607adf5ef6 Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Fri, 5 Apr 2019 21:02:55 +0200 Subject: add small text label for adding new workspace to drawer --- .../workspaces/components/WorkspaceDrawer.js | 42 ++++++++++++++++++++-- src/i18n/locales/defaultMessages.json | 13 +++++++ src/i18n/locales/en-US.json | 1 + .../workspaces/components/WorkspaceDrawer.json | 13 +++++++ 4 files changed, 67 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/features/workspaces/components/WorkspaceDrawer.js b/src/features/workspaces/components/WorkspaceDrawer.js index f35faf691..0befcc869 100644 --- a/src/features/workspaces/components/WorkspaceDrawer.js +++ b/src/features/workspaces/components/WorkspaceDrawer.js @@ -37,6 +37,10 @@ const messages = defineMessages({ id: 'workspaceDrawer.reactivatePremiumAccountLabel', defaultMessage: '!!!Reactivate premium account', }, + addNewWorkspaceLabel: { + id: 'workspaceDrawer.addNewWorkspaceLabel', + defaultMessage: '!!!add new workspace', + }, }); const styles = theme => ({ @@ -48,11 +52,11 @@ const styles = theme => ({ fontSize: '24px', marginTop: '38px', marginBottom: '25px', - marginLeft: `${theme.workspaceDrawerPadding}px`, + marginLeft: theme.workspaceDrawerPadding, }, addWorkspaceButton: { float: 'right', - marginRight: `${theme.workspaceDrawerPadding}px`, + marginRight: theme.workspaceDrawerPadding, marginTop: '2px', }, addWorkspaceButtonIcon: { @@ -74,6 +78,24 @@ const styles = theme => ({ width: '100%', color: 'white !important', }, + addNewWorkspaceLabel: { + height: 'auto', + color: theme.workspaceDrawerServicesColor, + marginTop: 20, + marginLeft: theme.workspaceDrawerPadding, + '& > span': { + fontSize: '13px', + marginLeft: 10, + position: 'relative', + top: -3, + }, + '&:hover': { + color: theme.workspaceDrawerAddButtonHoverColor, + '& > svg': { + fill: theme.workspaceDrawerAddButtonHoverColor, + }, + }, + }, }); @injectSheet(styles) @observer @@ -180,6 +202,22 @@ class WorkspaceDrawer extends Component { ))} )} +
{ + workspaceActions.openWorkspaceSettings(); + gaEvent(GA_CATEGORY_WORKSPACES, 'add', 'drawerAddLabel'); + }} + > + + + {intl.formatMessage(messages.addNewWorkspaceLabel)} + +
); diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json index e5c1ea259..05df4cbac 100644 --- a/src/i18n/locales/defaultMessages.json +++ b/src/i18n/locales/defaultMessages.json @@ -3399,6 +3399,19 @@ "column": 28, "line": 36 } + }, + { + "defaultMessage": "!!!add new workspace", + "end": { + "column": 3, + "line": 43 + }, + "file": "src/features/workspaces/components/WorkspaceDrawer.js", + "id": "workspaceDrawer.addNewWorkspaceLabel", + "start": { + "column": 24, + "line": 40 + } } ], "path": "src/features/workspaces/components/WorkspaceDrawer.json" diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json index c694b8729..78dcd83d7 100644 --- a/src/i18n/locales/en-US.json +++ b/src/i18n/locales/en-US.json @@ -306,6 +306,7 @@ "validation.url": "{field} is not a valid URL", "welcome.loginButton": "Login to your account", "welcome.signupButton": "Create a free account", + "workspaceDrawer.addNewWorkspaceLabel": "add new workspace", "workspaceDrawer.addWorkspaceTooltip": "Add workspace", "workspaceDrawer.allServices": "All services", "workspaceDrawer.headline": "Workspaces", diff --git a/src/i18n/messages/src/features/workspaces/components/WorkspaceDrawer.json b/src/i18n/messages/src/features/workspaces/components/WorkspaceDrawer.json index 37bae262a..9b0b80321 100644 --- a/src/i18n/messages/src/features/workspaces/components/WorkspaceDrawer.json +++ b/src/i18n/messages/src/features/workspaces/components/WorkspaceDrawer.json @@ -76,5 +76,18 @@ "line": 39, "column": 3 } + }, + { + "id": "workspaceDrawer.addNewWorkspaceLabel", + "defaultMessage": "!!!add new workspace", + "file": "src/features/workspaces/components/WorkspaceDrawer.js", + "start": { + "line": 40, + "column": 24 + }, + "end": { + "line": 43, + "column": 3 + } } ] \ No newline at end of file -- cgit v1.2.3-70-g09d2