diff --git a/app/frontend/src/components/Mindmap/Mindmap.module.css b/app/frontend/src/components/Mindmap/Mindmap.module.css index a9824ff7..f8203f2b 100644 --- a/app/frontend/src/components/Mindmap/Mindmap.module.css +++ b/app/frontend/src/components/Mindmap/Mindmap.module.css @@ -23,6 +23,13 @@ margin-right: 5 px; } +.darkmindmap { + --markmap-code-bg: #000 !important; + --markmap-code-color: #fff !important; + --markmap-circle-open-bg: #222 !important; + --markmap-text-color: #ccc !important; +} + .answerText { white-space: pre-wrap; font-size: var(--fontSizeBase400); diff --git a/app/frontend/src/components/Mindmap/Mindmap.tsx b/app/frontend/src/components/Mindmap/Mindmap.tsx index 283c6926..1e8d7f94 100644 --- a/app/frontend/src/components/Mindmap/Mindmap.tsx +++ b/app/frontend/src/components/Mindmap/Mindmap.tsx @@ -1,6 +1,6 @@ import { Transformer } from "markmap-lib"; import { Markmap } from "markmap-view"; -import { useLayoutEffect, useRef, useState } from "react"; +import { useContext, useLayoutEffect, useRef, useState } from "react"; import styles from "./Mindmap.module.css"; import { Stack } from "@fluentui/react"; import { useTranslation } from "react-i18next"; @@ -8,6 +8,7 @@ import { Button, Tooltip } from "@fluentui/react-components"; import { ArrowDownload24Regular, ContentView24Regular, ScaleFill24Regular } from "@fluentui/react-icons"; import { AnswerIcon } from "../Answer/AnswerIcon"; import { IPureNode } from "markmap-common"; +import { LightContext } from "../../pages/layout/LightContext"; interface Props { markdown: string; } @@ -18,6 +19,7 @@ export const Mindmap = ({ markdown }: Props) => { const svgEl = useRef(null); const [isSourceView, setIsSourceView] = useState(false); const [freeplaneXML, setFreeplaneXML] = useState(""); + const isLight = useContext(LightContext); useLayoutEffect(() => { createMM(); @@ -153,7 +155,7 @@ export const Mindmap = ({ markdown }: Props) => { {!isSourceView ? (
- +
) : ( diff --git a/app/frontend/src/pages/layout/Layout.tsx b/app/frontend/src/pages/layout/Layout.tsx index 721ff7c7..4e4599f8 100644 --- a/app/frontend/src/pages/layout/Layout.tsx +++ b/app/frontend/src/pages/layout/Layout.tsx @@ -14,6 +14,7 @@ import { FluentProvider, Theme } from "@fluentui/react-components"; import { useStyles, STORAGE_KEYS, adjustTheme } from "./LayoutHelper"; import { DEFAULTLLM, LLMContext } from "../../components/LLMSelector/LLMContextProvider"; import { getBotName } from "../../service/storage"; +import { LightContext } from "./LightContext"; const formatDate = (date: Date) => { let formatted_date = date.getDate() + "-" + (date.getMonth() + 1) + "-" + date.getFullYear(); @@ -135,91 +136,99 @@ export const Layout = () => { return ( -
-
-
- - MUCGPT logo -

- {config.frontend.labels.env_name} -

- -
-
- (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)}> - MUCGPT - -
-
- (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)}> - {t("header.chat")} - -
-
- (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)} - > - {t("header.sum")} - -
-
- (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)}> - {t("header.brainstorm")} - -
- {simply && ( + +
+
+
+ + MUCGPT logo +

+ {config.frontend.labels.env_name} +

+ +
+
+ (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)}> + MUCGPT + +
+
+ (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)}> + {t("header.chat")} + +
- (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)}> - {t("header.simply")} + (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)} + > + {t("header.sum")} + +
+
+ (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)} + > + {t("header.brainstorm")} + +
+ {simply && ( +
+ (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)} + > + {t("header.simply")} + +
+ )} +
+ (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)} + > + {title[1]}
- )} -
- (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)} - > - {title[1]} - +
+
+
-
- -
-
-
- +
+ -
-
- Landeshauptstadt München
- RIT/it@M KICC
-
-
- -
-
-
+ + +
); }; diff --git a/app/frontend/src/pages/layout/LightContext.tsx b/app/frontend/src/pages/layout/LightContext.tsx new file mode 100644 index 00000000..6050e335 --- /dev/null +++ b/app/frontend/src/pages/layout/LightContext.tsx @@ -0,0 +1,3 @@ +import { createContext } from "react"; + +export const LightContext = createContext(true);