diff --git a/app/canvas/[id]/page.tsx b/app/canvas/[id]/page.tsx index 64842cb5d..3ffc03557 100644 --- a/app/canvas/[id]/page.tsx +++ b/app/canvas/[id]/page.tsx @@ -513,6 +513,53 @@ const VIDEO_CANVAS_SIDEBAR_GROUPS: VideoCanvasSidebarGroup[] = [ }, ]; +const VIDEO_CANVAS_SIDEBAR_GROUP_STYLES: Record< + VideoCanvasSidebarGroup["id"], + { + iconBg: string; + iconBorder: string; + iconText: string; + rail: string; + } +> = { + input: { + iconBg: "#eef3ff", + iconBorder: "#dbe4ff", + iconText: "#5b76fe", + rail: "#dde5ff", + }, + analysis: { + iconBg: "#effaf4", + iconBorder: "#d9efe3", + iconText: "#46b078", + rail: "#dcefe5", + }, + storyboard: { + iconBg: "#fff7e8", + iconBorder: "#f7e7c8", + iconText: "#ca8f2d", + rail: "#f0dfbc", + }, + generation: { + iconBg: "#fff1f4", + iconBorder: "#f6dbe2", + iconText: "#dd5b7b", + rail: "#f1d9e0", + }, + tool: { + iconBg: "#f3f4f8", + iconBorder: "#e3e6ef", + iconText: "#63708a", + rail: "#e2e5ed", + }, + output: { + iconBg: "#eef7ff", + iconBorder: "#dbe9fb", + iconText: "#4d8ed8", + rail: "#d8e6f8", + }, +}; + function isPlainObject(value: unknown): value is Record { return Boolean(value) && typeof value === "object" && !Array.isArray(value); } @@ -1356,8 +1403,8 @@ export default function CanvasEditorPage({ params }: PageProps) { : null; const videoModuleSidebarWidth = isVideoMode ? isVideoModuleSidebarCollapsed - ? 60 - : 264 + ? 58 + : 236 : 0; const selectedWorkflowPanelLeft = isVideoMode ? videoModuleSidebarWidth + 24 @@ -8249,34 +8296,44 @@ export default function CanvasEditorPage({ params }: PageProps) { >
-
+
{isVideoModuleSidebarCollapsed ? (
- +
) : ( -
- +
+
-
+
视频模块
-
- 工作流分层添加 +
+ 工作流分层
)}
{isVideoModuleSidebarCollapsed ? ( -
+
{VIDEO_CANVAS_SIDEBAR_GROUPS.map((group) => { const GroupIcon = group.icon; + const groupStyle = + VIDEO_CANVAS_SIDEBAR_GROUP_STYLES[group.id]; return ( @@ -8317,9 +8377,11 @@ export default function CanvasEditorPage({ params }: PageProps) {
) : ( -
+
{VIDEO_CANVAS_SIDEBAR_GROUPS.map((group) => { const GroupIcon = group.icon; + const groupStyle = + VIDEO_CANVAS_SIDEBAR_GROUP_STYLES[group.id]; return ( -
- +
+
- +
- + {group.label} - + {group.description}
-
- +
+ {group.nodeTypes.length} -
-
+
+
{group.nodeTypes.map((type) => { const definition = getVideoWorkflowNodeDefinition(type); @@ -8371,7 +8443,7 @@ export default function CanvasEditorPage({ params }: PageProps) { getVideoWorkflowQuickConnectIcon(type); return ( ); })}