diff options
author | 2020-03-31 14:09:05 +0100 | |
---|---|---|
committer | 2020-03-31 14:09:05 +0100 | |
commit | 899d2bf551e111bdc68608dba02e93782eec9f85 (patch) | |
tree | 2ead7fcc3a8f08d74af186931267e9021d21812e /src/containers/settings | |
parent | Retry flaky commands on AppVeyor (#526) (diff) | |
download | ferdium-app-899d2bf551e111bdc68608dba02e93782eec9f85.tar.gz ferdium-app-899d2bf551e111bdc68608dba02e93782eec9f85.tar.zst ferdium-app-899d2bf551e111bdc68608dba02e93782eec9f85.zip |
* add condition if on todo options
* add drop down for todo server
* fix error TODOS_FRONTEND
* add todo list apps'
* update name of dropdown menu to Todo Service
* add other service to dropdown menu and subsetting field for user to input url
* add Other Service to drop down
* fixed typos
* reverted wording
* fix custom field
* fix linting
* fix linting
* Delete tsconfig.tsbuildinfo
* Delete tsconfig.tsbuildinfo
* Delete tsconfig.tsbuildinfo
* Add regex to validate custom todo url
* Add note with source of regex function
* Move regex function declaration to function body root
* Apply code style
* Add migration for todo settings
* Apply code style
Co-authored-by: romain <romain@jumboprivacy.com>
Co-authored-by: Roman <46404814+yourcontact@users.noreply.github.com>
Co-authored-by: romain <rpsa@pm.me>
Diffstat (limited to 'src/containers/settings')
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index be251aa8b..64303e54f 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -11,7 +11,7 @@ import TodosStore from '../../features/todos/store'; | |||
11 | import Form from '../../lib/Form'; | 11 | import Form from '../../lib/Form'; |
12 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; | 12 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; |
13 | import { | 13 | import { |
14 | DEFAULT_APP_SETTINGS, HIBERNATION_STRATEGIES, SIDEBAR_WIDTH, ICON_SIZES, NAVIGATION_BAR_BEHAVIOURS, | 14 | DEFAULT_APP_SETTINGS, HIBERNATION_STRATEGIES, SIDEBAR_WIDTH, ICON_SIZES, NAVIGATION_BAR_BEHAVIOURS, TODO_APPS, |
15 | } from '../../config'; | 15 | } from '../../config'; |
16 | import { config as spellcheckerConfig } from '../../features/spellchecker'; | 16 | import { config as spellcheckerConfig } from '../../features/spellchecker'; |
17 | 17 | ||
@@ -20,8 +20,6 @@ import { getSelectOptions } from '../../helpers/i18n-helpers'; | |||
20 | import EditSettingsForm from '../../components/settings/settings/EditSettingsForm'; | 20 | import EditSettingsForm from '../../components/settings/settings/EditSettingsForm'; |
21 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 21 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
22 | 22 | ||
23 | import { TODOS_FRONTEND } from '../../environment'; | ||
24 | |||
25 | import globalMessages from '../../i18n/globalMessages'; | 23 | import globalMessages from '../../i18n/globalMessages'; |
26 | import { DEFAULT_IS_FEATURE_ENABLED_BY_USER } from '../../features/todos'; | 24 | import { DEFAULT_IS_FEATURE_ENABLED_BY_USER } from '../../features/todos'; |
27 | import WorkspacesStore from '../../features/workspaces/store'; | 25 | import WorkspacesStore from '../../features/workspaces/store'; |
@@ -76,10 +74,14 @@ const messages = defineMessages({ | |||
76 | id: 'settings.app.form.hibernationStrategy', | 74 | id: 'settings.app.form.hibernationStrategy', |
77 | defaultMessage: '!!!Hibernation strategy', | 75 | defaultMessage: '!!!Hibernation strategy', |
78 | }, | 76 | }, |
79 | todoServer: { | 77 | predefinedTodoServer: { |
80 | id: 'settings.app.form.todoServer', | 78 | id: 'settings.app.form.predefinedTodoServer', |
81 | defaultMessage: '!!!Todo Server', | 79 | defaultMessage: '!!!Todo Server', |
82 | }, | 80 | }, |
81 | customTodoServer: { | ||
82 | id: 'settings.app.form.customTodoServer', | ||
83 | defaultMessage: '!!!Custom TodoServer', | ||
84 | }, | ||
83 | enableLock: { | 85 | enableLock: { |
84 | id: 'settings.app.form.enableLock', | 86 | id: 'settings.app.form.enableLock', |
85 | defaultMessage: '!!!Enable Password Lock', | 87 | defaultMessage: '!!!Enable Password Lock', |
@@ -203,7 +205,8 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
203 | sentry: settingsData.sentry, | 205 | sentry: settingsData.sentry, |
204 | hibernate: settingsData.hibernate, | 206 | hibernate: settingsData.hibernate, |
205 | hibernationStrategy: settingsData.hibernationStrategy, | 207 | hibernationStrategy: settingsData.hibernationStrategy, |
206 | todoServer: settingsData.todoServer, | 208 | predefinedTodoServer: settingsData.predefinedTodoServer, |
209 | customTodoServer: settingsData.customTodoServer, | ||
207 | lockingFeatureEnabled: settingsData.lockingFeatureEnabled, | 210 | lockingFeatureEnabled: settingsData.lockingFeatureEnabled, |
208 | lockedPassword: settingsData.lockedPassword, | 211 | lockedPassword: settingsData.lockedPassword, |
209 | useTouchIdToUnlock: settingsData.useTouchIdToUnlock, | 212 | useTouchIdToUnlock: settingsData.useTouchIdToUnlock, |
@@ -275,6 +278,11 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
275 | sort: false, | 278 | sort: false, |
276 | }); | 279 | }); |
277 | 280 | ||
281 | const todoApp = getSelectOptions({ | ||
282 | locales: TODO_APPS, | ||
283 | sort: false, | ||
284 | }); | ||
285 | |||
278 | const sidebarWidth = getSelectOptions({ | 286 | const sidebarWidth = getSelectOptions({ |
279 | locales: SIDEBAR_WIDTH, | 287 | locales: SIDEBAR_WIDTH, |
280 | sort: false, | 288 | sort: false, |
@@ -354,10 +362,16 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
354 | options: hibernationStrategies, | 362 | options: hibernationStrategies, |
355 | default: DEFAULT_APP_SETTINGS.hibernationStrategy, | 363 | default: DEFAULT_APP_SETTINGS.hibernationStrategy, |
356 | }, | 364 | }, |
357 | todoServer: { | 365 | predefinedTodoServer: { |
358 | label: intl.formatMessage(messages.todoServer), | 366 | label: intl.formatMessage(messages.predefinedTodoServer), |
359 | value: settings.all.app.todoServer, | 367 | value: settings.all.app.predefinedTodoServer, |
360 | default: TODOS_FRONTEND, | 368 | default: DEFAULT_APP_SETTINGS.predefinedTodoServer, |
369 | options: todoApp, | ||
370 | }, | ||
371 | customTodoServer: { | ||
372 | label: intl.formatMessage(messages.customTodoServer), | ||
373 | value: settings.all.app.customTodoServer, | ||
374 | default: DEFAULT_APP_SETTINGS.customTodoServer, | ||
361 | }, | 375 | }, |
362 | lockingFeatureEnabled: { | 376 | lockingFeatureEnabled: { |
363 | label: intl.formatMessage(messages.enableLock), | 377 | label: intl.formatMessage(messages.enableLock), |
@@ -537,6 +551,8 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
537 | isDarkmodeEnabled={this.props.stores.settings.app.darkMode} | 551 | isDarkmodeEnabled={this.props.stores.settings.app.darkMode} |
538 | isTrayEnabled={this.props.stores.settings.app.enableSystemTray} | 552 | isTrayEnabled={this.props.stores.settings.app.enableSystemTray} |
539 | isAdaptableDarkModeEnabled={this.props.stores.settings.app.adaptableDarkMode} | 553 | isAdaptableDarkModeEnabled={this.props.stores.settings.app.adaptableDarkMode} |
554 | isTodosActivated={this.props.stores.todos.isFeatureEnabledByUser} | ||
555 | isUsingCustomTodoService={this.props.stores.todos.isUsingCustomTodoService} | ||
540 | openProcessManager={() => this.openProcessManager()} | 556 | openProcessManager={() => this.openProcessManager()} |
541 | /> | 557 | /> |
542 | </ErrorBoundary> | 558 | </ErrorBoundary> |