From 6e28d1530aa08b878f5082bbcd85a95f84f830e8 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Sat, 14 Feb 2026 21:34:49 -0800 Subject: chore: update build artifacts and finalize test improvements --- frontend/coverage/src/App.tsx.html | 163 ++++++++++++++++++++++++++++++++----- 1 file changed, 143 insertions(+), 20 deletions(-) (limited to 'frontend/coverage/src/App.tsx.html') diff --git a/frontend/coverage/src/App.tsx.html b/frontend/coverage/src/App.tsx.html index cd305cc..6ec66af 100644 --- a/frontend/coverage/src/App.tsx.html +++ b/frontend/coverage/src/App.tsx.html @@ -23,30 +23,30 @@
- 72.72% + 65.71% Statements - 16/22 + 23/35
- 62.5% + 60% Branches - 10/16 + 15/25
- 62.5% + 53.84% Functions - 5/8 + 7/13
- 72.72% + 64.7% Lines - 16/22 + 22/34
@@ -162,7 +162,48 @@ 97 98 99 -100  +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141        @@ -201,9 +242,28 @@       +  +  +  +  +  +  +  1x   1x +1x +  +  +  +  +  +  +1x +1x +  +  +1x       @@ -220,6 +280,12 @@       +  +  +  +  +  +        @@ -234,6 +300,12 @@       +  +  +  +  +  +2x 2x   2x @@ -242,9 +314,19 @@     2x +  +  +    2x   +2x +  +  +  +  +  +        @@ -299,31 +381,61 @@ import FeedList from './components/FeedList'; import FeedItems from './components/FeedItems'; import Settings from './components/Settings';   -function Dashboard({ theme, setTheme }: { theme: string; setTheme: (t: string) => void }) { - const [sidebarVisible, setSidebarVisible] = useState(true); +interface DashboardProps { + theme: string; + setTheme: (t: string) => void; + fontTheme: string; + setFontTheme: (t: string) => void; +} +  +function Dashboard({ theme, setTheme, fontTheme, setFontTheme }: DashboardProps) { + const [sidebarVisible, setSidebarVisible] = useState(window.innerWidth > 768); +  + useEffect(() => { + const handleResize = () => { + if (window.innerWidth > 768) { + setSidebarVisible(true); + } else { + setSidebarVisible(false); + } + }; + window.addEventListener('resize', handleResize); + return () => window.removeEventListener('resize', handleResize); + }, []);   return ( <div - className={`dashboard ${sidebarVisible ? 'sidebar-visible' : 'sidebar-hidden'} theme-${theme}`} + className={`dashboard ${sidebarVisible ? 'sidebar-visible' : 'sidebar-hidden'} theme-${theme} font-${fontTheme}`} > <div className="dashboard-content"> - {!sidebarVisible && ( - <button + {(!sidebarVisible || window.innerWidth <= 768) && ( + <button className="sidebar-toggle fixed-toggle" - onClick={() => setSidebarVisible(true)} - title="Show Sidebar" + onClick={() => setSidebarVisible(!sidebarVisible)} + title={sidebarVisible ? "Hide Sidebar" : "Show Sidebar"} > 🐱 </button> )} + {sidebarVisible && ( + <div + className="sidebar-backdrop" + onClick={() => setSidebarVisible(false)} + /> + )} <aside className={`dashboard-sidebar ${sidebarVisible ? '' : 'hidden'}`}> - <FeedList theme={theme} setTheme={setTheme} setSidebarVisible={setSidebarVisible} /> + <FeedList + theme={theme} + setTheme={setTheme} + setSidebarVisible={setSidebarVisible} + isMobile={window.innerWidth <= 768} + /> </aside> <main className="dashboard-main"> <Routes> <Route path="/feed/:feedId" element={<FeedItems />} /> <Route path="/tag/:tagName" element={<FeedItems />} /> - <Route path="/settings" element={<Settings />} /> + <Route path="/settings" element={<Settings fontTheme={fontTheme} setFontTheme={setFontTheme} />} /> <Route path="/" element={<FeedItems />} /> </Routes> </main> @@ -334,11 +446,17 @@ function Dashboard({ theme, setTheme }: { theme: string; setTheme: (t: string) =   function App() { const [theme, setTheme] = useState(localStorage.getItem('neko-theme') || 'light'); + const [fontTheme, setFontTheme] = useState(localStorage.getItem('neko-font-theme') || 'default');   const handleSetTheme = (newTheme: string) => { setTheme(newTheme); localStorage.setItem('neko-theme', newTheme); }; +  + const handleSetFontTheme = (newFontTheme: string) => { + setFontTheme(newFontTheme); + localStorage.setItem('neko-font-theme', newFontTheme); + };   const basename = window.location.pathname.startsWith('/v2') ? '/v2' : '/';   @@ -350,7 +468,12 @@ function App() { path="/*" element={ <RequireAuth> - <Dashboard theme={theme} setTheme={handleSetTheme} /> + <Dashboard + theme={theme} + setTheme={handleSetTheme} + fontTheme={fontTheme} + setFontTheme={handleSetFontTheme} + /> </RequireAuth> } /> @@ -367,7 +490,7 @@ export default App;