diff options
author | 2021-07-23 17:48:50 +0000 | |
---|---|---|
committer | 2021-07-23 23:18:50 +0530 | |
commit | 0158c89b21ad6764866bb2770491a91c3516f362 (patch) | |
tree | 66564d8afea49b83ebcc71fd9e9e9b79c5e807f4 /src/containers/settings/EditSettingsScreen.js | |
parent | New Crowdin updates (#1678) (diff) | |
download | ferdium-app-0158c89b21ad6764866bb2770491a91c3516f362.tar.gz ferdium-app-0158c89b21ad6764866bb2770491a91c3516f362.tar.zst ferdium-app-0158c89b21ad6764866bb2770491a91c3516f362.zip |
Added a 'wakeUpStrategy' that the user can control to wake up a previously hibernated service (#1680)
Diffstat (limited to 'src/containers/settings/EditSettingsScreen.js')
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 5f29ee385..764078cb8 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -11,7 +11,7 @@ import Form from '../../lib/Form'; | |||
11 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; | 11 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; |
12 | import { | 12 | import { |
13 | HIBERNATION_STRATEGIES, SIDEBAR_WIDTH, ICON_SIZES, NAVIGATION_BAR_BEHAVIOURS, SEARCH_ENGINE_NAMES, TODO_APPS, | 13 | HIBERNATION_STRATEGIES, SIDEBAR_WIDTH, ICON_SIZES, NAVIGATION_BAR_BEHAVIOURS, SEARCH_ENGINE_NAMES, TODO_APPS, |
14 | DEFAULT_SETTING_KEEP_ALL_WORKSPACES_LOADED, DEFAULT_IS_FEATURE_ENABLED_BY_USER, | 14 | DEFAULT_SETTING_KEEP_ALL_WORKSPACES_LOADED, DEFAULT_IS_FEATURE_ENABLED_BY_USER, WAKE_UP_STRATEGIES, |
15 | } from '../../config'; | 15 | } from '../../config'; |
16 | import { DEFAULT_APP_SETTINGS, isMac } from '../../environment'; | 16 | import { DEFAULT_APP_SETTINGS, isMac } from '../../environment'; |
17 | 17 | ||
@@ -95,6 +95,10 @@ const messages = defineMessages({ | |||
95 | id: 'settings.app.form.hibernationStrategy', | 95 | id: 'settings.app.form.hibernationStrategy', |
96 | defaultMessage: '!!!Hibernation strategy', | 96 | defaultMessage: '!!!Hibernation strategy', |
97 | }, | 97 | }, |
98 | wakeUpStrategy: { | ||
99 | id: 'settings.app.form.wakeUpStrategy', | ||
100 | defaultMessage: '!!!Wake up strategy', | ||
101 | }, | ||
98 | predefinedTodoServer: { | 102 | predefinedTodoServer: { |
99 | id: 'settings.app.form.predefinedTodoServer', | 103 | id: 'settings.app.form.predefinedTodoServer', |
100 | defaultMessage: '!!!Todo Server', | 104 | defaultMessage: '!!!Todo Server', |
@@ -255,6 +259,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
255 | hibernate: settingsData.hibernate, | 259 | hibernate: settingsData.hibernate, |
256 | hibernateOnStartup: settingsData.hibernateOnStartup, | 260 | hibernateOnStartup: settingsData.hibernateOnStartup, |
257 | hibernationStrategy: settingsData.hibernationStrategy, | 261 | hibernationStrategy: settingsData.hibernationStrategy, |
262 | wakeUpStrategy: settingsData.wakeUpStrategy, | ||
258 | predefinedTodoServer: settingsData.predefinedTodoServer, | 263 | predefinedTodoServer: settingsData.predefinedTodoServer, |
259 | customTodoServer: settingsData.customTodoServer, | 264 | customTodoServer: settingsData.customTodoServer, |
260 | lockingFeatureEnabled: settingsData.lockingFeatureEnabled, | 265 | lockingFeatureEnabled: settingsData.lockingFeatureEnabled, |
@@ -334,6 +339,11 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
334 | sort: false, | 339 | sort: false, |
335 | }); | 340 | }); |
336 | 341 | ||
342 | const wakeUpStrategies = getSelectOptions({ | ||
343 | locales: WAKE_UP_STRATEGIES, | ||
344 | sort: false, | ||
345 | }); | ||
346 | |||
337 | const todoApp = getSelectOptions({ | 347 | const todoApp = getSelectOptions({ |
338 | locales: TODO_APPS, | 348 | locales: TODO_APPS, |
339 | sort: false, | 349 | sort: false, |
@@ -439,6 +449,12 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
439 | options: hibernationStrategies, | 449 | options: hibernationStrategies, |
440 | default: DEFAULT_APP_SETTINGS.hibernationStrategy, | 450 | default: DEFAULT_APP_SETTINGS.hibernationStrategy, |
441 | }, | 451 | }, |
452 | wakeUpStrategy: { | ||
453 | label: intl.formatMessage(messages.wakeUpStrategy), | ||
454 | value: settings.all.app.wakeUpStrategy, | ||
455 | options: wakeUpStrategies, | ||
456 | default: DEFAULT_APP_SETTINGS.wakeUpStrategy, | ||
457 | }, | ||
442 | predefinedTodoServer: { | 458 | predefinedTodoServer: { |
443 | label: intl.formatMessage(messages.predefinedTodoServer), | 459 | label: intl.formatMessage(messages.predefinedTodoServer), |
444 | value: settings.all.app.predefinedTodoServer, | 460 | value: settings.all.app.predefinedTodoServer, |