From a208e0b89cd402053954ed5c5f43ce7d6b4f4246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=A8await?= <1335360669@qq.com> Date: Thu, 17 Sep 2026 10:53:31 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E4=BC=98=E5=8C=96=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E9=80=89=E6=8B=A9=E5=99=A8=E4=BA=A4=E4=BA=92=E3=80=81?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E9=A1=B5=E5=88=86=E7=B1=BB=E7=95=99=E7=99=BD?= =?UTF-8?q?=E3=80=81=E6=9B=B4=E6=96=B0=E6=97=A5=E5=BF=97=E4=B8=8E=E6=9A=97?= =?UTF-8?q?=E9=BB=91=E6=A8=A1=E5=BC=8F=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/canvas/canvas-cloud-agent.css | 17 ++ .../layout/app-changelog-dialog.tsx | 2 +- web/src/components/model-picker.tsx | 10 +- web/src/lib/app-theme.ts | 17 ++ web/src/pages/plugins/index.tsx | 231 +++++++++--------- web/src/pages/plugins/plugins.css | 22 +- web/src/pages/projects/index.tsx | 2 + web/src/styles/globals.css | 91 ++++++- web/src/styles/workspace-product.css | 151 ++++++++++++ 9 files changed, 408 insertions(+), 135 deletions(-) diff --git a/web/src/components/canvas/canvas-cloud-agent.css b/web/src/components/canvas/canvas-cloud-agent.css index f3edc8ce4..640d61f09 100644 --- a/web/src/components/canvas/canvas-cloud-agent.css +++ b/web/src/components/canvas/canvas-cloud-agent.css @@ -8,6 +8,23 @@ z-index: calc(var(--z-modal-overlay) + 1000) !important; } +.agent-model-picker-popover .canvas-model-picker-menu { + width: min(340px, calc(100vw - 24px)) !important; + max-width: min(340px, calc(100vw - 24px)) !important; +} + +.agent-model-picker-popover .canvas-model-picker-two-pane { + grid-template-columns: minmax(0, 1fr) !important; +} + +.agent-model-picker-popover .canvas-model-picker-brand-rail { + display: none !important; +} + +.agent-model-picker-popover .canvas-model-picker-model-pane { + min-width: 0 !important; +} + /* Flex 子页必须允许收缩,长模型名和 Skill 文案不能决定窗口宽度。 */ .canvas-agent-panel > div, .canvas-agent-settings, diff --git a/web/src/components/layout/app-changelog-dialog.tsx b/web/src/components/layout/app-changelog-dialog.tsx index 32d7cf701..f25935047 100644 --- a/web/src/components/layout/app-changelog-dialog.tsx +++ b/web/src/components/layout/app-changelog-dialog.tsx @@ -11,7 +11,6 @@ export function AppChangelogDialog({ open, onClose }: { open: boolean; onClose: return ( @@ -30,6 +29,7 @@ export function AppChangelogDialog({ open, onClose }: { open: boolean; onClose: footer={null} centered onCancel={onClose} + styles={{ body: { padding: 0 } }} modalRender={(node) => ( {node} diff --git a/web/src/components/model-picker.tsx b/web/src/components/model-picker.tsx index 7414f94f5..17f6dfd37 100644 --- a/web/src/components/model-picker.tsx +++ b/web/src/components/model-picker.tsx @@ -258,7 +258,7 @@ export function ModelPicker({ disabledReason={disabledReason} showDescription={selected || previewedModel === displayModel} /> - {selected ? : null} + {selected ? : null} ); })} @@ -353,13 +353,17 @@ function ModelLabel({ - + {pickerModelDisplayName(config, model, showConfiguredModelName)} {capabilitySummary} - {showPrice ? : null} + {showPrice ? ( + + + + ) : null} {!creationVariant && meta.time ? ( {meta.time} diff --git a/web/src/lib/app-theme.ts b/web/src/lib/app-theme.ts index dc52613fd..219a2315b 100644 --- a/web/src/lib/app-theme.ts +++ b/web/src/lib/app-theme.ts @@ -354,6 +354,20 @@ export function getAntThemeConfig(dark: boolean, skinID: unknown = "classic"): T headerFontSize: 15, bodyPadding: 18, }, + Message: { + contentBg: elevatedBackground, + contentPadding: "10px 18px", + }, + Notification: { + colorBgElevated: elevatedBackground, + }, + Tooltip: { + colorBgSpotlight: elevatedBackground, + colorTextLightSolid: color.selectedFg, + }, + Popover: { + colorBgElevated: elevatedBackground, + }, }, }; } @@ -385,6 +399,9 @@ export function getWorkspaceAntThemeConfig(): ThemeConfig { Dropdown: { borderRadiusLG: 16, controlItemBgHover: "var(--user-surface-muted)", paddingBlock: 6 }, Modal: { borderRadiusLG: 20 }, Popconfirm: { borderRadiusLG: 16 }, + Message: { borderRadiusLG: 14, contentPadding: "10px 18px" }, + Notification: { borderRadiusLG: 18 }, + Tooltip: { borderRadius: 8 }, }, }; } diff --git a/web/src/pages/plugins/index.tsx b/web/src/pages/plugins/index.tsx index 80603a2ff..ad3ed4ea5 100644 --- a/web/src/pages/plugins/index.tsx +++ b/web/src/pages/plugins/index.tsx @@ -87,7 +87,6 @@ export default function PluginsPage() { const [detailsRestoreFocus, setDetailsRestoreFocus] = useState(false); const [search, setSearch] = useState(""); const [categoryFilter, setCategoryFilter] = useState("all"); - const [scrollTarget, setScrollTarget] = useState(null); const [statusFilter, setStatusFilter] = useState<"all" | "enabled" | "disabled">("all"); const [trustFilter, setTrustFilter] = useState<"all" | "trusted">("all"); const [eagleBaseUrl, setEagleBaseUrl] = useState("http://localhost:41595"); @@ -96,7 +95,6 @@ export default function PluginsPage() { const [eagleFolders, setEagleFolders] = useState([]); const [eagleFoldersLoading, setEagleFoldersLoading] = useState(false); const [eagleFoldersError, setEagleFoldersError] = useState(""); - const sectionRefs = useRef>({}); useEffect(() => { for (const plugin of builtinPlugins) ensurePlugin(plugin.manifest); @@ -168,24 +166,15 @@ export default function PluginsPage() { [categoryFilter, filteredPlugins], ); + const scrollContainerRef = useRef(null); + const selectCategory = (key: string) => { setCategoryFilter(key); - setScrollTarget(key === "all" ? null : key); + if (scrollContainerRef.current) { + scrollContainerRef.current.scrollTop = 0; + } }; - useEffect(() => { - if (!scrollTarget) return; - const section = sectionRefs.current[scrollTarget]; - if (!section) return; - - const frame = window.requestAnimationFrame(() => { - const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches; - section.scrollIntoView({ behavior: reducedMotion ? "auto" : "smooth", block: "start" }); - setScrollTarget(null); - }); - return () => window.cancelAnimationFrame(frame); - }, [pluginSections, scrollTarget]); - const categoryCounts = useMemo(() => { const visiblePlugins = registeredPlugins.filter((plugin) => user?.role === "admin" || features.systemPluginsVisibleToUsers || isOfficialApplicationPluginId(plugin.manifest.id)); const counts: Record = { all: visiblePlugins.length, text: 0, image: 0, video: 0, audio: 0, payment: 0, other: 0 }; @@ -248,7 +237,7 @@ export default function PluginsPage() { return (
-
+