From 899d2bf551e111bdc68608dba02e93782eec9f85 Mon Sep 17 00:00:00 2001 From: Amine Date: Tue, 31 Mar 2020 14:09:05 +0100 Subject: #418 #477 Refactor Todo settings, add predefined Todo apps list * 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 Co-authored-by: Roman <46404814+yourcontact@users.noreply.github.com> Co-authored-by: romain --- .../settings/settings/EditSettingsForm.js | 38 ++++++++++++++-------- 1 file changed, 25 insertions(+), 13 deletions(-) (limited to 'src/components/settings') diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 5478ce8bf..f76378a3e 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js @@ -156,6 +156,7 @@ export default @observer class EditSettingsForm extends Component { cacheSize: PropTypes.string.isRequired, isSpellcheckerIncludedInCurrentPlan: PropTypes.bool.isRequired, isTodosEnabled: PropTypes.bool.isRequired, + isTodosActivated: PropTypes.bool.isRequired, isWorkspaceEnabled: PropTypes.bool.isRequired, noUpdates: PropTypes.bool.isRequired, hibernationEnabled: PropTypes.bool.isRequired, @@ -201,6 +202,7 @@ export default @observer class EditSettingsForm extends Component { isDarkmodeEnabled, isTrayEnabled, openProcessManager, + isTodosActivated, } = this.props; const { intl } = this.context; @@ -275,22 +277,32 @@ export default @observer class EditSettingsForm extends Component { {isTodosEnabled && ( <> - this.submit(e)} - field={form.$('todoServer')} - /> -

- { intl.formatMessage(messages.todoServerInfo) } -

+ {isTodosActivated && ( +
+ this.submit(e)} + field={form.$('customTodoServer')} + /> +

+ { intl.formatMessage(messages.todoServerInfo) } +

+
+ )} + + )} )} +
-- cgit v1.2.3-54-g00ecf