From 09b4af9a6ec8ce17431db9ffcf409e75df6d4a78 Mon Sep 17 00:00:00 2001 From: Paul Spenke Date: Sun, 8 Mar 2026 19:54:30 +0100 Subject: [PATCH] Refactor task management, UI interactions, and theme support - Added task editing functionality with `EditForm` and integrated it with `TodoItemTouch`. - Switched `dueDate` fields to `due_date` for consistency with API. - Updated `useTasks` to handle dynamic task updates, deletions, and periodic refresh. - Enhanced `useApi` with a dedicated delete method. - Improved UI responsiveness and styling with multi-theme support in DaisyUI. - Simplified modal handling for task interactions (`EditForm`, `CreateForm`). - Improved `useSettings` with a `theme` field to support theme switching. - Extended task commands for tagging, text, and due date updates. - Optimized `parser` for extended edit command parsing. - Updated helpers and actions to use `luxon` for date manipulations. - Streamlined task and view logic for improved usability and extensibility. --- src/App.vue | 4 +- src/components/CreateInput.vue | 8 +- src/components/MobileActions.vue | 13 +- src/components/TodoItem.vue | 6 +- src/components/TodoItemTouch.vue | 23 +- src/components/forms/CreateForm.vue | 20 +- src/components/forms/EditForm.vue | 36 +-- src/components/forms/SettingsForm.vue | 37 ++- src/composables/useActions.ts | 13 +- src/composables/useApi.ts | 4 + src/composables/useSettings.ts | 2 + src/composables/useTasks.ts | 24 +- src/styles/main.css | 329 +++++++++++++++++++++++++- src/types.ts | 2 +- src/utils/actions.ts | 35 +-- src/utils/helpers.ts | 12 +- src/utils/parser.ts | 5 +- 17 files changed, 469 insertions(+), 104 deletions(-) diff --git a/src/App.vue b/src/App.vue index 339736f..e2a5087 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,9 +6,11 @@ import CreateInput from './components/CreateInput.vue' import MobileActions from './components/MobileActions.vue' import SettingsModal from './components/SettingsModal.vue' +import { useSettings } from './composables/useSettings.ts' import { useTasks } from './composables/useTasks.ts' const isMobile = useMediaQuery('(pointer: coarse)') +const { settings } = useSettings() const { fetchTasks } = useTasks() const router = useRouter() @@ -17,7 +19,7 @@ onMounted(fetchTasks)