From 32113eb79091e6a494383d6b930206770a509673 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 19 Jul 2026 12:47:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(waf):=20=E5=88=97=E8=A1=A8=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=94=B9=E4=B8=BA=E7=9B=B4=E6=8E=A5=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 规则组与 IP 组表格去掉「…」菜单,操作以图标平铺展示。 --- .../(main)/waf/components/ip-groups-table.tsx | 131 +++++++++--------- .../waf/components/rule-groups-table.tsx | 77 ++++------ 2 files changed, 99 insertions(+), 109 deletions(-) diff --git a/frontend/app/(main)/waf/components/ip-groups-table.tsx b/frontend/app/(main)/waf/components/ip-groups-table.tsx index 51149e1e..6e079723 100644 --- a/frontend/app/(main)/waf/components/ip-groups-table.tsx +++ b/frontend/app/(main)/waf/components/ip-groups-table.tsx @@ -1,23 +1,9 @@ 'use client'; -import { - Download, - Eye, - MoreHorizontal, - Pencil, - Play, - Trash2, -} from 'lucide-react'; +import { Download, Eye, Pencil, Play, Trash2 } from 'lucide-react'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuTrigger, -} from '@/components/ui/dropdown-menu'; import { Table, TableBody, @@ -61,7 +47,7 @@ export function IPGroupsTable({ 引用次数 同步状态 更新时间 - 操作 + 操作 @@ -78,60 +64,81 @@ export function IPGroupsTable({ {group.ip_list.length} {group.referenced_by_rule_count} - + {group.last_sync_status ? `${group.last_sync_status}: ${group.last_sync_message}` : '尚无同步记录'} - + {group.updated_at ? formatDateTime(group.updated_at) : '—'} - - - - - - onView(group)}> - - 查看 - - onEdit(group)}> - - 编辑 - - {group.type === 'automatic' ? ( - onTest(group)}> - - 测试规则 - - ) : null} - {group.type === 'subscription' || - group.type === 'automatic' ? ( - onSync(group)} - > - - {syncingId === group.id - ? '同步中...' - : group.type === 'automatic' - ? '立即执行' - : '立即同步'} - - ) : null} - - onDelete(group)} +
+ + + {group.type === 'automatic' ? ( + + ) : null} + {group.type === 'subscription' || group.type === 'automatic' ? ( + + ) : null} + +
))} diff --git a/frontend/app/(main)/waf/components/rule-groups-table.tsx b/frontend/app/(main)/waf/components/rule-groups-table.tsx index a96a9a8d..537f1af1 100644 --- a/frontend/app/(main)/waf/components/rule-groups-table.tsx +++ b/frontend/app/(main)/waf/components/rule-groups-table.tsx @@ -1,23 +1,9 @@ 'use client'; -import { - Globe2, - MoreHorizontal, - Pencil, - ShieldCheck, - Trash2, -} from 'lucide-react'; +import { Globe2, Pencil, ShieldCheck, Trash2 } from 'lucide-react'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuGroup, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuTrigger, -} from '@/components/ui/dropdown-menu'; import { Table, TableBody, @@ -50,7 +36,7 @@ export function RuleGroupsTable({ 节点数 应用范围 更新时间 - 操作 + 操作 @@ -59,9 +45,9 @@ export function RuleGroupsTable({
{group.is_global ? ( - + ) : ( - + )} {group.name}
@@ -82,39 +68,36 @@ export function RuleGroupsTable({ ? '全部网站' : `${group.applied_site_count} 个网站`}
- + {group.updated_at ? formatDateTime(group.updated_at) : '—'} - - - + {!group.is_global ? ( + - - - - onEdit(group)}> - - 编排 - - - {!group.is_global ? ( - <> - - - onDelete(group)} - > - - 删除 - - - - ) : null} - - + ) : null} + ))}