From 6835078cf5e08884138c6dde7cdb71bd81ad8372 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 21 Feb 2026 02:56:41 +0800 Subject: [PATCH] fix(ui): remove loading headline and use 60-120s estimate --- components/image-generation-loading.tsx | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/components/image-generation-loading.tsx b/components/image-generation-loading.tsx index fbfc41163..9b010f64c 100644 --- a/components/image-generation-loading.tsx +++ b/components/image-generation-loading.tsx @@ -24,14 +24,6 @@ const PROVIDER_MODEL_LABEL: Record = { gemini: "Gemini 图片", }; -const PHASE_TITLE: Record, string> = { - idle: "准备中", - queued: "排队中", - processing: "生成中", - finalizing: "加载结果", - failed: "生成失败", -}; - const PHASE_HINT: Record, string> = { idle: "任务已创建,正在初始化生成参数。", queued: "任务已进入队列,请稍候。", @@ -52,10 +44,9 @@ export const ImageGenerationLoading = memo( const count = Math.min(Math.max(imageCount, 1), maxImages); const resolvedModelName = modelName?.trim() || PROVIDER_MODEL_LABEL[providerType || ""] || "AI 图片模型"; - const estimateSeconds = Math.max(45, Math.min(180, count * 60)); - const estimateMinutes = Math.max(1, Math.ceil(estimateSeconds / 60)); + const estimateRangeLabel = "60~120秒"; const elapsedLabel = - elapsedSeconds > 0 ? `已等待 ${elapsedSeconds}s` : `预计 ${estimateSeconds}s`; + elapsedSeconds > 0 ? `已等待 ${elapsedSeconds}s` : `预计 ${estimateRangeLabel}`; const isFailed = phase === "failed"; return ( @@ -71,7 +62,7 @@ export const ImageGenerationLoading = memo(
- 现在开始生成设计图,使用 {resolvedModelName} 模型,预计需要 {estimateMinutes} 分钟。 + 现在开始生成设计图,使用 {resolvedModelName} 模型,预计需要 {estimateRangeLabel}。
@@ -79,8 +70,6 @@ export const ImageGenerationLoading = memo( {resolvedModelName}
-
{PHASE_TITLE[phase]}
-
- {isFailed ? "生成失败" : "设计图生成中"} + {isFailed ? "生成失败" : "设计图处理中"}
- 使用 {resolvedModelName} 生成图片,预计 {estimateSeconds} + 使用 {resolvedModelName} 生成图片,预计 {estimateRangeLabel}
{(phase !== "processing" || elapsedSeconds > 0) && (