From c8209c6c104e96a1b45776ba3a3e2582d903c9ad Mon Sep 17 00:00:00 2001 From: konrad Date: Mon, 5 Jul 2021 10:29:04 +0000 Subject: [PATCH] Quick add magic for tasks (#570) Co-authored-by: kolaente Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/570 Co-authored-by: konrad Co-committed-by: konrad --- src/components/misc/keyboard-shortcuts.vue | 2 +- src/components/modal/modal.vue | 4 +- .../quick-actions/quick-actions.vue | 22 +- src/components/tasks/mixins/createTask.js | 124 ++++++ .../tasks/partials/quick-add-magic.vue | 82 ++++ src/helpers/parseDateOrNull.js | 4 + src/helpers/parseTaskText.js | 103 +++++ src/helpers/parseTaskText.test.js | 409 ++++++++++++++++++ src/helpers/replaceAll.js | 15 + src/helpers/time/parseDate.js | 290 +++++++++++++ src/i18n/lang/en.json | 22 + src/store/modules/lists.js | 6 + src/styles/components/_all.scss | 1 + src/styles/components/hint-modal.scss | 43 ++ src/styles/components/keyboard-shortcuts.scss | 39 -- src/views/filters/CreateSavedFilter.vue | 2 +- src/views/list/views/Kanban.vue | 32 +- src/views/list/views/List.vue | 156 +------ 18 files changed, 1136 insertions(+), 220 deletions(-) create mode 100644 src/components/tasks/mixins/createTask.js create mode 100644 src/components/tasks/partials/quick-add-magic.vue create mode 100644 src/helpers/parseTaskText.js create mode 100644 src/helpers/parseTaskText.test.js create mode 100644 src/helpers/replaceAll.js create mode 100644 src/helpers/time/parseDate.js create mode 100644 src/styles/components/hint-modal.scss diff --git a/src/components/misc/keyboard-shortcuts.vue b/src/components/misc/keyboard-shortcuts.vue index d0fb9d44..d87a005d 100644 --- a/src/components/misc/keyboard-shortcuts.vue +++ b/src/components/misc/keyboard-shortcuts.vue @@ -1,5 +1,5 @@