style: reformat GenerateStepActions.tsx with repo prettier config (#1899 #1900)
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 1s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 3s
CI/CD Pipeline / Validate - Style (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Security (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been cancelled
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / PR Build API Image (pull_request) Has been cancelled
CI/CD Pipeline / PR Build Web Image (pull_request) Has been cancelled
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Staging API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
AI Code Review / AI Code Review (pull_request) Has been cancelled
PR Automation / Auto Approve on CI Green (pull_request) Has been cancelled
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been cancelled
Preview Deploy / Deploy Preview Environment (pull_request) Has been cancelled

This commit is contained in:
2026-09-14 21:37:24 +08:00
parent 5a9c97d64c
commit 763dee6fb9
@@ -6,19 +6,19 @@
* 步骤 4(确认生成):渲染进度页,全部完成后「下一步:选择封面」;仅上一步
* 步骤 5(选择封面):仅上一步
*/
import React from "react";
import React from "react"
export interface GenerateStepActionsProps {
currentStep: number;
onPrev: () => void;
onNext: () => void;
currentStep: number
onPrev: () => void
onNext: () => void
/** 步骤3:确认生成视频(校验 + 创建渲染任务) */
onConfirmGenerate: () => void | Promise<void>;
generating: boolean;
generated: boolean;
generateError: string | null;
onConfirmGenerate: () => void | Promise<void>
generating: boolean
generated: boolean
generateError: string | null
/** 批量模式下勾选的视频数量(N=1 时为1) */
selectedCount?: number;
selectedCount?: number
}
const GenerateStepActions: React.FC<GenerateStepActionsProps> = ({
@@ -38,7 +38,7 @@ const GenerateStepActions: React.FC<GenerateStepActionsProps> = ({
<button className="xx-btn xx-btn-primary" onClick={onNext}>
下一步 →
</button>
);
)
}
/* 步骤 3:选择标题 — 确认生成 */
@@ -48,22 +48,20 @@ const GenerateStepActions: React.FC<GenerateStepActionsProps> = ({
<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} 个视频`
: "✨ 确认生成视频"}
{selectedCount > 1 ? `✨ 确认生成 ${selectedCount} 个视频` : "✨ 确认生成视频"}
</button>
);
)
}
/* 步骤 4:确认生成进度页 — 全部完成后下一步进封面 */
@@ -73,31 +71,27 @@ const GenerateStepActions: React.FC<GenerateStepActionsProps> = ({
<button className="xx-btn xx-btn-primary" onClick={onNext}>
下一步:选择封面 →
</button>
);
)
}
return (
<button className="xx-btn xx-btn-primary" disabled>
⏳ 视频渲染中…
</button>
);
)
}
/* 步骤 5(封面,最后一步):无主按钮 */
return null;
};
return null
}
return (
<div className="xx-step-actions">
<button
className="xx-btn xx-btn-ghost"
onClick={onPrev}
disabled={currentStep === 1}
>
<button className="xx-btn xx-btn-ghost" onClick={onPrev} disabled={currentStep === 1}>
← 上一步
</button>
{renderPrimaryButton()}
</div>
);
};
)
}
export default GenerateStepActions;
export default GenerateStepActions