fix(ui): 删除确认弹窗长文本溢出(break-words + break-all)

任务/漏洞名称含长 URL、路径等无空格断点的长串时,弹窗描述不换行撑出边界。
给 AlertDialogDescription 加 break-words,用户内容包 span break-all 强制断行。
覆盖任务删除 + 三处漏洞删除弹窗。
This commit is contained in:
Autumn-27 committed 2026-08-19 10:30:56 -04:00
1 parent 90030051ce
commit 2aeb2e49da
4 files changed
+20 -10

No files matched your search

@@ -193,8 +193,8 @@ function FindingDetailInner() {
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>确认删除该漏洞?</AlertDialogTitle>
<AlertDialogDescription>
「{title}」将被永久删除,同时从发现列表、任务发现 Tab 与探索图中移除,此操作不可撤销。
<AlertDialogDescription className="break-words">
「<span className="break-all">{title}</span>」将被永久删除,同时从发现列表、任务发现 Tab 与探索图中移除,此操作不可撤销。
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
@@ -537,8 +537,8 @@ export default function FindingsPage() {
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>确认删除该漏洞?</AlertDialogTitle>
<AlertDialogDescription>
「{f.name || f.vulnclass || f.summary || `#${f.finding_id}`}」将被永久删除,
<AlertDialogDescription className="break-words">
「<span className="break-all">{f.name || f.vulnclass || f.summary || `#${f.finding_id}`}</span>」将被永久删除,
同时从发现列表、任务发现 Tab 与探索图中移除,此操作不可撤销。
</AlertDialogDescription>
</AlertDialogHeader>
@@ -142,8 +142,8 @@ function Row({
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>确认删除该漏洞?</AlertDialogTitle>
<AlertDialogDescription>
「{f.name || f.vulnclass || f.summary || `#${f.finding_id}`}」将被永久删除,
<AlertDialogDescription className="break-words">
「<span className="break-all">{f.name || f.vulnclass || f.summary || `#${f.finding_id}`}</span>」将被永久删除,
同时从发现列表、任务发现 Tab 与探索图中移除,此操作不可撤销。
</AlertDialogDescription>
</AlertDialogHeader>
+14 -4
View File
@@ -416,10 +416,20 @@ const TaskRow = React.memo(function TaskRow({
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>确认删除任务 #{task.id}?</AlertDialogTitle>
<AlertDialogDescription>
{task.description
? `「${task.description.length > 80 ? task.description.slice(0, 80) + "…" : task.description}」`
: "该任务"}
<AlertDialogDescription className="break-words">
{task.description ? (
<>
「
<span className="break-all">
{task.description.length > 80
? task.description.slice(0, 80) + "…"
: task.description}
</span>
」
</>
) : (
"该任务"
)}
的执行记录、会话与产物将被删除,此操作不可撤销(全局资产图保留)。
</AlertDialogDescription>
</AlertDialogHeader>