Files
pomoday-app/src/App.vue
Paul Spenke 09b4af9a6e 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.
2026-03-08 19:54:30 +01:00

37 lines
1.1 KiB
Vue

<script setup lang="ts">
import { useMediaQuery } from '@vueuse/core'
import { computed, onMounted } from 'vue'
import { useRouter } from 'vue-router'
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()
const currentPath = computed(() => router.currentRoute.value.path)
onMounted(fetchTasks)
</script>
<template>
<div :data-theme="settings.theme ?? 'default'" class="flex flex-col">
<main class="h-screen overflow-y-auto overflow-x-none w-screen max-w-screen border-t-2 border-primary">
<RouterView />
</main>
<template v-if="currentPath === '/'">
<template v-if="isMobile">
<MobileActions />
</template>
<template v-else>
<CreateInput />
<SettingsModal />
</template>
</template>
</div>
</template>