feat(voices): 任务3.12 克隆音色卡片组件
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 167h6m25s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 167h6m30s
Deploy / Deploy Staging (push) Failing after 167h8m16s
CI/CD Pipeline / Frontend Lint (push) Failing after 167h8m47s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 167h8m54s
Deploy / Production Browser E2E (push) Failing after 1825h42m1s
Deploy / Deploy Production (push) Failing after 1825h42m2s
Deploy / Build Production Runtime Images (push) Failing after 1825h42m40s

- 扩展 VoiceClone 类型(description/language/gender/error_message)
- 更新 toVoiceClone 映射(后端 pending → 前端 processing)
- 新增 CloneVoiceCard 组件(状态标签、播放控制、操作按钮)
- 新增 CloneDetailModal 详情弹窗
- 新增 CloneCardSkeleton 骨架屏加载
- 删除/重试 mutation + toast 提示
- 克隆卡片样式(voices.css ~450 行)
- TypeScript 零错误
This commit is contained in:
灵应
2026-07-02 13:45:30 +08:00
parent 6b98ce2bb5
commit 669b06fc73
3 changed files with 843 additions and 18 deletions
+8
View File
@@ -13,9 +13,13 @@ export type VoiceCloneStatus = "ready" | "processing" | "failed";
export interface VoiceClone {
id: string;
name: string;
description: string;
duration_seconds: number;
status: VoiceCloneStatus;
sample_url?: string;
language: string;
gender: string;
error_message: string | null;
created_at: string;
updated_at: string;
}
@@ -84,9 +88,13 @@ export interface CreateVoiceCloneRequestFull {
export const toVoiceClone = (profile: VoiceCloneProfile): VoiceClone => ({
id: profile.id,
name: profile.name,
description: profile.description || "",
duration_seconds: 0,
status: profile.status === "pending" ? "processing" : profile.status,
sample_url: profile.source_audio_url || undefined,
language: profile.language || "",
gender: profile.gender || "",
error_message: profile.error_message || null,
created_at: profile.created_at,
updated_at: profile.updated_at,
});