Initial commit

This commit is contained in:
2025-11-22 13:34:07 +01:00
commit a652a6ac04
14 changed files with 2595 additions and 0 deletions

101
src/types.ts Normal file
View File

@@ -0,0 +1,101 @@
// ============ Types & Interfaces ============
export interface FocusTask {
id: string;
text: string;
completed: boolean;
estimatedMinutes: number;
actualMinutes: number;
createdAt: number;
completedAt?: number;
list: string;
notes: string;
scheduledDate?: string;
isActive: boolean;
}
export interface TaskList {
id: string;
name: string;
color: string;
icon: string;
}
export interface FocusTaskSettings {
pomodoroWorkMinutes: number;
pomodoroBreakMinutes: number;
longBreakMinutes: number;
longBreakInterval: number;
enableSounds: boolean;
enableCelebrations: boolean;
defaultEstimateMinutes: number;
lists: TaskList[];
showFloatingTimer: boolean;
autoStartBreak: boolean;
tickSoundEnabled: boolean;
}
export interface FocusTaskData {
tasks: FocusTask[];
completedToday: number;
totalFocusMinutesToday: number;
streak: number;
lastActiveDate: string;
pomodorosCompleted: number;
}
export const DEFAULT_SETTINGS: FocusTaskSettings = {
pomodoroWorkMinutes: 25,
pomodoroBreakMinutes: 5,
longBreakMinutes: 15,
longBreakInterval: 4,
enableSounds: true,
enableCelebrations: true,
defaultEstimateMinutes: 30,
lists: [
{ id: 'work', name: 'Work', color: '#6366f1', icon: '💼' },
{ id: 'personal', name: 'Personal', color: '#22c55e', icon: '🏠' },
{ id: 'learning', name: 'Learning', color: '#f59e0b', icon: '📚' },
],
showFloatingTimer: true,
autoStartBreak: false,
tickSoundEnabled: false,
};
export const DEFAULT_DATA: FocusTaskData = {
tasks: [],
completedToday: 0,
totalFocusMinutesToday: 0,
streak: 0,
lastActiveDate: '',
pomodorosCompleted: 0,
};
export const VIEW_TYPE_FOCUS_TASK = 'focus-task-view';
// ============ Celebration Messages ============
export const CELEBRATION_MESSAGES = [
{ emoji: '💥', message: 'Crushed it!' },
{ emoji: '🔥', message: 'On fire!' },
{ emoji: '⚡', message: 'Lightning fast!' },
{ emoji: '🎯', message: 'Bullseye!' },
{ emoji: '🚀', message: 'Blasting through!' },
{ emoji: '💪', message: 'Strong work!' },
{ emoji: '🌟', message: 'Stellar!' },
{ emoji: '✨', message: 'Brilliant!' },
{ emoji: '🏆', message: 'Champion!' },
{ emoji: '🎉', message: 'Well done!' },
];
export const EARLY_FINISH_MESSAGES = [
{ emoji: '⚡', message: 'Speed demon! Finished early!' },
{ emoji: '🏎️', message: 'Faster than expected!' },
{ emoji: '🎯', message: 'Under budget! Nice work!' },
];
export const OVERTIME_MESSAGES = [
{ emoji: '💪', message: 'Persistence pays off!' },
{ emoji: '🏃', message: 'Marathon runner!' },
{ emoji: '🔥', message: 'The grind is real!' },
];