Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
chore: tweak theme code
johnnyjoycde058c72ac5
diff --git a/web/src/components/MemoContent/MermaidBlock.tsx b/web/src/components/MemoContent/MermaidBlock.tsxindex 064d46081..ac5f377c3 100644--- a/web/src/components/MemoContent/MermaidBlock.tsx+++ b/web/src/components/MemoContent/MermaidBlock.tsx@@ -6,16 +6,14 @@ interface Props {}const MermaidBlock: React.FC<Props> = ({ content }: Props) => {+ const { mode: colorMode } = useColorScheme();const mermaidDockBlock = useRef<null>(null);- const { mode } = useColorScheme();-- const mermaidTheme = mode == "dark" ? "dark" : "default";useEffect(() => {// Dynamically import mermaid to ensure compatibility with Viteconst initializeMermaid = async () => {const mermaid = (await import("mermaid")).default;- mermaid.initialize({ startOnLoad: false, theme: mermaidTheme });+ mermaid.initialize({ startOnLoad: false, theme: colorMode == "dark" ? "dark" : "default" });if (mermaidDockBlock.current) {mermaid.run({nodes: [mermaidDockBlock.current],