From 9d3b2a90316a1a5f735845f61abbd8a875529060 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Sat, 14 Feb 2026 10:12:22 -0800 Subject: feat: add font theme support (fixing NK-rn4nzp) --- frontend/src/App.tsx | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'frontend/src/App.tsx') diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 74ae89e..1812451 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -36,12 +36,19 @@ 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 }) { +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(true); return (
{!sidebarVisible && ( @@ -60,7 +67,7 @@ function Dashboard({ theme, setTheme }: { theme: string; setTheme: (t: string) = } /> } /> - } /> + } /> } /> @@ -71,12 +78,18 @@ 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' : '/'; return ( @@ -87,7 +100,12 @@ function App() { path="/*" element={ - + } /> -- cgit v1.2.3