From dce6b8cc28bc7c9dcf7893e8b87df94a64cb8f15 Mon Sep 17 00:00:00 2001 From: logan Date: Sun, 31 May 2026 22:58:10 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20LdapConfigPage=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E5=BC=B9=E6=A1=86=E7=BB=9F=E4=B8=80=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20ConfirmDialog=20=E5=85=AC=E5=85=B1=E7=BB=84?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 LdapConfigPage 自定义 ModalOverlay 确认弹框 - 替换为 ConfirmDialog(variant=danger) 保持风格统一 - 清理未使用的 AlertTriangle import - 全站确认弹框现已全部统一使用 ConfirmDialog 组件 --- frontend/src/pages/LdapConfigPage.tsx | 37 ++++++++------------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/frontend/src/pages/LdapConfigPage.tsx b/frontend/src/pages/LdapConfigPage.tsx index 3cd5590..3f08ae8 100644 --- a/frontend/src/pages/LdapConfigPage.tsx +++ b/frontend/src/pages/LdapConfigPage.tsx @@ -2,11 +2,12 @@ import { useState, useEffect, useCallback } from 'react'; import api from '@/api/request'; import { FormDialog } from '@/components/FormDialog'; import { ModalOverlay } from '@/components/ModalOverlay'; +import { ConfirmDialog } from '@/components/ConfirmDialog'; import { toast } from '@/hooks/useToast'; import { Save, ChevronRight, ChevronDown, RefreshCw, CheckCircle, XCircle, Trash2, KeyRound, FolderOpen, Users, - Shield, AlertTriangle, Import, UserPlus, + Shield, Import, UserPlus, } from 'lucide-react'; /* ── types ── */ @@ -845,31 +846,15 @@ export default function LdapConfigPage() { )} {/* ── 删除确认弹框 ── */} - {showDeleteConfirm && ( - setShowDeleteConfirm(false)} width="max-w-sm"> -
-
-
- -

确认删除

-
- -
-

- 确认删除 {selectedDns.size} 个 LDAP 用户?此操作不可逆。 -

-
- - -
-
-
- )} + { confirmDelete(); }} + onCancel={() => setShowDeleteConfirm(false)} + /> ); }