Browse Source

fix

feature/add_provider_popi^2
weige 2 months ago
parent
commit
0e9a76b28e
  1. 18
      src/components/WorkflowCanvas.tsx

18
src/components/WorkflowCanvas.tsx

@ -2776,23 +2776,6 @@ export function WorkflowCanvas() {
</button> </button>
) : undefined; ) : undefined;
// Optional toggle for input nodes
const isInputNode = node.type === "audioInput";
const isOptional = !!(node.data as any)?.isOptional;
const optionalToggle = isInputNode ? (
<button
onClick={() => updateNodeData(node.id, { isOptional: !isOptional })}
className={`nodrag nopan text-[10px] py-0.5 px-1.5 rounded transition-colors ${
isOptional
? "bg-amber-600/80 hover:bg-amber-500/80 text-white border border-amber-500/50"
: "bg-neutral-700 hover:bg-neutral-600 border border-neutral-600 text-neutral-400"
}`}
title={isOptional ? t("node.optionalTitle") : t("node.markOptionalTitle")}
>
{isOptional ? t("common.optional") : t("common.required")}
</button>
) : undefined;
// Fallback shield button for generation nodes // Fallback shield button for generation nodes
const isGenerationNode = const isGenerationNode =
node.type === "nanoBanana" || node.type === "nanoBanana" ||
@ -2871,7 +2854,6 @@ export function WorkflowCanvas() {
{fallbackButton} {fallbackButton}
</> </>
) : undefined} ) : undefined}
headerButtons={optionalToggle}
onCustomTitleChange={handleCustomTitleChange} onCustomTitleChange={handleCustomTitleChange}
onCommentChange={handleCommentChange} onCommentChange={handleCommentChange}
onRunNode={handleRunNode} onRunNode={handleRunNode}

Loading…
Cancel
Save