From 9c1c131603677371eab0e6b6956481a661f14628 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Fri, 13 Feb 2026 17:29:12 -0800 Subject: feat(v2/ui): add theme toggle and collapse sidebar by default (NK-gnxc6e, NK-k4y597) --- frontend/src/App.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'frontend/src/App.tsx') diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 7c6b11f..409878c 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -35,12 +35,12 @@ import FeedList from './components/FeedList'; import FeedItems from './components/FeedItems'; import Settings from './components/Settings'; -function Dashboard() { +function Dashboard({ theme, setTheme }: { theme: string, setTheme: (t: string) => void }) { const navigate = useNavigate(); - const [sidebarVisible, setSidebarVisible] = useState(true); + const [sidebarVisible, setSidebarVisible] = useState(false); return ( -
+

setSidebarVisible(!sidebarVisible)} style={{ cursor: 'pointer' }}>🐱

@@ -72,6 +72,13 @@ function Dashboard() { } function App() { + const [theme, setTheme] = useState(localStorage.getItem('neko-theme') || 'light'); + + const handleSetTheme = (newTheme: string) => { + setTheme(newTheme); + localStorage.setItem('neko-theme', newTheme); + }; + return ( @@ -80,7 +87,7 @@ function App() { path="/*" element={ - + } /> -- cgit v1.2.3