From c01062ab8a347d5cc9fe9b09fe267a7f451964fa Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 27 Jul 2026 15:21:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20VoiceModals=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=88Display=E7=B1=BB=E5=9E=8B/VoiceGende?= =?UTF-8?q?r/TtsStatus=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/voices/components/VoiceModals.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/web/src/pages/voices/components/VoiceModals.tsx b/apps/web/src/pages/voices/components/VoiceModals.tsx index 84b33ed71..e56478ced 100644 --- a/apps/web/src/pages/voices/components/VoiceModals.tsx +++ b/apps/web/src/pages/voices/components/VoiceModals.tsx @@ -2,8 +2,8 @@ * VoiceLibrary 弹窗集合 */ import React from "react" -import type { VoiceClone } from "@/api/voice-clone" -import type { PresetVoiceItem } from "@/api/voices" +import type { ClonedVoiceDisplay, PresetVoiceDisplay, VoiceGender } from "../types" +import type { TtsStatus } from "./TtsModal" import CloneModal from "@/components/voice/CloneModal" import CloneDetailModal from "./CloneDetailModal" import UploadVoiceModal from "./UploadVoiceModal" @@ -16,7 +16,7 @@ export interface VoiceModalsProps { onCloneSuccess: (voice: VoiceClone) => void /* 克隆详情弹窗 */ - detailVoice: VoiceClone | null + detailVoice: ClonedVoiceDisplay | null onDetailClose: () => void onDetailDelete: () => void onDetailRetry: () => void @@ -26,14 +26,14 @@ export interface VoiceModalsProps { uploadOpen: boolean uploadFile: File | null uploadName: string - uploadGender: string + uploadGender: VoiceGender uploadDesc: string - uploadProgress: number + uploadProgress: number | null onUploadClose: () => void onFileSelect: (file: File) => void onFileRemove: () => void onNameChange: (name: string) => void - onGenderChange: (gender: string) => void + onGenderChange: (gender: VoiceGender) => void onDescChange: (desc: string) => void onUpload: () => void @@ -42,10 +42,10 @@ export interface VoiceModalsProps { ttsText: string ttsVoiceId: string ttsSpeed: number - ttsStatus: string - ttsAudioUrl: string + ttsStatus: TtsStatus + ttsAudioUrl: string | null ttsError: string | null - presetVoices: PresetVoiceItem[] + presetVoices: PresetVoiceDisplay[] onTtsClose: () => void onTtsTextChange: (text: string) => void onTtsVoiceChange: (id: string) => void