diff options
author | 2021-12-04 10:51:16 +0100 | |
---|---|---|
committer | 2021-12-04 10:51:16 +0100 | |
commit | 11c992b04f3cad6badf0ae86da65f490e31dd359 (patch) | |
tree | 749e63f6ba3e9bea48c186b5d8502d328edfd276 /src/features/workspaces/components | |
parent | 5.6.4-nightly.24 [skip ci] (diff) | |
download | ferdium-app-11c992b04f3cad6badf0ae86da65f490e31dd359.tar.gz ferdium-app-11c992b04f3cad6badf0ae86da65f490e31dd359.tar.zst ferdium-app-11c992b04f3cad6badf0ae86da65f490e31dd359.zip |
chore: upgrade react-jss to latest (#2302)
Diffstat (limited to 'src/features/workspaces/components')
8 files changed, 35 insertions, 32 deletions
diff --git a/src/features/workspaces/components/CreateWorkspaceForm.js b/src/features/workspaces/components/CreateWorkspaceForm.js index 75f6d9f4a..54475eccb 100644 --- a/src/features/workspaces/components/CreateWorkspaceForm.js +++ b/src/features/workspaces/components/CreateWorkspaceForm.js | |||
@@ -21,7 +21,7 @@ const messages = defineMessages({ | |||
21 | }, | 21 | }, |
22 | }); | 22 | }); |
23 | 23 | ||
24 | const styles = () => ({ | 24 | const styles = { |
25 | form: { | 25 | form: { |
26 | display: 'flex', | 26 | display: 'flex', |
27 | }, | 27 | }, |
@@ -32,10 +32,8 @@ const styles = () => ({ | |||
32 | submitButton: { | 32 | submitButton: { |
33 | height: 'inherit', | 33 | height: 'inherit', |
34 | }, | 34 | }, |
35 | }); | 35 | }; |
36 | 36 | ||
37 | @injectSheet(styles) | ||
38 | @observer | ||
39 | class CreateWorkspaceForm extends Component { | 37 | class CreateWorkspaceForm extends Component { |
40 | static propTypes = { | 38 | static propTypes = { |
41 | classes: PropTypes.object.isRequired, | 39 | classes: PropTypes.object.isRequired, |
@@ -94,4 +92,6 @@ class CreateWorkspaceForm extends Component { | |||
94 | } | 92 | } |
95 | } | 93 | } |
96 | 94 | ||
97 | export default injectIntl(CreateWorkspaceForm); | 95 | export default injectIntl( |
96 | injectSheet(styles, { injectTheme: true })(observer(CreateWorkspaceForm)), | ||
97 | ); | ||
diff --git a/src/features/workspaces/components/EditWorkspaceForm.js b/src/features/workspaces/components/EditWorkspaceForm.js index fa3ea4289..e8bd9d60c 100644 --- a/src/features/workspaces/components/EditWorkspaceForm.js +++ b/src/features/workspaces/components/EditWorkspaceForm.js | |||
@@ -58,7 +58,7 @@ const messages = defineMessages({ | |||
58 | }, | 58 | }, |
59 | }); | 59 | }); |
60 | 60 | ||
61 | const styles = () => ({ | 61 | const styles = { |
62 | nameInput: { | 62 | nameInput: { |
63 | height: 'auto', | 63 | height: 'auto', |
64 | }, | 64 | }, |
@@ -68,10 +68,8 @@ const styles = () => ({ | |||
68 | keepLoadedInfo: { | 68 | keepLoadedInfo: { |
69 | marginBottom: '2rem !important', | 69 | marginBottom: '2rem !important', |
70 | }, | 70 | }, |
71 | }); | 71 | }; |
72 | 72 | ||
73 | @injectSheet(styles) | ||
74 | @observer | ||
75 | class EditWorkspaceForm extends Component { | 73 | class EditWorkspaceForm extends Component { |
76 | static propTypes = { | 74 | static propTypes = { |
77 | classes: PropTypes.object.isRequired, | 75 | classes: PropTypes.object.isRequired, |
@@ -230,4 +228,6 @@ class EditWorkspaceForm extends Component { | |||
230 | } | 228 | } |
231 | } | 229 | } |
232 | 230 | ||
233 | export default injectIntl(EditWorkspaceForm); | 231 | export default injectIntl( |
232 | injectSheet(styles, { injectTheme: true })(observer(EditWorkspaceForm)), | ||
233 | ); | ||
diff --git a/src/features/workspaces/components/WorkspaceDrawer.js b/src/features/workspaces/components/WorkspaceDrawer.js index d66e0f10d..4fd2b1153 100644 --- a/src/features/workspaces/components/WorkspaceDrawer.js +++ b/src/features/workspaces/components/WorkspaceDrawer.js | |||
@@ -88,8 +88,6 @@ const styles = theme => ({ | |||
88 | }, | 88 | }, |
89 | }); | 89 | }); |
90 | 90 | ||
91 | @injectSheet(styles) | ||
92 | @observer | ||
93 | class WorkspaceDrawer extends Component { | 91 | class WorkspaceDrawer extends Component { |
94 | static propTypes = { | 92 | static propTypes = { |
95 | classes: PropTypes.object.isRequired, | 93 | classes: PropTypes.object.isRequired, |
@@ -175,4 +173,6 @@ class WorkspaceDrawer extends Component { | |||
175 | } | 173 | } |
176 | } | 174 | } |
177 | 175 | ||
178 | export default injectIntl(WorkspaceDrawer); | 176 | export default injectIntl( |
177 | injectSheet(styles, { injectTheme: true })(observer(WorkspaceDrawer)), | ||
178 | ); | ||
diff --git a/src/features/workspaces/components/WorkspaceDrawerItem.js b/src/features/workspaces/components/WorkspaceDrawerItem.js index d3c9fa767..22c0a39d9 100644 --- a/src/features/workspaces/components/WorkspaceDrawerItem.js +++ b/src/features/workspaces/components/WorkspaceDrawerItem.js | |||
@@ -65,8 +65,6 @@ const styles = theme => ({ | |||
65 | }, | 65 | }, |
66 | }); | 66 | }); |
67 | 67 | ||
68 | @injectSheet(styles) | ||
69 | @observer | ||
70 | class WorkspaceDrawerItem extends Component { | 68 | class WorkspaceDrawerItem extends Component { |
71 | static propTypes = { | 69 | static propTypes = { |
72 | classes: PropTypes.object.isRequired, | 70 | classes: PropTypes.object.isRequired, |
@@ -150,4 +148,6 @@ class WorkspaceDrawerItem extends Component { | |||
150 | } | 148 | } |
151 | } | 149 | } |
152 | 150 | ||
153 | export default injectIntl(WorkspaceDrawerItem); | 151 | export default injectIntl( |
152 | injectSheet(styles, { injectTheme: true })(observer(WorkspaceDrawerItem)), | ||
153 | ); | ||
diff --git a/src/features/workspaces/components/WorkspaceItem.tsx b/src/features/workspaces/components/WorkspaceItem.tsx index 6fb02d2f5..f46375c7a 100644 --- a/src/features/workspaces/components/WorkspaceItem.tsx +++ b/src/features/workspaces/components/WorkspaceItem.tsx | |||
@@ -22,8 +22,6 @@ type Props = { | |||
22 | onItemClick: (workspace) => void; | 22 | onItemClick: (workspace) => void; |
23 | }; | 23 | }; |
24 | 24 | ||
25 | @injectSheet(styles) | ||
26 | @observer | ||
27 | class WorkspaceItem extends Component<Props> { | 25 | class WorkspaceItem extends Component<Props> { |
28 | static propTypes = { | 26 | static propTypes = { |
29 | classes: PropTypes.object.isRequired, | 27 | classes: PropTypes.object.isRequired, |
@@ -42,4 +40,6 @@ class WorkspaceItem extends Component<Props> { | |||
42 | } | 40 | } |
43 | } | 41 | } |
44 | 42 | ||
45 | export default WorkspaceItem; | 43 | export default injectSheet(styles, { injectTheme: true })( |
44 | observer(WorkspaceItem), | ||
45 | ); | ||
diff --git a/src/features/workspaces/components/WorkspaceServiceListItem.tsx b/src/features/workspaces/components/WorkspaceServiceListItem.tsx index 6e012eb1e..46fda0103 100644 --- a/src/features/workspaces/components/WorkspaceServiceListItem.tsx +++ b/src/features/workspaces/components/WorkspaceServiceListItem.tsx | |||
@@ -36,8 +36,6 @@ type Props = { | |||
36 | service: any; | 36 | service: any; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | @injectSheet(styles) | ||
40 | @observer | ||
41 | class WorkspaceServiceListItem extends Component<Props> { | 39 | class WorkspaceServiceListItem extends Component<Props> { |
42 | render() { | 40 | render() { |
43 | const { classes, isInWorkspace, onToggle, service } = this.props; | 41 | const { classes, isInWorkspace, onToggle, service } = this.props; |
@@ -63,4 +61,6 @@ class WorkspaceServiceListItem extends Component<Props> { | |||
63 | } | 61 | } |
64 | } | 62 | } |
65 | 63 | ||
66 | export default WorkspaceServiceListItem; | 64 | export default injectSheet(styles, { injectTheme: true })( |
65 | observer(WorkspaceServiceListItem), | ||
66 | ); | ||
diff --git a/src/features/workspaces/components/WorkspaceSwitchingIndicator.js b/src/features/workspaces/components/WorkspaceSwitchingIndicator.js index ff4e9475a..b2e0adfe7 100644 --- a/src/features/workspaces/components/WorkspaceSwitchingIndicator.js +++ b/src/features/workspaces/components/WorkspaceSwitchingIndicator.js | |||
@@ -53,8 +53,6 @@ const styles = theme => ({ | |||
53 | }, | 53 | }, |
54 | }); | 54 | }); |
55 | 55 | ||
56 | @injectSheet(styles) | ||
57 | @observer | ||
58 | class WorkspaceSwitchingIndicator extends Component { | 56 | class WorkspaceSwitchingIndicator extends Component { |
59 | static propTypes = { | 57 | static propTypes = { |
60 | classes: PropTypes.object.isRequired, | 58 | classes: PropTypes.object.isRequired, |
@@ -85,4 +83,8 @@ class WorkspaceSwitchingIndicator extends Component { | |||
85 | } | 83 | } |
86 | } | 84 | } |
87 | 85 | ||
88 | export default injectIntl(WorkspaceSwitchingIndicator); | 86 | export default injectIntl( |
87 | injectSheet(styles, { injectTheme: true })( | ||
88 | observer(WorkspaceSwitchingIndicator), | ||
89 | ), | ||
90 | ); | ||
diff --git a/src/features/workspaces/components/WorkspacesDashboard.js b/src/features/workspaces/components/WorkspacesDashboard.js index 1087580b1..9c2f65731 100644 --- a/src/features/workspaces/components/WorkspacesDashboard.js +++ b/src/features/workspaces/components/WorkspacesDashboard.js | |||
@@ -49,7 +49,7 @@ const messages = defineMessages({ | |||
49 | }, | 49 | }, |
50 | }); | 50 | }); |
51 | 51 | ||
52 | const styles = () => ({ | 52 | const styles = { |
53 | table: { | 53 | table: { |
54 | width: '100%', | 54 | width: '100%', |
55 | '& td': { | 55 | '& td': { |
@@ -67,11 +67,8 @@ const styles = () => ({ | |||
67 | margin: [-8, 0, 0, 20], | 67 | margin: [-8, 0, 0, 20], |
68 | alignSelf: 'center', | 68 | alignSelf: 'center', |
69 | }, | 69 | }, |
70 | }); | 70 | }; |
71 | 71 | ||
72 | @inject('stores') | ||
73 | @injectSheet(styles) | ||
74 | @observer | ||
75 | class WorkspacesDashboard extends Component { | 72 | class WorkspacesDashboard extends Component { |
76 | static propTypes = { | 73 | static propTypes = { |
77 | classes: PropTypes.object.isRequired, | 74 | classes: PropTypes.object.isRequired, |
@@ -190,9 +187,13 @@ class WorkspacesDashboard extends Component { | |||
190 | } | 187 | } |
191 | } | 188 | } |
192 | 189 | ||
193 | export default injectIntl(WorkspacesDashboard); | 190 | export default injectIntl( |
191 | inject('stores')( | ||
192 | injectSheet(styles, { injectTheme: true })(observer(WorkspacesDashboard)), | ||
193 | ), | ||
194 | ); | ||
194 | 195 | ||
195 | WorkspacesDashboard.wrappedComponent.propTypes = { | 196 | WorkspacesDashboard.propTypes = { |
196 | stores: PropTypes.shape({ | 197 | stores: PropTypes.shape({ |
197 | ui: PropTypes.instanceOf(UIStore).isRequired, | 198 | ui: PropTypes.instanceOf(UIStore).isRequired, |
198 | }).isRequired, | 199 | }).isRequired, |