From 875eef0c15f5e10ebc1bed809cf682cd1e252bb4 Mon Sep 17 00:00:00 2001 From: tianma-if Date: Sat, 26 Sep 2026 00:17:10 +0800 Subject: [PATCH] fix(web): follow dark mode in the infographic editor The conversation column and empty preview stayed on a hardcoded white surface while slate text inverted, so dark mode showed a white slab. Use the card surface for the shell, and keep a white sheet only for light-theme graphics. --- apps/web/src/components/InfographicEditorPane.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/web/src/components/InfographicEditorPane.tsx b/apps/web/src/components/InfographicEditorPane.tsx index 83b38a0c..0d26f0c1 100644 --- a/apps/web/src/components/InfographicEditorPane.tsx +++ b/apps/web/src/components/InfographicEditorPane.tsx @@ -425,7 +425,9 @@ export default function InfographicEditorPane({ memo, repository, readOnly, onBa } catch (caught) { setError(caught instanceof Error ? caught.message : t("infographic.renderError")); } }; - return
+ const previewUsesLightSheet = Boolean(syntax.trim()) && syntax.split("\n")[1] !== "theme dark"; + + return
@@ -442,7 +444,7 @@ export default function InfographicEditorPane({ memo, repository, readOnly, onBa {history.map((turn) =>
{turn.prompt} - + {turn.response || (turn.kind === "clarified" ? t("infographic.historyClarified") : turn.kind === "failed" ? t("infographic.historyFailed") : t(turn.kind === "generated" ? "infographic.historyGenerated" : "infographic.historyRefined", { title: turn.resultTitle || t("infographic.name") }))} {turn.decision && turn.decision !== turn.response &&

{turn.decision}

} {turn.template &&

{turn.template}

} @@ -453,7 +455,7 @@ export default function InfographicEditorPane({ memo, repository, readOnly, onBa
)} {activeTurn &&
{activeTurn.prompt} - + {activeTurn.response || activeTurn.question || t("infographic.generating")} {activeTurn.decision && activeTurn.decision !== activeTurn.response &&

{activeTurn.decision}

} {activeTurn.template &&

{activeTurn.template}

} @@ -464,7 +466,7 @@ export default function InfographicEditorPane({ memo, repository, readOnly, onBa {!readOnly &&
-