From 7391cd0a25dc295a9420cad6c09ac13532519be6 Mon Sep 17 00:00:00 2001 From: luorijun Date: Fri, 21 Nov 2025 15:35:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=99=BD=E5=90=8D=E5=8D=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=97=A5=E6=9C=9F=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/actions/whitelist.ts | 4 ++-- src/app/admin/identify/page.tsx | 4 ++-- src/app/admin/whitelist/page.tsx | 11 +++++------ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/actions/whitelist.ts b/src/actions/whitelist.ts index aba47cd..07af9a5 100644 --- a/src/actions/whitelist.ts +++ b/src/actions/whitelist.ts @@ -5,8 +5,8 @@ import {callByUser} from '@/actions/base' type Whitelist = { id: number host: string - createdAt: string - updatedAt: string + created_at: string + updated_at: string remark: string } diff --git a/src/app/admin/identify/page.tsx b/src/app/admin/identify/page.tsx index 739da06..f309770 100644 --- a/src/app/admin/identify/page.tsx +++ b/src/app/admin/identify/page.tsx @@ -205,7 +205,7 @@ export default function IdentifyPage(props: IdentifyPageProps) {
@@ -219,7 +219,7 @@ export default function IdentifyPage(props: IdentifyPageProps) {
diff --git a/src/app/admin/whitelist/page.tsx b/src/app/admin/whitelist/page.tsx index c9ed176..e79e360 100644 --- a/src/app/admin/whitelist/page.tsx +++ b/src/app/admin/whitelist/page.tsx @@ -22,6 +22,7 @@ import { } from '@/components/ui/alert-dialog' import Page from '@/components/page' import DataTable from '@/components/data-table' +import {format, parseISO} from 'date-fns' const schema = z.object({ host: z.string().min(1, {message: 'IP地址不能为空'}), @@ -253,18 +254,16 @@ export default function WhitelistPage(props: WhitelistPageProps) { }} columns={[ { - accessorKey: 'host', header: `IP 地址`, + header: `IP 地址`, accessorKey: 'host', }, { - accessorKey: 'remark', header: `备注`, + header: `备注`, accessorKey: 'remark', }, { - accessorKey: 'created_at', header: `添加时间`, + header: `添加时间`, cell: ({row}) => format(parseISO(row.original.created_at), 'yyyy-MM-dd HH:mm'), }, { - id: 'actions', - header: `操作`, - cell: ({row}) => ( + id: 'actions', header: `操作`, cell: ({row}) => (