Browse Source

背景不透色

feature/composer
TianYun 4 weeks ago
parent
commit
88f3d8b2c3
  1. 11
      src/app/globals.css
  2. 2
      src/components/nodes/BaseNode.tsx

11
src/app/globals.css

@ -92,18 +92,19 @@ body {
/* Switch dimming - nodes downstream of disabled Switch outputs */ /* Switch dimming - nodes downstream of disabled Switch outputs */
.react-flow__node.switch-dimmed { .react-flow__node.switch-dimmed {
opacity: 0.4; filter: brightness(0.62) saturate(0.55);
transition: opacity 250ms ease-in-out; transition: filter 250ms ease-in-out;
} }
/* Skip dimming - nodes skipped due to optional empty inputs */ /* Skip dimming - nodes skipped due to optional empty inputs */
.react-flow__node.node-skipped { .react-flow__node.node-skipped {
opacity: 0.35; filter: brightness(0.55) saturate(0.45);
transition: opacity 250ms ease-in-out; transition: filter 250ms ease-in-out;
} }
.react-flow__node:not(.switch-dimmed):not(.node-skipped) { .react-flow__node:not(.switch-dimmed):not(.node-skipped) {
transition: opacity 250ms ease-in-out; filter: none;
transition: filter 250ms ease-in-out;
} }
/* Base handle styles */ /* Base handle styles */

2
src/components/nodes/BaseNode.tsx

@ -307,7 +307,7 @@ export function BaseNode({
className={` className={`
${hasExpandedSettings ? "flex-1 min-h-0 w-full" : "h-full w-full"} flex flex-col overflow-visible relative ${hasExpandedSettings ? "flex-1 min-h-0 w-full" : "h-full w-full"} flex flex-col overflow-visible relative
${fullBleed ${fullBleed
? `${settingsExpanded ? "rounded-t-lg border-b-0" : "rounded-lg"} bg-neutral-800/50 border border-neutral-700/40` ? `${settingsExpanded ? "rounded-t-lg border-b-0" : "rounded-lg"} bg-neutral-800 border border-neutral-700/60`
: `bg-neutral-800 ${settingsExpanded ? "rounded-t-lg border-b-0" : "rounded-lg"} shadow-lg border`} : `bg-neutral-800 ${settingsExpanded ? "rounded-t-lg border-b-0" : "rounded-lg"} shadow-lg border`}
${fullBleed ? "" : (isCurrentlyExecuting || isExecuting ? "border-blue-500 ring-1 ring-blue-500/20" : "border-neutral-700/60")} ${fullBleed ? "" : (isCurrentlyExecuting || isExecuting ? "border-blue-500 ring-1 ring-blue-500/20" : "border-neutral-700/60")}
${fullBleed ? "" : (hasError ? "border-red-500" : "")} ${fullBleed ? "" : (hasError ? "border-red-500" : "")}

Loading…
Cancel
Save