From 6cb006cc136f1fc5c83537cc30c64d223d1755e4 Mon Sep 17 00:00:00 2001 From: Solstice Date: Tue, 9 Jun 2026 00:22:18 -0700 Subject: feat: frontend view, state management, and user interface --- src/App.tsx | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 108 insertions(+), 5 deletions(-) (limited to 'src/App.tsx') diff --git a/src/App.tsx b/src/App.tsx index a6e3249..966e8e1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,11 +1,114 @@ +import { useEffect, useState, useCallback } from 'react'; +import { TimerView } from './components/TimerView'; +import { TaskList } from './components/TaskList'; +import { SettingsPanel } from './components/SettingsPanel'; +import { NotificationOverlay } from './components/NotificationOverlay'; +import { useTimerEvents } from './hooks/useTimerEvents'; +import { useTaskStore } from './store/taskStore'; +import { useSettingsStore } from './store/settingsStore'; + +function GearIcon() { + return ( + + + + + ); +} + function App() { + const [settingsOpen, setSettingsOpen] = useState(false); + const [notifVisible, setNotifVisible] = useState(false); + const [notifTaskId, setNotifTaskId] = useState(null); + + const fetchTasks = useTaskStore((s) => s.fetchTasks); + const fetchSettings = useSettingsStore((s) => s.fetchSettings); + + // Bootstrap data on mount + useEffect(() => { + fetchTasks(); + fetchSettings(); + }, [fetchTasks, fetchSettings]); + + const handleCompleted = useCallback((taskId: string | null) => { + setNotifTaskId(taskId); + setNotifVisible(true); + }, []); + + useTimerEvents(handleCompleted); + return ( -
-
-

Solstice

-

Pomodoro timer with ambient soundscapes.

+
+ {/* Sidebar */} + + + {/* Main area */} +
+ {/* Top bar */} +
+ +
+ + {/* Timer */} +
-
+ + {/* Overlays */} + setSettingsOpen(false)} /> + setNotifVisible(false)} + /> + ); } -- cgit v1.3-2-g0d8e