From c588dd67ae913008d7421b165bb011fbe5386fc8 Mon Sep 17 00:00:00 2001
From: Autumn-27 <53844290+Autumn-27@users.noreply.github.com>
Date: Tue, 18 Aug 2026 09:30:13 -0400
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=A0=E9=99=A4=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=8C=E6=AC=A1=E7=A1=AE=E8=AE=A4=E5=BC=B9?=
=?UTF-8?q?=E7=AA=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
任务列表的删除按钮改为 AlertDialog 二次确认(与对话删除交互一致),
确认后才调用 api.deleteTask。
---
web/src/app/(main)/function/tasks/page.tsx | 43 ++++++++++++++++++----
1 file changed, 35 insertions(+), 8 deletions(-)
diff --git a/web/src/app/(main)/function/tasks/page.tsx b/web/src/app/(main)/function/tasks/page.tsx
index 90fbcd0..47edca7 100644
--- a/web/src/app/(main)/function/tasks/page.tsx
+++ b/web/src/app/(main)/function/tasks/page.tsx
@@ -16,6 +16,17 @@ import {
} from "lucide-react";
import { StatusBadge } from "@/components/status-badge";
+import {
+ AlertDialog,
+ AlertDialogAction,
+ AlertDialogCancel,
+ AlertDialogContent,
+ AlertDialogDescription,
+ AlertDialogFooter,
+ AlertDialogHeader,
+ AlertDialogTitle,
+ AlertDialogTrigger,
+} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
import { Checkbox } from "@/components/ui/checkbox";
@@ -542,14 +553,30 @@ export default function TasksPage() {
进入
-
+
+
+
+
+
+
+ 确认删除任务 #{task.id}?
+
+ {task.description
+ ? `「${task.description.length > 80 ? task.description.slice(0, 80) + "…" : task.description}」`
+ : "该任务"}
+ 的执行记录、会话与产物将被删除,此操作不可撤销(全局资产图保留)。
+
+
+
+ 取消
+ deleteTask(task.id)}>
+ 删除
+
+
+
+