diff options
author | 2019-04-07 19:50:40 +0200 | |
---|---|---|
committer | 2019-04-07 19:50:40 +0200 | |
commit | b3afb9f45d47ebc352b28eb106b22fffc2f17707 (patch) | |
tree | 1cdcd243eba4e797c75747379f2ed8ad8a392cdc /src/features/workspaces | |
parent | refactor workspace table css away from legacy styles (diff) | |
download | ferdium-app-b3afb9f45d47ebc352b28eb106b22fffc2f17707.tar.gz ferdium-app-b3afb9f45d47ebc352b28eb106b22fffc2f17707.tar.zst ferdium-app-b3afb9f45d47ebc352b28eb106b22fffc2f17707.zip |
render workspace service list like services + toggle
Diffstat (limited to 'src/features/workspaces')
-rw-r--r-- | src/features/workspaces/components/EditWorkspaceForm.js | 4 | ||||
-rw-r--r-- | src/features/workspaces/components/WorkspaceItem.js | 6 | ||||
-rw-r--r-- | src/features/workspaces/components/WorkspaceServiceListItem.js (renamed from src/features/workspaces/components/ServiceListItem.js) | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/features/workspaces/components/EditWorkspaceForm.js b/src/features/workspaces/components/EditWorkspaceForm.js index e4bf44248..bba4485ff 100644 --- a/src/features/workspaces/components/EditWorkspaceForm.js +++ b/src/features/workspaces/components/EditWorkspaceForm.js | |||
@@ -10,7 +10,7 @@ import Workspace from '../models/Workspace'; | |||
10 | import Service from '../../../models/Service'; | 10 | import Service from '../../../models/Service'; |
11 | import Form from '../../../lib/Form'; | 11 | import Form from '../../../lib/Form'; |
12 | import { required } from '../../../helpers/validation-helpers'; | 12 | import { required } from '../../../helpers/validation-helpers'; |
13 | import ServiceListItem from './ServiceListItem'; | 13 | import WorkspaceServiceListItem from './WorkspaceServiceListItem'; |
14 | import Request from '../../../stores/lib/Request'; | 14 | import Request from '../../../stores/lib/Request'; |
15 | import { gaEvent } from '../../../lib/analytics'; | 15 | import { gaEvent } from '../../../lib/analytics'; |
16 | import { GA_CATEGORY_WORKSPACES } from '../index'; | 16 | import { GA_CATEGORY_WORKSPACES } from '../index'; |
@@ -151,7 +151,7 @@ class EditWorkspaceForm extends Component { | |||
151 | <h2>{intl.formatMessage(messages.servicesInWorkspaceHeadline)}</h2> | 151 | <h2>{intl.formatMessage(messages.servicesInWorkspaceHeadline)}</h2> |
152 | <div className={classes.serviceList}> | 152 | <div className={classes.serviceList}> |
153 | {services.map(s => ( | 153 | {services.map(s => ( |
154 | <ServiceListItem | 154 | <WorkspaceServiceListItem |
155 | key={s.id} | 155 | key={s.id} |
156 | service={s} | 156 | service={s} |
157 | isInWorkspace={workspaceServices.includes(s.id)} | 157 | isInWorkspace={workspaceServices.includes(s.id)} |
diff --git a/src/features/workspaces/components/WorkspaceItem.js b/src/features/workspaces/components/WorkspaceItem.js index a950a981a..cc4b1a3ba 100644 --- a/src/features/workspaces/components/WorkspaceItem.js +++ b/src/features/workspaces/components/WorkspaceItem.js | |||
@@ -8,10 +8,10 @@ import Workspace from '../models/Workspace'; | |||
8 | 8 | ||
9 | const styles = theme => ({ | 9 | const styles = theme => ({ |
10 | row: { | 10 | row: { |
11 | height: 57, | 11 | height: theme.workspaces.settings.listItems.height, |
12 | borderBottom: `1px solid ${theme.workspaceSettings.listItemBorderColor}`, | 12 | borderBottom: `1px solid ${theme.workspaces.settings.listItems.borderColor}`, |
13 | '&:hover': { | 13 | '&:hover': { |
14 | background: theme.workspaceSettings.listItemHoverBgColor, | 14 | background: theme.workspaces.settings.listItems.hoverBgColor, |
15 | }, | 15 | }, |
16 | }, | 16 | }, |
17 | columnName: {}, | 17 | columnName: {}, |
diff --git a/src/features/workspaces/components/ServiceListItem.js b/src/features/workspaces/components/WorkspaceServiceListItem.js index 146cc5a36..7b516d056 100644 --- a/src/features/workspaces/components/ServiceListItem.js +++ b/src/features/workspaces/components/WorkspaceServiceListItem.js | |||
@@ -5,10 +5,11 @@ import injectSheet from 'react-jss'; | |||
5 | import { Toggle } from '@meetfranz/forms'; | 5 | import { Toggle } from '@meetfranz/forms'; |
6 | 6 | ||
7 | import Service from '../../../models/Service'; | 7 | import Service from '../../../models/Service'; |
8 | import ServiceIcon from '../../../components/ui/ServiceIcon'; | ||
8 | 9 | ||
9 | const styles = () => ({ | 10 | const styles = theme => ({ |
10 | service: { | 11 | service: { |
11 | height: 'auto', | 12 | height: theme.workspaceSettings.listItemHeight, |
12 | display: 'flex', | 13 | display: 'flex', |
13 | }, | 14 | }, |
14 | name: { | 15 | name: { |
@@ -35,6 +36,7 @@ class ServiceListItem extends Component { | |||
35 | 36 | ||
36 | return ( | 37 | return ( |
37 | <div className={classes.service}> | 38 | <div className={classes.service}> |
39 | <ServiceIcon service={service} /> | ||
38 | <Toggle | 40 | <Toggle |
39 | checked={isInWorkspace} | 41 | checked={isInWorkspace} |
40 | onChange={onToggle} | 42 | onChange={onToggle} |