diff options
author | 2021-07-02 19:49:55 -0600 | |
---|---|---|
committer | 2021-07-03 07:19:55 +0530 | |
commit | 33123c354b79f7951423dd75097b11e7eb075f99 (patch) | |
tree | 29f6e857f02d0e0fc67d89a657a54a865ed5538a /src/features/workspaces/components | |
parent | Minor refactoring to move all runtime configs from 'config.js' into 'environm... (diff) | |
download | ferdium-app-33123c354b79f7951423dd75097b11e7eb075f99.tar.gz ferdium-app-33123c354b79f7951423dd75097b11e7eb075f99.tar.zst ferdium-app-33123c354b79f7951423dd75097b11e7eb075f99.zip |
Upgrade various dependencies to latest part 2 (#1557)
* Upgrade various dependencies to latest, remove unnecessary electron-hunspell
- upgrade eslint and friends to latest
- remove deprecated 'node-sass' in favor of 'sass'
- disable new rules from 'eslint-config-airbnb' that are conflicting with current code style
- add workspace config for 'vscode' that silences 'experimentalDecorator' warning and forces 'prettier' to single quote
* Run yarn lint to autofix with new ruleset and worked down lint issues to zero
Diffstat (limited to 'src/features/workspaces/components')
-rw-r--r-- | src/features/workspaces/components/EditWorkspaceForm.js | 23 | ||||
-rw-r--r-- | src/features/workspaces/components/WorkspacesDashboard.js | 8 |
2 files changed, 17 insertions, 14 deletions
diff --git a/src/features/workspaces/components/EditWorkspaceForm.js b/src/features/workspaces/components/EditWorkspaceForm.js index f23bc6cbf..0ff836cba 100644 --- a/src/features/workspaces/components/EditWorkspaceForm.js +++ b/src/features/workspaces/components/EditWorkspaceForm.js | |||
@@ -40,7 +40,8 @@ const messages = defineMessages({ | |||
40 | }, | 40 | }, |
41 | keepLoadedInfo: { | 41 | keepLoadedInfo: { |
42 | id: 'settings.workspace.form.keepLoadedInfo', | 42 | id: 'settings.workspace.form.keepLoadedInfo', |
43 | defaultMessage: '!!!*This option will be overwritten by the global "Keep all workspaces loaded" option.', | 43 | defaultMessage: |
44 | '!!!*This option will be overwritten by the global "Keep all workspaces loaded" option.', | ||
44 | }, | 45 | }, |
45 | servicesInWorkspaceHeadline: { | 46 | servicesInWorkspaceHeadline: { |
46 | id: 'settings.workspace.form.servicesInWorkspaceHeadline', | 47 | id: 'settings.workspace.form.servicesInWorkspaceHeadline', |
@@ -68,7 +69,8 @@ const styles = () => ({ | |||
68 | }, | 69 | }, |
69 | }); | 70 | }); |
70 | 71 | ||
71 | @injectSheet(styles) @observer | 72 | @injectSheet(styles) |
73 | @observer | ||
72 | class EditWorkspaceForm extends Component { | 74 | class EditWorkspaceForm extends Component { |
73 | static contextTypes = { | 75 | static contextTypes = { |
74 | intl: intlShape, | 76 | intl: intlShape, |
@@ -86,6 +88,7 @@ class EditWorkspaceForm extends Component { | |||
86 | 88 | ||
87 | form = this.prepareWorkspaceForm(this.props.workspace); | 89 | form = this.prepareWorkspaceForm(this.props.workspace); |
88 | 90 | ||
91 | // eslint-disable-next-line react/no-deprecated | ||
89 | componentWillReceiveProps(nextProps) { | 92 | componentWillReceiveProps(nextProps) { |
90 | const { workspace } = this.props; | 93 | const { workspace } = this.props; |
91 | if (workspace.id !== nextProps.workspace.id) { | 94 | if (workspace.id !== nextProps.workspace.id) { |
@@ -164,16 +167,14 @@ class EditWorkspaceForm extends Component { | |||
164 | </Link> | 167 | </Link> |
165 | </span> | 168 | </span> |
166 | <span className="separator" /> | 169 | <span className="separator" /> |
167 | <span className="settings__header-item"> | 170 | <span className="settings__header-item">{workspace.name}</span> |
168 | {workspace.name} | ||
169 | </span> | ||
170 | </div> | 171 | </div> |
171 | <div className="settings__body"> | 172 | <div className="settings__body"> |
172 | <div className={classes.nameInput}> | 173 | <div className={classes.nameInput}> |
173 | <Input {...form.$('name').bind()} /> | 174 | <Input {...form.$('name').bind()} /> |
174 | <Toggle field={form.$('keepLoaded')} /> | 175 | <Toggle field={form.$('keepLoaded')} /> |
175 | <p className={`${classes.keepLoadedInfo} franz-form__label`}> | 176 | <p className={`${classes.keepLoadedInfo} franz-form__label`}> |
176 | { intl.formatMessage(messages.keepLoadedInfo) } | 177 | {intl.formatMessage(messages.keepLoadedInfo)} |
177 | </p> | 178 | </p> |
178 | </div> | 179 | </div> |
179 | <h2>{intl.formatMessage(messages.servicesInWorkspaceHeadline)}</h2> | 180 | <h2>{intl.formatMessage(messages.servicesInWorkspaceHeadline)}</h2> |
@@ -187,11 +188,13 @@ class EditWorkspaceForm extends Component { | |||
187 | </span> | 188 | </span> |
188 | {intl.formatMessage(messages.noServicesAdded)} | 189 | {intl.formatMessage(messages.noServicesAdded)} |
189 | </p> | 190 | </p> |
190 | <Link to="/settings/recipes" className="button">{intl.formatMessage(messages.discoverServices)}</Link> | 191 | <Link to="/settings/recipes" className="button"> |
192 | {intl.formatMessage(messages.discoverServices)} | ||
193 | </Link> | ||
191 | </div> | 194 | </div> |
192 | ) : ( | 195 | ) : ( |
193 | <Fragment> | 196 | <> |
194 | {services.map(s => ( | 197 | {services.map((s) => ( |
195 | <WorkspaceServiceListItem | 198 | <WorkspaceServiceListItem |
196 | key={s.id} | 199 | key={s.id} |
197 | service={s} | 200 | service={s} |
@@ -199,7 +202,7 @@ class EditWorkspaceForm extends Component { | |||
199 | onToggle={() => this.toggleService(s)} | 202 | onToggle={() => this.toggleService(s)} |
200 | /> | 203 | /> |
201 | ))} | 204 | ))} |
202 | </Fragment> | 205 | </> |
203 | )} | 206 | )} |
204 | </div> | 207 | </div> |
205 | </div> | 208 | </div> |
diff --git a/src/features/workspaces/components/WorkspacesDashboard.js b/src/features/workspaces/components/WorkspacesDashboard.js index a90bb37e9..cfaacd56e 100644 --- a/src/features/workspaces/components/WorkspacesDashboard.js +++ b/src/features/workspaces/components/WorkspacesDashboard.js | |||
@@ -184,7 +184,7 @@ class WorkspacesDashboard extends Component { | |||
184 | {getUserWorkspacesRequest.isExecuting ? ( | 184 | {getUserWorkspacesRequest.isExecuting ? ( |
185 | <Loader /> | 185 | <Loader /> |
186 | ) : ( | 186 | ) : ( |
187 | <Fragment> | 187 | <> |
188 | {/* ===== Workspace could not be loaded error ===== */} | 188 | {/* ===== Workspace could not be loaded error ===== */} |
189 | {getUserWorkspacesRequest.error ? ( | 189 | {getUserWorkspacesRequest.error ? ( |
190 | <Infobox | 190 | <Infobox |
@@ -197,7 +197,7 @@ class WorkspacesDashboard extends Component { | |||
197 | {intl.formatMessage(messages.workspacesRequestFailed)} | 197 | {intl.formatMessage(messages.workspacesRequestFailed)} |
198 | </Infobox> | 198 | </Infobox> |
199 | ) : ( | 199 | ) : ( |
200 | <Fragment> | 200 | <> |
201 | {workspaces.length === 0 ? ( | 201 | {workspaces.length === 0 ? ( |
202 | <div className="align-middle settings__empty-state"> | 202 | <div className="align-middle settings__empty-state"> |
203 | {/* ===== Workspaces empty state ===== */} | 203 | {/* ===== Workspaces empty state ===== */} |
@@ -222,9 +222,9 @@ class WorkspacesDashboard extends Component { | |||
222 | </tbody> | 222 | </tbody> |
223 | </table> | 223 | </table> |
224 | )} | 224 | )} |
225 | </Fragment> | 225 | </> |
226 | )} | 226 | )} |
227 | </Fragment> | 227 | </> |
228 | )} | 228 | )} |
229 | </> | 229 | </> |
230 | )} | 230 | )} |