From 4779c268e7d875fddd4bf9e67145d0f4d4adfc52 Mon Sep 17 00:00:00 2001 From: kang Date: Tue, 12 May 2026 16:50:05 +0800 Subject: [PATCH] auto-save 2026-05-12 16:49 (~3) --- .memory/worklog.json | 7 +++++++ web/app/globals.css | 17 +++++++++++++++++ web/app/page.tsx | 3 +++ 3 files changed, 27 insertions(+) diff --git a/.memory/worklog.json b/.memory/worklog.json index 51f517f..75fb4ad 100644 --- a/.memory/worklog.json +++ b/.memory/worklog.json @@ -83,6 +83,13 @@ "message": "auto-save 2026-05-12 16:38 (~1)", "hash": "1b95cb2", "files_changed": 1 + }, + { + "ts": "2026-05-12T16:44:35+08:00", + "type": "commit", + "message": "auto-save 2026-05-12 16:44 (~4)", + "hash": "63552af", + "files_changed": 4 } ] } diff --git a/web/app/globals.css b/web/app/globals.css index bf0d29c..23f5cce 100644 --- a/web/app/globals.css +++ b/web/app/globals.css @@ -241,6 +241,23 @@ 50% { box-shadow: 0 0 0 6px transparent; opacity: 0.7; } } +/* 覆盖 ReactFlow 内置 reserved type(input/output/default/group)的默认白底 + 提高 specificity:用 .react-flow 前缀确保盖过内置 CSS 变量 */ +.react-flow .react-flow__node-input, +.react-flow .react-flow__node-output, +.react-flow .react-flow__node-default, +.react-flow .react-flow__node-group { + background: transparent !important; + border: none !important; + padding: 0 !important; + border-radius: 0 !important; + width: auto !important; + font-size: inherit !important; + color: inherit !important; + text-align: left !important; + box-shadow: none !important; +} + /* 节点 handle(ReactFlow) */ .react-flow__handle { width: 12px !important; diff --git a/web/app/page.tsx b/web/app/page.tsx index 3945b3f..ffdc2ee 100644 --- a/web/app/page.tsx +++ b/web/app/page.tsx @@ -1,5 +1,6 @@ "use client" import { useCallback, useEffect, useMemo, useRef, useState } from "react" +import { useTheme } from "next-themes" import { ReactFlow, Background, BackgroundVariant, Controls, MiniMap, useNodesState, useEdgesState, @@ -58,6 +59,7 @@ const EDGES_RAW: Array<[string, string]> = [ ] export default function Home() { + const { resolvedTheme } = useTheme() const [job, setJob] = useState(null) const [submitting, setSubmitting] = useState(false) const [selectedFrames, setSelectedFrames] = useState>(new Set()) @@ -205,6 +207,7 @@ export default function Home() { onNodesChange={onNodesChange} onEdgesChange={onEdgesChange} nodeTypes={NODE_TYPES} + colorMode={resolvedTheme === "light" ? "light" : "dark"} fitView fitViewOptions={{ padding: 0.12 }} minZoom={0.4}