Skip to content

armgit / ARTEX

Public Imported from GitHub
0

ARTEX - AI autonomous penetration testing system (English translation; upstream: Autumn-27/ARTEX, AGPL-3.0)

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

Autumn-270a1232fcebfe
diff --git a/web/src/app/(main)/function/findings/detail/page.tsx b/web/src/app/(main)/function/findings/detail/page.tsx
index 07876b3..19f1c2a 100644
--- a/web/src/app/(main)/function/findings/detail/page.tsx
+++ b/web/src/app/(main)/function/findings/detail/page.tsx
@@ -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>
diff --git a/web/src/app/(main)/function/findings/page.tsx b/web/src/app/(main)/function/findings/page.tsx
index fdf4798..38b9eda 100644
--- a/web/src/app/(main)/function/findings/page.tsx
+++ b/web/src/app/(main)/function/findings/page.tsx
@@ -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>
diff --git a/web/src/app/(main)/function/tasks/detail/_tabs/findings-tab.tsx b/web/src/app/(main)/function/tasks/detail/_tabs/findings-tab.tsx
index 425825b..d4faf24 100644
--- a/web/src/app/(main)/function/tasks/detail/_tabs/findings-tab.tsx
+++ b/web/src/app/(main)/function/tasks/detail/_tabs/findings-tab.tsx
@@ -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>
diff --git a/web/src/app/(main)/function/tasks/page.tsx b/web/src/app/(main)/function/tasks/page.tsx
index fa7fac9..4cdd004 100644
--- a/web/src/app/(main)/function/tasks/page.tsx
+++ b/web/src/app/(main)/function/tasks/page.tsx
@@ -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>