fix(viral-video): STEP2/STEP3 主按钮缺失修复(始终显示,状态驱动禁用/加载) (#2119)
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 0s
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 5s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 5s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 3s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m13s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m48s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 25s
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 51s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 16s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 12s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 15s
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Has been cancelled
CI/CD Pipeline / Build Staging API Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped 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 / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
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 / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (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
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 0s
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 5s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 5s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 3s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m13s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m48s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 25s
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 51s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 16s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 12s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 15s
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Has been cancelled
CI/CD Pipeline / Build Staging API Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped 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 / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
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 / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (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
修复STEP2/STEP3主按钮缺失(PR #2119)
This commit was merged in pull request #2119.
This commit is contained in:
@@ -889,9 +889,22 @@
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.vv-btn-primary:disabled {
|
||||
opacity: 0.5;
|
||||
opacity: 0.55;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.vv-btn-primary.vv-btn-disabled-gray,
|
||||
.vv-btn-primary:disabled.vv-btn-disabled-gray {
|
||||
background: #d1d5db !important;
|
||||
color: #6b7280 !important;
|
||||
opacity: 1;
|
||||
box-shadow: none !important;
|
||||
transform: none !important;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.vv-btn-primary.vv-btn-disabled-gray:hover {
|
||||
box-shadow: none !important;
|
||||
transform: none !important;
|
||||
}
|
||||
.vv-btn-ghost {
|
||||
background: #fff;
|
||||
color: #6b7280;
|
||||
@@ -1180,13 +1193,29 @@
|
||||
}
|
||||
|
||||
/* 列禁用态 */
|
||||
.vv-col-disabled .vv-section {
|
||||
.vv-col-disabled .vv-section-body,
|
||||
.vv-col-disabled .vv-step-subhead,
|
||||
.vv-col-disabled .vv-credits,
|
||||
.vv-col-disabled .vv-preview,
|
||||
.vv-col-disabled .vv-error,
|
||||
.vv-col-disabled .vv-hint-gray,
|
||||
.vv-col-disabled .vv-hint-yellow {
|
||||
opacity: 0.55;
|
||||
pointer-events: none;
|
||||
}
|
||||
.vv-col-disabled .vv-section .vv-btn-primary {
|
||||
background: #d1d5db !important;
|
||||
cursor: not-allowed;
|
||||
.vv-col-disabled .vv-btn-primary,
|
||||
.vv-col-disabled .vv-btn-primary:hover {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
.vv-col-disabled .vv-section .vv-form-row,
|
||||
.vv-col-disabled .vv-section .vv-pill-row,
|
||||
.vv-col-disabled .vv-section input,
|
||||
.vv-col-disabled .vv-section textarea,
|
||||
.vv-col-disabled .vv-section .ant-select,
|
||||
.vv-col-disabled .vv-section .vv-pill,
|
||||
.vv-col-disabled .vv-section .vv-action-btn,
|
||||
.vv-col-disabled .vv-section .vv-audio-cell,
|
||||
.vv-col-disabled .vv-section .vv-step-lock {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Section 内小标题 */
|
||||
@@ -1289,16 +1318,6 @@
|
||||
}
|
||||
|
||||
/* 列禁用态 */
|
||||
.vv-col-disabled .vv-section {
|
||||
opacity: 0.55;
|
||||
}
|
||||
.vv-col-disabled .vv-section .vv-btn,
|
||||
.vv-col-disabled .vv-section button,
|
||||
.vv-col-disabled .vv-section input,
|
||||
.vv-col-disabled .vv-section textarea,
|
||||
.vv-col-disabled .vv-section .ant-select {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Section 内小标题 */
|
||||
.vv-section-subtitle {
|
||||
|
||||
@@ -1357,20 +1357,24 @@ const ViralVideoPage: React.FC = () => {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* STEP2 主按钮:✍️ 生成文案 */}
|
||||
{step2Enabled &&
|
||||
task.uiStep !== "step2_copy_ready" &&
|
||||
{/* STEP2 主按钮:✍️ 生成文案(文案未确认前显示) */}
|
||||
{task.uiStep !== "step2_copy_ready" &&
|
||||
task.uiStep !== "step3_ready" &&
|
||||
task.uiStep !== "step3_generating" &&
|
||||
task.uiStep !== "step3_done" && (
|
||||
<button
|
||||
className="vv-btn vv-btn-primary"
|
||||
className={`vv-btn vv-btn-primary ${!step2Enabled ? "vv-btn-disabled-gray" : ""}`}
|
||||
onClick={handleGenerateCopy}
|
||||
disabled={task.uiStep === "step2_generating" || !step2Enabled}
|
||||
title={!step2Enabled ? "请先完成图片分析" : ""}
|
||||
>
|
||||
{task.uiStep === "step2_generating" ? (
|
||||
<>
|
||||
<span className="vv-spinner" /> AI 创作中…
|
||||
<span className="vv-spinner" /> AI 生成文案中…
|
||||
</>
|
||||
) : !step2Enabled ? (
|
||||
<>
|
||||
<EditOutlined /> 生成文案(请先完成图片分析)
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
@@ -1485,27 +1489,41 @@ const ViralVideoPage: React.FC = () => {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 步骤提示/主按钮 */}
|
||||
{!step2Enabled && (
|
||||
<div className="vv-hint-gray">请先在 STEP 1 上传素材并点击「分析图片」</div>
|
||||
)}
|
||||
{step2Enabled && !step3Enabled && (
|
||||
<div className="vv-hint-yellow">请在 STEP 2 配置参数并点击「生成文案」</div>
|
||||
)}
|
||||
{task.uiStep === "step3_ready" && (
|
||||
<button className="vv-btn vv-btn-primary" onClick={handleGenerateVideo}>
|
||||
<VideoCameraOutlined /> 开始生成视频
|
||||
</button>
|
||||
)}
|
||||
{task.uiStep === "step3_generating" && (
|
||||
<button className="vv-btn vv-btn-primary" disabled>
|
||||
<span className="vv-spinner" /> AI 正在生成视频中…
|
||||
</button>
|
||||
)}
|
||||
{task.uiStep === "step3_done" && outputUrl && (
|
||||
<button className="vv-btn vv-btn-ghost vv-btn-block" onClick={resetTask}>
|
||||
<ReloadOutlined /> 再生成一个
|
||||
{/* STEP3 主按钮:🎬 开始生成视频(始终展示,状态驱动 disabled/文案) */}
|
||||
{task.uiStep !== "step3_done" ? (
|
||||
<button
|
||||
className={`vv-btn vv-btn-primary ${!step3Enabled ? "vv-btn-disabled-gray" : ""}`}
|
||||
onClick={handleGenerateVideo}
|
||||
disabled={task.uiStep === "step3_generating" || !step3Enabled}
|
||||
title={
|
||||
!step3Enabled
|
||||
? !step2Enabled
|
||||
? "请先完成图片分析"
|
||||
: "请先在 STEP 2 生成并确认文案"
|
||||
: ""
|
||||
}
|
||||
>
|
||||
{task.uiStep === "step3_generating" ? (
|
||||
<>
|
||||
<span className="vv-spinner" /> AI 正在生成视频中…
|
||||
</>
|
||||
) : !step3Enabled ? (
|
||||
<>
|
||||
<VideoCameraOutlined /> 开始生成视频
|
||||
{!step2Enabled ? "(请先完成图片分析)" : "(请先确认文案)"}
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<VideoCameraOutlined /> 开始生成视频
|
||||
</>
|
||||
)}
|
||||
</button>
|
||||
) : (
|
||||
outputUrl && (
|
||||
<button className="vv-btn vv-btn-ghost vv-btn-block" onClick={resetTask}>
|
||||
<ReloadOutlined /> 再生成一个
|
||||
</button>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user