diff options
author | 2018-11-22 14:14:25 +0100 | |
---|---|---|
committer | 2018-11-22 14:14:25 +0100 | |
commit | 46b8c8c4b3a5b80e0187b284abc84566a7e784db (patch) | |
tree | 7fd378bcdd18e78c42dfeb61a15f89fd10106046 /src/components/settings/services/EditServiceForm.js | |
parent | ADD features loading spinner (diff) | |
parent | feat(App): Add option to enable dark mode for supported services (diff) | |
download | ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.tar.gz ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.tar.zst ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.zip |
Merge branch 'develop' into feature/features-api
Diffstat (limited to 'src/components/settings/services/EditServiceForm.js')
-rw-r--r-- | src/components/settings/services/EditServiceForm.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/settings/services/EditServiceForm.js b/src/components/settings/services/EditServiceForm.js index 3ffca99a7..777a95fcf 100644 --- a/src/components/settings/services/EditServiceForm.js +++ b/src/components/settings/services/EditServiceForm.js | |||
@@ -94,8 +94,7 @@ const messages = defineMessages({ | |||
94 | }, | 94 | }, |
95 | }); | 95 | }); |
96 | 96 | ||
97 | @observer | 97 | export default @observer class EditServiceForm extends Component { |
98 | export default class EditServiceForm extends Component { | ||
99 | static propTypes = { | 98 | static propTypes = { |
100 | recipe: PropTypes.instanceOf(Recipe).isRequired, | 99 | recipe: PropTypes.instanceOf(Recipe).isRequired, |
101 | service(props, propName) { | 100 | service(props, propName) { |
@@ -204,6 +203,8 @@ export default class EditServiceForm extends Component { | |||
204 | activeTabIndex = 2; | 203 | activeTabIndex = 2; |
205 | } | 204 | } |
206 | 205 | ||
206 | const requiresUserInput = !recipe.hasHostedOption && (recipe.hasTeamId || recipe.hasCustomUrl); | ||
207 | |||
207 | return ( | 208 | return ( |
208 | <div className="settings__main"> | 209 | <div className="settings__main"> |
209 | <div className="settings__header"> | 210 | <div className="settings__header"> |
@@ -305,6 +306,7 @@ export default class EditServiceForm extends Component { | |||
305 | 306 | ||
306 | <div className="settings__settings-group"> | 307 | <div className="settings__settings-group"> |
307 | <h3>{intl.formatMessage(messages.headlineGeneral)}</h3> | 308 | <h3>{intl.formatMessage(messages.headlineGeneral)}</h3> |
309 | <Toggle field={form.$('isDarkModeEnabled')} /> | ||
308 | <Toggle field={form.$('isEnabled')} /> | 310 | <Toggle field={form.$('isEnabled')} /> |
309 | </div> | 311 | </div> |
310 | </div> | 312 | </div> |
@@ -342,6 +344,7 @@ export default class EditServiceForm extends Component { | |||
342 | type="submit" | 344 | type="submit" |
343 | label={intl.formatMessage(messages.saveService)} | 345 | label={intl.formatMessage(messages.saveService)} |
344 | htmlForm="form" | 346 | htmlForm="form" |
347 | disabled={action !== 'edit' && form.isPristine && requiresUserInput} | ||
345 | /> | 348 | /> |
346 | )} | 349 | )} |
347 | </div> | 350 | </div> |