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} + ))}