diff options
Diffstat (limited to 'src/containers/settings')
-rw-r--r-- | src/containers/settings/EditServiceScreen.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/containers/settings/EditServiceScreen.js b/src/containers/settings/EditServiceScreen.js index 560068efc..14c1ef41e 100644 --- a/src/containers/settings/EditServiceScreen.js +++ b/src/containers/settings/EditServiceScreen.js | |||
@@ -33,6 +33,10 @@ const messages = defineMessages({ | |||
33 | id: 'settings.service.form.enableService', | 33 | id: 'settings.service.form.enableService', |
34 | defaultMessage: '!!!Enable service', | 34 | defaultMessage: '!!!Enable service', |
35 | }, | 35 | }, |
36 | disableHibernation: { | ||
37 | id: 'settings.service.form.disableHibernation', | ||
38 | defaultMessage: '!!!Disable hibernation', | ||
39 | }, | ||
36 | enableNotification: { | 40 | enableNotification: { |
37 | id: 'settings.service.form.enableNotification', | 41 | id: 'settings.service.form.enableNotification', |
38 | defaultMessage: '!!!Enable Notifications', | 42 | defaultMessage: '!!!Enable Notifications', |
@@ -134,8 +138,11 @@ export default @inject('stores', 'actions') @observer class EditServiceScreen ex | |||
134 | 138 | ||
135 | const { | 139 | const { |
136 | stores, | 140 | stores, |
141 | router, | ||
137 | } = this.props; | 142 | } = this.props; |
138 | 143 | ||
144 | const { action } = router.params; | ||
145 | |||
139 | let defaultSpellcheckerLanguage = SPELLCHECKER_LOCALES[stores.settings.app.spellcheckerLanguage]; | 146 | let defaultSpellcheckerLanguage = SPELLCHECKER_LOCALES[stores.settings.app.spellcheckerLanguage]; |
140 | 147 | ||
141 | if (stores.settings.app.spellcheckerLanguage === 'automatic') { | 148 | if (stores.settings.app.spellcheckerLanguage === 'automatic') { |
@@ -160,6 +167,11 @@ export default @inject('stores', 'actions') @observer class EditServiceScreen ex | |||
160 | value: service.isEnabled, | 167 | value: service.isEnabled, |
161 | default: true, | 168 | default: true, |
162 | }, | 169 | }, |
170 | disableHibernation: { | ||
171 | label: intl.formatMessage(messages.disableHibernation), | ||
172 | value: action !== 'edit' ? false : service.disableHibernation, | ||
173 | default: false, | ||
174 | }, | ||
163 | isNotificationEnabled: { | 175 | isNotificationEnabled: { |
164 | label: intl.formatMessage(messages.enableNotification), | 176 | label: intl.formatMessage(messages.enableNotification), |
165 | value: service.isNotificationEnabled, | 177 | value: service.isNotificationEnabled, |
@@ -327,7 +339,9 @@ export default @inject('stores', 'actions') @observer class EditServiceScreen ex | |||
327 | } | 339 | } |
328 | 340 | ||
329 | render() { | 341 | render() { |
330 | const { recipes, services, user } = this.props.stores; | 342 | const { |
343 | recipes, services, user, settings, | ||
344 | } = this.props.stores; | ||
331 | const { action } = this.props.router.params; | 345 | const { action } = this.props.router.params; |
332 | 346 | ||
333 | let recipe; | 347 | let recipe; |
@@ -381,6 +395,7 @@ export default @inject('stores', 'actions') @observer class EditServiceScreen ex | |||
381 | isProxyFeatureEnabled={proxyFeature.isEnabled} | 395 | isProxyFeatureEnabled={proxyFeature.isEnabled} |
382 | isServiceProxyIncludedInCurrentPlan={proxyFeature.isIncludedInCurrentPlan} | 396 | isServiceProxyIncludedInCurrentPlan={proxyFeature.isIncludedInCurrentPlan} |
383 | isSpellcheckerIncludedInCurrentPlan={spellcheckerFeature.isIncludedInCurrentPlan} | 397 | isSpellcheckerIncludedInCurrentPlan={spellcheckerFeature.isIncludedInCurrentPlan} |
398 | isHibernationFeatureActive={settings.app.hibernate} | ||
384 | /> | 399 | /> |
385 | </ErrorBoundary> | 400 | </ErrorBoundary> |
386 | ); | 401 | ); |