From 376eb15c638a8b1b960113ce940b418cc09b469c Mon Sep 17 00:00:00 2001 From: chanx <1243304602@qq.com> Date: Wed, 26 Nov 2025 19:49:21 +0800 Subject: [PATCH] Fix: Refactoring and enhancing the functionality of the delete confirmation dialog component #10703 (#11542) ### What problem does this PR solve? Fix: Refactoring and enhancing the functionality of the delete confirmation dialog component - Refactoring and enhancing the functionality of the delete confirmation dialog component - Modifying the style of the user center ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- web/src/components/bulk-operate-bar.tsx | 15 ++- web/src/components/confirm-delete-dialog.tsx | 110 ++++++++++++++---- web/src/components/file-uploader.tsx | 6 +- .../originui/select-with-search.tsx | 4 +- web/src/components/ui/button.tsx | 5 + web/src/hooks/common-hooks.tsx | 15 +-- web/src/locales/en.ts | 22 +++- web/src/locales/zh.ts | 17 ++- web/src/pages/agents/agent-dropdown.tsx | 18 ++- .../dataset/knowledge-graph/force-graph.tsx | 15 ++- web/src/pages/datasets/dataset-dropdown.tsx | 18 ++- web/src/pages/files/action-cell.tsx | 34 +++++- web/src/pages/next-chats/chat-dropdown.tsx | 18 ++- .../pages/next-searches/search-dropdown.tsx | 20 +++- .../component/added-source-card.tsx | 2 +- .../component/delete-source-modal.tsx | 30 +++-- .../pages/user-setting/data-source/index.tsx | 2 +- web/src/pages/user-setting/mcp/index.tsx | 18 ++- web/src/pages/user-setting/mcp/mcp-card.tsx | 2 +- .../pages/user-setting/mcp/mcp-operation.tsx | 28 +++-- .../setting-model/components/modal-card.tsx | 37 ++++-- .../setting-model/components/un-add-model.tsx | 24 ++-- .../setting-model/{hooks.ts => hooks.tsx} | 2 +- .../pages/user-setting/setting-team/hooks.ts | 2 +- .../user-setting/setting-team/user-table.tsx | 41 +++++-- 25 files changed, 393 insertions(+), 112 deletions(-) rename web/src/pages/user-setting/setting-model/{hooks.ts => hooks.tsx} (99%) diff --git a/web/src/components/bulk-operate-bar.tsx b/web/src/components/bulk-operate-bar.tsx index bf13c765d..84e69cfbd 100644 --- a/web/src/components/bulk-operate-bar.tsx +++ b/web/src/components/bulk-operate-bar.tsx @@ -1,9 +1,13 @@ import { Button } from '@/components/ui/button'; import { Card, CardContent } from '@/components/ui/card'; import { cn } from '@/lib/utils'; +import { t } from 'i18next'; import { BrushCleaning } from 'lucide-react'; import { ReactNode, useCallback } from 'react'; -import { ConfirmDeleteDialog } from './confirm-delete-dialog'; +import { + ConfirmDeleteDialog, + ConfirmDeleteDialogNode, +} from './confirm-delete-dialog'; import { Separator } from './ui/separator'; export type BulkOperateItemType = { @@ -45,6 +49,15 @@ export function BulkOperateBar({