ac28530528
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 1s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m29s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m38s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m41s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 1m40s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 1m47s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 1m48s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 2m14s
AI Code Review / AI Code Review (pull_request) Failing after 3m29s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 5m10s
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 4m0s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 9s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 22s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 266h53m41s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 266h53m42s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 266h53m42s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 266h58m37s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 266h58m37s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 266h58m43s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 266h58m47s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 266h58m48s
CI/CD Pipeline / PR Build Worker Image (pull_request) Failing after 266h58m49s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 266h58m51s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 266h58m51s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 266h58m52s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 266h58m51s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 266h58m56s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 267h28m13s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 267h28m14s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 267h33m10s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 267h33m20s
CI/CD Pipeline / PR Build API Image (pull_request) Failing after 267h33m21s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 267h33m24s
- 预览纯前端化:N 个 FrontendPreviewPlayer 网格(CanvasPreviewGrid),variantSeed
让素材排布/起始点不同、画面有差异;不调任何后端渲染接口,秒开不占 worker;
seed=0 走旧逻辑保证 N=1 零回归
- 固定 6 步(单视频与批量一致):模板(弹数量) → 素材 → 配音 → 标题 → 确认生成 → 封面
- 第4步右侧批量标题:N 个独立输入框(AutoComplete 接标题库)+ AI 一键生成 N 个标题
(本地模板池同源)+ 主题词补填空标题;标题样式全局共用
- 第4步底部「✨ 确认生成 N 个视频」:按 PR#1701 契约提交 count +
titles[]/voice_library_ids[]/cover_urls[],成功后跳第5步
- 第5步「确认生成」:正式渲染实时进度,批量逐任务独立状态(BatchGenerationGrid,
部分失败不阻塞、失败卡片单独「重试此视频」走 POST /tasks/{id}/retry),
全部有终态后可进封面;单视频进度/失败/成功卡 + 右侧成片播放器
- 删除 useBatchPreview、ServerPreviewGrid 及 preview 渲染接口的所有前端调用
(后端接口保留);E2E 适配回 6 步断言
98 lines
2.7 KiB
TypeScript
98 lines
2.7 KiB
TypeScript
/**
|
|
* GeneratePage 步骤底部操作按钮(Issue #1677 修正:固定 6 步)
|
|
*
|
|
* 步骤 1~3:上一步 / 下一步
|
|
* 步骤 4(选择标题):「✨ 确认生成视频 / 确认生成 N 个视频」→ 创建正式生成任务,成功后跳步骤5
|
|
* 步骤 5(确认生成):渲染进度页,全部完成后「下一步:选择封面」;仅上一步
|
|
* 步骤 6(选择封面):仅上一步
|
|
*/
|
|
import React from "react"
|
|
|
|
export interface GenerateStepActionsProps {
|
|
currentStep: number
|
|
onPrev: () => void
|
|
onNext: () => void
|
|
/** 步骤4:确认生成视频(校验 + 创建渲染任务) */
|
|
onConfirmGenerate: () => void | Promise<void>
|
|
generating: boolean
|
|
generated: boolean
|
|
generateError: string | null
|
|
/** 批量模式下勾选的视频数量(N=1 时为1) */
|
|
selectedCount?: number
|
|
}
|
|
|
|
const GenerateStepActions: React.FC<GenerateStepActionsProps> = ({
|
|
currentStep,
|
|
onPrev,
|
|
onNext,
|
|
onConfirmGenerate,
|
|
generating,
|
|
generated,
|
|
generateError,
|
|
selectedCount = 1,
|
|
}) => {
|
|
const renderPrimaryButton = () => {
|
|
/* 步骤 1~3:上一步 / 下一步 */
|
|
if (currentStep < 4) {
|
|
return (
|
|
<button className="xx-btn xx-btn-primary" onClick={onNext}>
|
|
下一步 →
|
|
</button>
|
|
)
|
|
}
|
|
|
|
/* 步骤 4:选择标题 — 确认生成 */
|
|
if (currentStep === 4) {
|
|
if (generating) {
|
|
return (
|
|
<button className="xx-btn xx-btn-primary" disabled>
|
|
⏳ 正在提交生成任务…
|
|
</button>
|
|
)
|
|
}
|
|
if (generateError) {
|
|
return (
|
|
<button className="xx-btn xx-btn-primary" onClick={onConfirmGenerate}>
|
|
🔄 重新生成
|
|
</button>
|
|
)
|
|
}
|
|
return (
|
|
<button className="xx-btn xx-btn-primary" onClick={onConfirmGenerate}>
|
|
{selectedCount > 1 ? `✨ 确认生成 ${selectedCount} 个视频` : "✨ 确认生成视频"}
|
|
</button>
|
|
)
|
|
}
|
|
|
|
/* 步骤 5:确认生成进度页 — 全部完成后下一步进封面 */
|
|
if (currentStep === 5) {
|
|
if (generated) {
|
|
return (
|
|
<button className="xx-btn xx-btn-primary" onClick={onNext}>
|
|
下一步:选择封面 →
|
|
</button>
|
|
)
|
|
}
|
|
return (
|
|
<button className="xx-btn xx-btn-primary" disabled>
|
|
⏳ 视频渲染中…
|
|
</button>
|
|
)
|
|
}
|
|
|
|
/* 步骤 6(封面,最后一步):无主按钮 */
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<div className="xx-step-actions">
|
|
<button className="xx-btn xx-btn-ghost" onClick={onPrev} disabled={currentStep === 1}>
|
|
← 上一步
|
|
</button>
|
|
{renderPrimaryButton()}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default GenerateStepActions
|