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 --- src/stores/SettingsStore.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/stores/SettingsStore.js') diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index 71d4e1702..f83bc21ad 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js @@ -263,5 +263,24 @@ export default class SettingsStore extends Store { }, }); } + + if (!this.all.migration['5.4.4-beta.4-settings']) { + this.actions.settings.update({ + type: 'app', + data: { + todoServer: 'isUsingCustomTodoService', + customTodoServer: legacySettings.todoServer, + }, + }); + + this.actions.settings.update({ + type: 'migration', + data: { + '5.4.4-beta.4-settings': true, + }, + }); + + debug('Migrated old todo setting to new custom todo setting'); + } } } -- cgit v1.2.3-70-g09d2