feat: update NodeConfigPanel and WorkflowConfigPanel for improved layout and scrolling functionality

This commit is contained in:
mlogclub
2026-06-28 22:47:50 +08:00
parent b83d33186f
commit 12d664e302
2 changed files with 71 additions and 68 deletions
@@ -104,7 +104,7 @@ export function NodeConfigPanel({
}
return (
<div className="flex h-full flex-col">
<div className="space-y-3 px-3 pb-3">
{showHeader ? (
<div className="border-b px-4 py-3">
<div className="flex items-start justify-between gap-2">
@@ -129,7 +129,7 @@ export function NodeConfigPanel({
</div>
</div>
) : null}
<div className="min-h-0 flex-1 space-y-3 overflow-y-auto px-3 pb-3">
<div className="space-y-3">
{inputSchema.length > 0 ? (
<ConfigCard title="输入" meta={`${inputSchema.length}`}>
<div className="space-y-3">
@@ -217,7 +217,7 @@ export function ConditionBranchConfigPanel({
}
return (
<div className="min-h-0 flex-1 space-y-3 overflow-y-auto px-3 pb-3">
<div className="space-y-3 px-3 pb-3">
<ConfigCard title="分支目标" meta={branch.default ? "默认" : "条件"}>
<div className="space-y-3">
<div className="space-y-1.5">
@@ -5,6 +5,7 @@ import { XIcon } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { ScrollArea } from "@/components/ui/scroll-area"
import type { AIWorkflowDefinition, AIWorkflowNodeSpec } from "@/lib/api/admin"
import type { SelectedWorkflowBranch } from "./workflow-branch-selection"
@@ -127,7 +128,9 @@ export function WorkflowConfigPanel({
<span className="h-12 w-1 rounded-full bg-slate-300/80 transition-colors group-hover:bg-blue-400" />
</div>
<section className="pointer-events-auto flex min-h-0 w-full flex-col overflow-hidden rounded-lg bg-white shadow-[0_18px_45px_rgba(15,23,42,0.18)] backdrop-blur">
<div className="shrink-0 p-3 pb-2">
<ScrollArea className="min-h-0 flex-1">
<div className="py-3">
<div className="px-3 pb-2">
<div className="overflow-hidden rounded-md border border-slate-200 bg-white">
<div className="px-3 py-3">
<div className="flex items-center justify-between gap-3">
@@ -174,7 +177,6 @@ export function WorkflowConfigPanel({
) : null}
</div>
</div>
<div className="min-h-0 flex-1">
{selectedBranchItem && selectedBranch ? (
<ConditionBranchConfigPanel
node={selectedNode}
@@ -197,6 +199,7 @@ export function WorkflowConfigPanel({
/>
)}
</div>
</ScrollArea>
</section>
</div>
)