diff --git a/app/dashboard/todo/page.tsx b/app/dashboard/todo/page.tsx index 566b03a..58efb0c 100644 --- a/app/dashboard/todo/page.tsx +++ b/app/dashboard/todo/page.tsx @@ -9,7 +9,7 @@ import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" import { getCurrentUser } from "@/lib/features/auth" import { getTranslations, getUserLanguage } from "@/lib/config" -import { Plus, Trash2, Check, X, CheckCircle2, Circle, Search, Filter, Play, Pause, RotateCcw, Coffee, Timer } from "lucide-react" +import { Plus, Trash2, Check, X, CheckCircle2, Circle, Search, Filter, Play, Pause, RotateCcw, Coffee, Timer, HelpCircle, Settings, Music } from "lucide-react" import { getTodos, createTodo, updateTodo, deleteTodo, type Todo as DBTodo } from "@/lib/database" interface Task { @@ -49,11 +49,16 @@ export default function TodoPage() { const [workDuration, setWorkDuration] = useState(25) const [breakDuration, setBreakDuration] = useState(5) const [showSettings, setShowSettings] = useState(false) + const [showPomodoroHelp, setShowPomodoroHelp] = useState(false) + const [showMusic, setShowMusic] = useState(false) + + // Toast notification state + const [toast, setToast] = useState<{ message: string; type: 'work' | 'break' } | null>(null) // Sound Effect const playNotificationSound = useCallback(() => { try { - const audio = new Audio('https://assets.mixkit.co/active_storage/sfx/2869/2869-preview.mp3') + const audio = new Audio('/sounds/timer-complete.mp3') audio.volume = 0.5 audio.play().catch(e => console.log('Audio play failed:', e)) } catch (e) { @@ -120,16 +125,19 @@ export default function TodoPage() { if (pomodoroMode === 'work') { // Work session completed setPomodoroSessions((s) => s + 1) - alert('Work session completed! Time for a break.') + setToast({ message: '🎉 Work session completed! Time for a break.', type: 'break' }) // Switch to break mode setPomodoroMode('break') setPomodoroTime(breakDuration * 60) } else { // Break completed - alert('Break is over! Ready for another session?') + setToast({ message: '💪 Break is over! Ready for another session?', type: 'work' }) setPomodoroMode('work') setPomodoroTime(workDuration * 60) } + + // Auto-dismiss toast after 5 seconds + setTimeout(() => setToast(null), 5000) } return () => { @@ -264,6 +272,25 @@ export default function TodoPage() { return (
🎵 Lofi Girl - beats to study/relax
+Now playing...
+Getting Started:
++ 💡 Tip: The classic Pomodoro uses 25 min work + 5 min break +
+