From 740faae8c8c44e70561f07da4bef86ea4247f911 Mon Sep 17 00:00:00 2001 From: Alex Hernandez Date: Sat, 21 Feb 2026 10:26:50 +1000 Subject: [PATCH] :lipstick: day/night themes --- src/renderer/App.tsx | 12 ++++++++-- .../components/Editor/MarkdownEditor.tsx | 18 +++++++------- src/renderer/store/editorStore.ts | 14 +++++++++++ src/renderer/styles/app.css | 19 +++++++++++++++ src/renderer/styles/global.css | 24 +++++++++++++++++++ 5 files changed, 76 insertions(+), 11 deletions(-) diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index 35e1caa..b6464ea 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -7,12 +7,13 @@ import { useEditorStore } from './store/editorStore' import './styles/app.css' export default function App(): JSX.Element { - const { setFileTree, activeFilePath, isDirty, markSaved, activeFileContent } = + const { setFileTree, activeFilePath, isDirty, markSaved, activeFileContent, theme, toggleTheme } = useEditorStore() - // Load file tree on mount + // Load file tree on mount and apply persisted theme useEffect(() => { window.api.listFiles().then(setFileTree) + document.documentElement.classList.toggle('light', theme === 'light') }, []) // Handle Cmd+S / Ctrl+S @@ -34,6 +35,13 @@ export default function App(): JSX.Element {
Hohoff Editor +