feat: added Timer screen

This commit is contained in:
Arduinum authored and Arduinum628 committed 2026-04-23 22:17:15 +03:00
1 parent a431f70c25
commit 46b8b181da
6 files changed
+433

No files matched your search

+31
View File
@@ -1,3 +1,6 @@
import type { Ref, ComputedRef } from 'vue';
/** Строка списка таймеров с основными полями */
export type TimersRow = {
id: number;
title: string;
@@ -5,4 +8,32 @@ export type TimersRow = {
count_pomodoro: number;
};
/** Тип для хранения результата COUNT-запроса */
export type CountRow = { cnt: number };
/** Полная строка таймера со всеми временными параметрами */
export type TimerRow = {
id: number;
title: string;
pomodoro_time: number;
break_time: number;
break_long_time: number;
count_pomodoro: number;
}
/** Параметры инициализации обратного отсчёта */
export type CountdownOptions = {
seconds: number;
onFinish?: () => void;
}
/** Возвращаемые значения и методы composable обратного отсчёта */
export type CountdownReturn = {
timeLeft: Ref<number>;
isRunning: Ref<boolean>;
formatted: ComputedRef<string>; // ЧЧ:ММ:СС
progress: Ref<number>;
start: () => void;
stop: () => void;
pause: () => void;
}