diff options
author | 2019-04-05 21:02:55 +0200 | |
---|---|---|
committer | 2019-04-05 21:02:55 +0200 | |
commit | 7caccf36dd55a8c7ac9dcd5e154634607adf5ef6 (patch) | |
tree | f79d9866c02083b1eeaa4839cc8a73ce6591f5e9 /src/features/workspaces | |
parent | ensure drawer is open on workspace settings routes (diff) | |
download | ferdium-app-7caccf36dd55a8c7ac9dcd5e154634607adf5ef6.tar.gz ferdium-app-7caccf36dd55a8c7ac9dcd5e154634607adf5ef6.tar.zst ferdium-app-7caccf36dd55a8c7ac9dcd5e154634607adf5ef6.zip |
add small text label for adding new workspace to drawer
Diffstat (limited to 'src/features/workspaces')
-rw-r--r-- | src/features/workspaces/components/WorkspaceDrawer.js | 42 |
1 files changed, 40 insertions, 2 deletions
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({ | |||
37 | id: 'workspaceDrawer.reactivatePremiumAccountLabel', | 37 | id: 'workspaceDrawer.reactivatePremiumAccountLabel', |
38 | defaultMessage: '!!!Reactivate premium account', | 38 | defaultMessage: '!!!Reactivate premium account', |
39 | }, | 39 | }, |
40 | addNewWorkspaceLabel: { | ||
41 | id: 'workspaceDrawer.addNewWorkspaceLabel', | ||
42 | defaultMessage: '!!!add new workspace', | ||
43 | }, | ||
40 | }); | 44 | }); |
41 | 45 | ||
42 | const styles = theme => ({ | 46 | const styles = theme => ({ |
@@ -48,11 +52,11 @@ const styles = theme => ({ | |||
48 | fontSize: '24px', | 52 | fontSize: '24px', |
49 | marginTop: '38px', | 53 | marginTop: '38px', |
50 | marginBottom: '25px', | 54 | marginBottom: '25px', |
51 | marginLeft: `${theme.workspaceDrawerPadding}px`, | 55 | marginLeft: theme.workspaceDrawerPadding, |
52 | }, | 56 | }, |
53 | addWorkspaceButton: { | 57 | addWorkspaceButton: { |
54 | float: 'right', | 58 | float: 'right', |
55 | marginRight: `${theme.workspaceDrawerPadding}px`, | 59 | marginRight: theme.workspaceDrawerPadding, |
56 | marginTop: '2px', | 60 | marginTop: '2px', |
57 | }, | 61 | }, |
58 | addWorkspaceButtonIcon: { | 62 | addWorkspaceButtonIcon: { |
@@ -74,6 +78,24 @@ const styles = theme => ({ | |||
74 | width: '100%', | 78 | width: '100%', |
75 | color: 'white !important', | 79 | color: 'white !important', |
76 | }, | 80 | }, |
81 | addNewWorkspaceLabel: { | ||
82 | height: 'auto', | ||
83 | color: theme.workspaceDrawerServicesColor, | ||
84 | marginTop: 20, | ||
85 | marginLeft: theme.workspaceDrawerPadding, | ||
86 | '& > span': { | ||
87 | fontSize: '13px', | ||
88 | marginLeft: 10, | ||
89 | position: 'relative', | ||
90 | top: -3, | ||
91 | }, | ||
92 | '&:hover': { | ||
93 | color: theme.workspaceDrawerAddButtonHoverColor, | ||
94 | '& > svg': { | ||
95 | fill: theme.workspaceDrawerAddButtonHoverColor, | ||
96 | }, | ||
97 | }, | ||
98 | }, | ||
77 | }); | 99 | }); |
78 | 100 | ||
79 | @injectSheet(styles) @observer | 101 | @injectSheet(styles) @observer |
@@ -180,6 +202,22 @@ class WorkspaceDrawer extends Component { | |||
180 | ))} | 202 | ))} |
181 | </div> | 203 | </div> |
182 | )} | 204 | )} |
205 | <div | ||
206 | className={classes.addNewWorkspaceLabel} | ||
207 | onClick={() => { | ||
208 | workspaceActions.openWorkspaceSettings(); | ||
209 | gaEvent(GA_CATEGORY_WORKSPACES, 'add', 'drawerAddLabel'); | ||
210 | }} | ||
211 | > | ||
212 | <Icon | ||
213 | icon="mdiPlusBox" | ||
214 | size={1} | ||
215 | className={classes.addWorkspaceButtonIcon} | ||
216 | /> | ||
217 | <span> | ||
218 | {intl.formatMessage(messages.addNewWorkspaceLabel)} | ||
219 | </span> | ||
220 | </div> | ||
183 | <ReactTooltip place="right" type="dark" effect="solid" /> | 221 | <ReactTooltip place="right" type="dark" effect="solid" /> |
184 | </div> | 222 | </div> |
185 | ); | 223 | ); |