From a787a972215012f95558fce66f2e6cf10b76c16c Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 5 Apr 2026 02:46:07 +0800 Subject: [PATCH] Make video canvas surfaces opaque --- app/canvas/[id]/page.tsx | 22 +++++++++++----------- components/canvas/CanvasWorkspace.tsx | 8 ++++---- components/canvas/nodes/WorkflowNode.tsx | 22 +++++++++++----------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/app/canvas/[id]/page.tsx b/app/canvas/[id]/page.tsx index 18121347a..4ffda8086 100644 --- a/app/canvas/[id]/page.tsx +++ b/app/canvas/[id]/page.tsx @@ -419,19 +419,19 @@ const AGENT_RESULT_MODE_LABELS: Record = sku_replacement: "SKU 替换", }; const VIDEO_CANVAS_PANEL_CLASS = - "pointer-events-auto overflow-hidden rounded-[28px] border border-border/60 bg-background/94 shadow-2xl backdrop-blur-xl supports-[backdrop-filter]:bg-background/80"; + "pointer-events-auto overflow-hidden rounded-[28px] border border-border/60 bg-background shadow-2xl"; const VIDEO_CANVAS_PANEL_BADGE_CLASS = - "border-border/60 bg-background/82 text-foreground/75"; + "border-border/60 bg-background text-foreground/75"; const VIDEO_CANVAS_SUBSECTION_CLASS = - "rounded-2xl border border-border/60 bg-background/72 p-3"; + "rounded-2xl border border-border/60 bg-background p-3"; const VIDEO_CANVAS_TOOLBAR_CLASS = - "flex items-center gap-1.5 rounded-[28px] border border-border/60 bg-background/94 px-2.5 py-1.5 shadow-2xl backdrop-blur-xl supports-[backdrop-filter]:bg-background/82"; + "flex items-center gap-1.5 rounded-[28px] border border-border/60 bg-background px-2.5 py-1.5 shadow-2xl"; const VIDEO_CANVAS_TOOLBAR_BUTTON_CLASS = - "h-9 w-9 rounded-xl border border-transparent text-foreground/75 hover:border-border/60 hover:bg-background/88 hover:text-foreground"; + "h-9 w-9 rounded-xl border border-transparent text-foreground/75 hover:border-border/60 hover:bg-background hover:text-foreground"; const VIDEO_CANVAS_TOOLBAR_ACTIVE_BUTTON_CLASS = "border-border/60 bg-background text-foreground shadow-sm hover:bg-background"; const VIDEO_CANVAS_COMPACT_CONTROLS_CLASS = - "rounded-full border border-border/60 bg-background/92 px-2 py-1 shadow-sm backdrop-blur-xl supports-[backdrop-filter]:bg-background/80"; + "rounded-full border border-border/60 bg-background px-2 py-1 shadow-sm"; function buildScopedCanvasChatId(projectId: string, scope: "agent-mode") { const normalized = String(projectId || "").trim().toLowerCase().replace(/-/g, ""); @@ -7110,7 +7110,7 @@ export default function CanvasEditorPage({ params }: PageProps) { key={`${selectedVideoWorkflowDefinition.type}-${item.type}`} size="sm" variant="secondary" - className="rounded-full border border-border/60 bg-background/82 hover:bg-background" + className="rounded-full border border-border/60 bg-background hover:bg-background" onClick={() => handleAddWorkflowNode(item.type)} > {item.label} @@ -7245,7 +7245,7 @@ export default function CanvasEditorPage({ params }: PageProps) { variant="secondary" onClick={() => void handleOpenSelectedWorkflowInAgent()} disabled={isAnyWorkflowExecutionRunning} - className="w-full rounded-2xl border border-border/60 bg-background/82 hover:bg-background" + className="w-full rounded-2xl border border-border/60 bg-background hover:bg-background" > {isSelectedWorkflowAgentRunning ? ( <> @@ -7267,7 +7267,7 @@ export default function CanvasEditorPage({ params }: PageProps) { variant="secondary" onClick={() => void handleCreateSelectedAgentResultBranches()} disabled={isAnyWorkflowExecutionRunning} - className="w-full rounded-2xl border border-border/60 bg-background/82 hover:bg-background" + className="w-full rounded-2xl border border-border/60 bg-background hover:bg-background" > {isSelectedWorkflowBranchRunning ? ( <> @@ -7286,7 +7286,7 @@ export default function CanvasEditorPage({ params }: PageProps) { variant="secondary" onClick={() => void handleRunStoryboardBatch()} disabled={isAnyWorkflowExecutionRunning} - className="w-full rounded-2xl border border-border/60 bg-background/82 hover:bg-background" + className="w-full rounded-2xl border border-border/60 bg-background hover:bg-background" > {isSelectedWorkflowBatchRunning ? ( <> @@ -7548,7 +7548,7 @@ export default function CanvasEditorPage({ params }: PageProps) {
视频工作流节点库
diff --git a/components/canvas/CanvasWorkspace.tsx b/components/canvas/CanvasWorkspace.tsx index b5a96d743..0f4b2f624 100644 --- a/components/canvas/CanvasWorkspace.tsx +++ b/components/canvas/CanvasWorkspace.tsx @@ -66,10 +66,10 @@ export function CanvasWorkspace({ const WORKFLOW_HANDLE_SIZE = 16; const isWorkflowCanvas = workspaceVariant === "video"; const overlayPanelClassName = isWorkflowCanvas - ? "rounded-full border border-border/60 bg-background/92 px-3 py-1.5 text-xs text-muted-foreground shadow-sm backdrop-blur-xl supports-[backdrop-filter]:bg-background/80" + ? "rounded-full border border-border/60 bg-background px-3 py-1.5 text-xs text-muted-foreground shadow-sm" : "bg-background/80 backdrop-blur-sm rounded-md px-2 py-1 text-xs text-muted-foreground"; const zoomOverlayClassName = isWorkflowCanvas - ? "absolute bottom-4 right-4 rounded-full border border-border/60 bg-background/92 shadow-sm backdrop-blur-xl supports-[backdrop-filter]:bg-background/80" + ? "absolute bottom-4 right-4 rounded-full border border-border/60 bg-background shadow-sm" : "absolute bottom-4 right-4 bg-background/80 backdrop-blur-sm rounded-lg flex items-center gap-1 px-1 py-1 shadow-sm border border-border/50"; type SnapGuideLines = { @@ -1325,7 +1325,7 @@ export function CanvasWorkspace({ className={cn( "px-4 py-2 text-sm text-primary shadow-sm", isWorkflowCanvas - ? "rounded-full border border-primary/20 bg-background/92 backdrop-blur-xl" + ? "rounded-full border border-primary/20 bg-background" : "rounded-md bg-background/90" )} > @@ -1555,7 +1555,7 @@ export function CanvasWorkspace({ className={cn( "h-8 gap-1.5 px-3 text-xs shadow-sm border border-border/60", isWorkflowCanvas && - "rounded-full bg-background/92 backdrop-blur-xl supports-[backdrop-filter]:bg-background/80" + "rounded-full bg-background" )} onClick={handleDownloadSelectedImages} disabled={isDownloadSubmitting} diff --git a/components/canvas/nodes/WorkflowNode.tsx b/components/canvas/nodes/WorkflowNode.tsx index 95d36b7af..fa9d649fe 100644 --- a/components/canvas/nodes/WorkflowNode.tsx +++ b/components/canvas/nodes/WorkflowNode.tsx @@ -146,16 +146,16 @@ export function WorkflowNode({ node, isSelected }: WorkflowNodeProps) { const accentGlow = toAlphaColor(accentColor, 0.18) || "rgba(59, 130, 246, 0.12)"; const accentLine = toAlphaColor(accentColor, 0.3) || "rgba(59, 130, 246, 0.2)"; const sectionClassName = - "rounded-2xl border border-border/60 bg-background/74 p-3 shadow-[inset_0_1px_0_rgba(255,255,255,0.3)]"; + "rounded-2xl border border-border/60 bg-background p-3 shadow-[inset_0_1px_0_rgba(255,255,255,0.3)]"; const mutedKickerClassName = "text-[11px] uppercase tracking-[0.18em] text-muted-foreground/80"; - const itemClassName = "rounded-xl border border-border/50 bg-background/88 px-3 py-2"; - const badgeClassName = "border-border/60 bg-background/82 text-foreground/80"; + const itemClassName = "rounded-xl border border-border/50 bg-background px-3 py-2"; + const badgeClassName = "border-border/60 bg-background text-foreground/80"; return (
- + {groupMeta.label} @@ -212,7 +212,7 @@ export function WorkflowNode({ node, isSelected }: WorkflowNodeProps) { {batchFailedCount > 0 ? ( 失败 {batchFailedCount} @@ -227,7 +227,7 @@ export function WorkflowNode({ node, isSelected }: WorkflowNodeProps) { ) : null} {previewUrl ? ( -
+
{previewKind === "video" ? (