From c6ecfe668b4cdb921fbb5b22a6bcd1c42667f358 Mon Sep 17 00:00:00 2001 From: bdim404 Date: Tue, 10 Mar 2026 18:56:48 +0800 Subject: [PATCH] feat(audiobook): enhance ProjectCard layout and improve status display with additional error handling --- qwen3-tts-frontend/src/pages/Audiobook.tsx | 110 +++++++++++---------- 1 file changed, 58 insertions(+), 52 deletions(-) diff --git a/qwen3-tts-frontend/src/pages/Audiobook.tsx b/qwen3-tts-frontend/src/pages/Audiobook.tsx index 60d6430..7231661 100644 --- a/qwen3-tts-frontend/src/pages/Audiobook.tsx +++ b/qwen3-tts-frontend/src/pages/Audiobook.tsx @@ -547,52 +547,18 @@ function ProjectCard({ project, onRefresh }: { project: AudiobookProject; onRefr return (
-
-
- - {project.title} - +
+
+ + {project.title} +
+
+ {STATUS_LABELS[status] || status} -
-
- {!isActive && ( -
- - -
- )} - {status === 'ready' && ( - - )} - {status === 'done' && ( - - )} - -
@@ -617,6 +583,46 @@ function ProjectCard({ project, onRefresh }: { project: AudiobookProject; onRefr
)} +
+
+ {!isActive && ( + <> + + + + )} + {status === 'ready' && ( + + )} + {status === 'done' && ( + + )} +
+ +
+ {expanded && (
{detail && detail.characters.length > 0 && ( @@ -661,9 +667,9 @@ function ProjectCard({ project, onRefresh }: { project: AudiobookProject; onRefr
) : ( -
- {char.name} - {char.instruct} +
+ {char.name} + {char.instruct}
{char.voice_design_id ? 音色 #{char.voice_design_id} @@ -694,7 +700,7 @@ function ProjectCard({ project, onRefresh }: { project: AudiobookProject; onRefr {detail && detail.chapters.length > 0 && ['ready', 'generating', 'done'].includes(status) && (
-
+