调整 UI 编辑器工作流操作位置

将 AI 操作按钮和继续按钮对齐到操作卡右侧

保留当前步骤标题与运行状态在左侧
This commit is contained in:
2026-08-18 12:17:46 +08:00
parent 6df1639bb7
commit fce7de1cc8
@@ -27,31 +27,35 @@ export function WorkflowActionCard({
return (
<section className="shrink-0 border-b border-(--platform-subpanel-border) bg-(--platform-subpanel-fill) px-4 py-3">
<div className="flex items-center gap-2">
<h2 className="m-0 text-sm font-semibold">{action.label}</h2>
<button
type="button"
className="rounded-lg bg-orange-600 px-3 py-1.5 text-xs font-semibold text-white disabled:cursor-wait disabled:opacity-60"
disabled={controller.isAiRunning}
onClick={() => void action.action()}
>
{running ? action.runningLabel : hasRun ? '重新运行' : action.label}
</button>
{controller.nextStep ? (
<div className="flex items-center justify-between gap-2">
<div className="flex min-w-0 items-center gap-2">
<h2 className="m-0 text-sm font-semibold">{action.label}</h2>
{status ? (
<span className="min-w-0 truncate text-xs text-(--platform-text-soft)">
{status}
</span>
) : null}
</div>
<div className="ml-auto flex shrink-0 items-center gap-2">
<button
type="button"
className="rounded-lg border border-(--platform-subpanel-border) px-3 py-1.5 text-xs disabled:cursor-wait disabled:opacity-60"
className="rounded-lg bg-orange-600 px-3 py-1.5 text-xs font-semibold text-white disabled:cursor-wait disabled:opacity-60"
disabled={controller.isAiRunning}
onClick={controller.continueToNextStep}
onClick={() => void action.action()}
>
{running ? action.runningLabel : hasRun ? '重新运行' : action.label}
</button>
) : null}
{status ? (
<span className="min-w-0 truncate text-xs text-(--platform-text-soft)">
{status}
</span>
) : null}
{controller.nextStep ? (
<button
type="button"
className="rounded-lg border border-(--platform-subpanel-border) px-3 py-1.5 text-xs disabled:cursor-wait disabled:opacity-60"
disabled={controller.isAiRunning}
onClick={controller.continueToNextStep}
>
</button>
) : null}
</div>
</div>
</section>
);