2b120f5c65
CI/CD Pipeline / Validate - Code Quality (push) Failing after 0s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Failing after 0s
CI/CD Pipeline / Validate - Migration (alembic) (push) Failing after 0s
CI/CD Pipeline / Frontend Lint (push) Failing after 0s
CI/CD Pipeline / Integration Tests (push) Failing after 1s
CI/CD Pipeline / Frontend Unit Tests (push) Failing after 0s
CI/CD Pipeline / Unit Tests (push) Failing after 1s
CI/CD Pipeline / PR Build API Image (push) Has been cancelled
CI/CD Pipeline / PR Build Web Image (push) Has been cancelled
CI/CD Pipeline / PR Build Worker Image (push) Has been cancelled
CI/CD Pipeline / Build Staging API Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Check if frontend-only change (push) Failing after 1218h38m8s
56 lines
1.3 KiB
TypeScript
56 lines
1.3 KiB
TypeScript
/**
|
|
* GeneratePage 步骤底部操作按钮
|
|
*/
|
|
import React from "react"
|
|
import { ThunderboltOutlined } from "@ant-design/icons"
|
|
|
|
export interface GenerateStepActionsProps {
|
|
currentStep: number
|
|
onPrev: () => void
|
|
onNext: () => void
|
|
onGenerate: () => void
|
|
generating: boolean
|
|
generated: boolean
|
|
generateError: string | null
|
|
}
|
|
|
|
export const GenerateStepActions: React.FC<GenerateStepActionsProps> = ({
|
|
currentStep,
|
|
onPrev,
|
|
onNext,
|
|
onGenerate,
|
|
generating,
|
|
generated,
|
|
generateError,
|
|
}) => {
|
|
return (
|
|
<div className="xx-step-actions">
|
|
<button className="xx-btn xx-btn-ghost" onClick={onPrev} disabled={currentStep === 1}>
|
|
← 上一步
|
|
</button>
|
|
{currentStep < 7 ? (
|
|
<button className="xx-btn xx-btn-primary" onClick={onNext}>
|
|
下一步 →
|
|
</button>
|
|
) : (
|
|
<button
|
|
className="xx-btn xx-btn-primary"
|
|
onClick={onGenerate}
|
|
disabled={generating || (generated && !generateError)}
|
|
>
|
|
<ThunderboltOutlined />
|
|
{generating
|
|
? "生成中…"
|
|
: generated && !generateError
|
|
? "已生成"
|
|
: generateError
|
|
? "🔄 重新生成"
|
|
: "✨ 确认生成"}
|
|
</button>
|
|
)}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default GenerateStepActions
|