From fa6191b448e25c62b8617b0dfec22c08ca4cc045 Mon Sep 17 00:00:00 2001 From: xuhd Date: Thu, 11 Jun 2026 11:30:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(studio):=20=E7=A7=BB=E9=99=A4=E6=9D=A5?= =?UTF-8?q?=E6=BA=90=E5=8D=A1=E7=89=87=E6=82=AC=E5=81=9C=20tooltip?= =?UTF-8?q?=EF=BC=8C=E5=A4=B1=E8=B4=A5=E6=9D=A5=E6=BA=90=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E5=B9=B6=E5=8F=AF=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 去掉来源卡片 hover 时弹出的自定义 tooltip div - status 为 failed 的来源卡片显示红色报错图标与提示,禁用选中,保留删除按钮 Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/pages/StudioNotebookDetailPage.tsx | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/frontend-web/src/pages/StudioNotebookDetailPage.tsx b/frontend-web/src/pages/StudioNotebookDetailPage.tsx index a064fbdf..4e60a29f 100644 --- a/frontend-web/src/pages/StudioNotebookDetailPage.tsx +++ b/frontend-web/src/pages/StudioNotebookDetailPage.tsx @@ -3,6 +3,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { useParams } from "react-router-dom"; import { + AlertCircle, AlignLeft, ArrowLeft, BookOpen, @@ -72,14 +73,20 @@ function SourceCard({ }) { const title = item.title ?? item.document?.title ?? "未命名"; const isProcessing = item.status === "processing"; + const isFailed = item.status === "failed"; return (
onToggle(item.id)} - className={`group relative flex h-32 w-full cursor-pointer flex-col justify-between rounded-2xl p-4 ring-1 transition-colors ${selected - ? "bg-primary/10 ring-primary" - : "bg-muted ring-border/50 hover:bg-muted/70" + title={isFailed ? `${title}(处理失败)` : title} + onClick={() => { + if (isFailed) return; + onToggle(item.id); + }} + className={`group relative flex h-32 w-full flex-col justify-between rounded-2xl p-4 ring-1 transition-colors ${isFailed + ? "cursor-default bg-destructive/5 ring-destructive/40" + : selected + ? "cursor-pointer bg-primary/10 ring-primary" + : "cursor-pointer bg-muted ring-border/50 hover:bg-muted/70" }`} > {/* 删除按钮 - 右上角始终显示,悬停时高亮 */} @@ -97,13 +104,15 @@ function SourceCard({
{isProcessing ? ( + ) : isFailed ? ( + ) : ( )}
-

{title}

-
- {title} +
+

{title}

+ {isFailed &&

处理失败,请删除后重试

}
);