diff --git a/alfy-bot-frontend/src/components/AppHeader.vue b/alfy-bot-frontend/src/components/AppHeader.vue index cabd5a7..b151e07 100644 --- a/alfy-bot-frontend/src/components/AppHeader.vue +++ b/alfy-bot-frontend/src/components/AppHeader.vue @@ -3,6 +3,7 @@ import { ArrowLeft, Target, PanelLeftOpen } from 'lucide-vue-next' import { inject, ref, type Ref } from 'vue' import { useRouter } from 'vue-router' import { Button } from '@/components/ui/button' +import HeaderTimer from '@/features/task-timer/ui/HeaderTimer.vue' const props = defineProps<{ title: string @@ -13,6 +14,7 @@ const props = defineProps<{ const router = useRouter() const desktopSidebarCollapsed = inject>('desktopSidebarCollapsed', ref(false)) +const taskTimerAvailable = inject('taskTimerAvailable', false) diff --git a/alfy-bot-frontend/src/features/task-timer/model/timer-display-store.ts b/alfy-bot-frontend/src/features/task-timer/model/timer-display-store.ts new file mode 100644 index 0000000..b616660 --- /dev/null +++ b/alfy-bot-frontend/src/features/task-timer/model/timer-display-store.ts @@ -0,0 +1,11 @@ +import { useStorage } from '@vueuse/core' +import { defineStore } from 'pinia' +import { ref } from 'vue' + +/** Хранит локальный режим отображения таймера, не изменяя его сессию. */ +export const useTimerDisplayStore = defineStore('timer-display', () => { + const isQuiet = useStorage('alfy:timer:quiet', false) + const isFullscreen = ref(false) + + return { isQuiet, isFullscreen } +}) diff --git a/alfy-bot-frontend/src/features/task-timer/ui/HeaderTimer.vue b/alfy-bot-frontend/src/features/task-timer/ui/HeaderTimer.vue new file mode 100644 index 0000000..acb83c9 --- /dev/null +++ b/alfy-bot-frontend/src/features/task-timer/ui/HeaderTimer.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/alfy-bot-frontend/src/features/task-timer/ui/TimeBlock.vue b/alfy-bot-frontend/src/features/task-timer/ui/TimeBlock.vue index 0d36c72..72b0a26 100644 --- a/alfy-bot-frontend/src/features/task-timer/ui/TimeBlock.vue +++ b/alfy-bot-frontend/src/features/task-timer/ui/TimeBlock.vue @@ -1,12 +1,16 @@ @@ -75,27 +82,35 @@ onUnmounted(() => { leave-to-class="timer-leave-to" >
- - + + +
{{ store.namePhase }}
@@ -115,21 +130,17 @@ onUnmounted(() => {
+ -
@@ -185,12 +196,12 @@ onUnmounted(() => { /* Light */ .timer-work.timer-compact { - background-color: oklch(0.95 0.03 25); - border-color: oklch(0.88 0.05 25); + background-color: oklch(0.97 0.008 25); + border-color: oklch(0.88 0.02 25); } .timer-work.timer-fullscreen { - background-color: oklch(0.18 0.06 25 / 0.96); + background-color: oklch(0.18 0.012 25 / 0.96); } /* ── Break phase — soft blue ── */ @@ -207,8 +218,8 @@ onUnmounted(() => { /* ── Dark mode overrides ── */ .dark .timer-work.timer-compact { - background-color: oklch(0.25 0.06 25); - border-color: oklch(0.35 0.08 25); + background-color: oklch(0.22 0.012 25); + border-color: oklch(0.35 0.025 25); } .dark .timer-break.timer-compact { diff --git a/alfy-bot-frontend/src/features/task-timer/ui/TimerControls.vue b/alfy-bot-frontend/src/features/task-timer/ui/TimerControls.vue new file mode 100644 index 0000000..f44c479 --- /dev/null +++ b/alfy-bot-frontend/src/features/task-timer/ui/TimerControls.vue @@ -0,0 +1,34 @@ + + + diff --git a/alfy-bot-frontend/src/views/TasksLayout.vue b/alfy-bot-frontend/src/views/TasksLayout.vue index 4243886..66d99ea 100644 --- a/alfy-bot-frontend/src/views/TasksLayout.vue +++ b/alfy-bot-frontend/src/views/TasksLayout.vue @@ -6,11 +6,12 @@