From 9f212d2f19106dec5c26650970c10a5ec77fbfd4 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Thu, 16 Jul 2026 22:34:47 +0800 Subject: [PATCH] style(webui): refine shared surface depth Add theme-neutral media keylines and layered card shadows so avatars, previews, pickers, and shared cards remain separated without relying on hard borders. Keep the message composer radius hierarchy concentric across appearance settings and remove redundant nested canvas surfaces from forwarded-message editors. This changes visual presentation only; message composition behavior and emitted payloads remain unchanged. --- .../src/components/debug/message-builder.tsx | 33 +++++++++++++++---- packages/webui/src/components/ui/avatar.tsx | 2 +- packages/webui/src/components/ui/card.tsx | 2 +- .../webui/src/components/ui/json-tree.tsx | 2 +- packages/webui/src/components/ui/picker.tsx | 6 ++-- packages/webui/src/index.css | 28 ++++++++++++++++ 6 files changed, 60 insertions(+), 13 deletions(-) diff --git a/packages/webui/src/components/debug/message-builder.tsx b/packages/webui/src/components/debug/message-builder.tsx index b2bee066..e9207b3e 100644 --- a/packages/webui/src/components/debug/message-builder.tsx +++ b/packages/webui/src/components/debug/message-builder.tsx @@ -128,11 +128,29 @@ export function MessageBuilder({ segments, onChange, uin, groupId, depth = 0 }: onChange(next); }; + // Keep the top-level canvas concentric with its rows at any operator-selected + // corner radius. At the default 12px radius this is 20px → 12px over the 8px + // inset. Nested forward builders deliberately avoid another canvas surface: + // cards-inside-cards add visual noise and cannot remain concentric with a + // parent row once the operator selects a compact radius. + const nested = depth > 0; + const canvasRadius = 'calc(var(--radius) + 0.5rem)'; + const rowRadius = depth === 0 + ? 'var(--radius)' + : depth === 1 + ? 'max(0px, calc(var(--radius) - 0.25rem))' + : 'max(0px, calc(var(--radius) - 0.5rem))'; + return ( - // A bounded "compose canvas" at every level — so the empty hint reads as an - // intentional empty state inside a defined region rather than a stray - // centered line floating in the left-aligned form (Apple-HIG alignment). -
空消息 — 点下方「添加段」开始
)} @@ -142,7 +160,8 @@ export function MessageBuilder({ segments, onChange, uin, groupId, depth = 0 }: key={s._id} onDragOver={(e) => e.preventDefault()} onDrop={(e) => { e.stopPropagation(); if (dragFrom !== null) move(dragFrom, i); setDragFrom(null); }} - className="rounded-xl border border-border/50 bg-card/60 p-2" + className="border border-border/50 bg-card/60 p-2" + style={{ borderRadius: rowRadius }} > {/* Drag is scoped to the grip handle only — making the whole row draggable hijacked text selection inside the segment inputs (you @@ -184,7 +203,7 @@ export function MessageBuilder({ segments, onChange, uin, groupId, depth = 0 }: