From 035002ceedf78d5ec73eabc0df7f06139939b967 Mon Sep 17 00:00:00 2001 From: Amine El Mouafik <412895+kytwb@users.noreply.github.com> Date: Mon, 8 Feb 2021 10:34:45 +0100 Subject: Synchronize with Franz 5.6.0 (#1033) Co-authored-by: FranzBot Co-authored-by: vantezzen Co-authored-by: Makazzz Co-authored-by: Stefan Malzner Co-authored-by: Amine Mouafik --- src/containers/settings/EditServiceScreen.js | 14 +++++++------- src/containers/settings/EditSettingsScreen.js | 5 +++++ 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'src/containers/settings') diff --git a/src/containers/settings/EditServiceScreen.js b/src/containers/settings/EditServiceScreen.js index 6aeecaa6d..d92d3bc07 100644 --- a/src/containers/settings/EditServiceScreen.js +++ b/src/containers/settings/EditServiceScreen.js @@ -33,9 +33,9 @@ const messages = defineMessages({ id: 'settings.service.form.enableService', defaultMessage: '!!!Enable service', }, - disableHibernation: { - id: 'settings.service.form.disableHibernation', - defaultMessage: '!!!Disable hibernation', + enableHibernation: { + id: 'settings.service.form.enableHibernation', + defaultMessage: '!!!Enable hibernation', }, enableNotification: { id: 'settings.service.form.enableNotification', @@ -167,10 +167,10 @@ export default @inject('stores', 'actions') @observer class EditServiceScreen ex value: service.isEnabled, default: true, }, - disableHibernation: { - label: intl.formatMessage(messages.disableHibernation), - value: action !== 'edit' ? false : service.disableHibernation, - default: false, + isHibernationEnabled: { + label: intl.formatMessage(messages.enableHibernation), + value: action !== 'edit' ? recipe.autoHibernate : service.isHibernationEnabled, + default: true, }, isNotificationEnabled: { label: intl.formatMessage(messages.enableNotification), diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 097f0ed8b..148bb2c53 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js @@ -25,6 +25,7 @@ import globalMessages from '../../i18n/globalMessages'; import { DEFAULT_IS_FEATURE_ENABLED_BY_USER } from '../../features/todos'; import WorkspacesStore from '../../features/workspaces/store'; import { DEFAULT_SETTING_KEEP_ALL_WORKSPACES_LOADED } from '../../features/workspaces'; +import ServicesStore from '../../stores/ServicesStore'; const messages = defineMessages({ autoLaunchOnStart: { @@ -587,6 +588,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e app, todos, workspaces, + services, } = this.props.stores; const { updateStatus, @@ -628,6 +630,8 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e isUsingCustomTodoService={this.props.stores.todos.isUsingCustomTodoService} isNightlyEnabled={this.props.stores.settings.app.nightly} openProcessManager={() => this.openProcessManager()} + hasAddedTodosAsService={services.isTodosServiceAdded} + isOnline={app.isOnline} /> ); @@ -639,6 +643,7 @@ EditSettingsScreen.wrappedComponent.propTypes = { app: PropTypes.instanceOf(AppStore).isRequired, user: PropTypes.instanceOf(UserStore).isRequired, settings: PropTypes.instanceOf(SettingsStore).isRequired, + services: PropTypes.instanceOf(ServicesStore).isRequired, todos: PropTypes.instanceOf(TodosStore).isRequired, workspaces: PropTypes.instanceOf(WorkspacesStore).isRequired, }).isRequired, -- cgit v1.2.3-54-g00ecf