From 106687c8c280a1a993dbfc7880ec9e9c870f6b1c Mon Sep 17 00:00:00 2001 From: wood chen Date: Sat, 19 Apr 2025 14:53:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20ServerCard=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=9C=80=E5=90=8E=E6=B4=BB?= =?UTF-8?q?=E8=B7=83=E6=97=B6=E9=97=B4=E7=9A=84=E6=98=BE=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B8=83=E5=B1=80=E4=BB=A5=E6=8F=90=E5=8D=87?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=B1=95=E7=A4=BA=E7=9A=84=E6=B8=85=E6=99=B0?= =?UTF-8?q?=E5=BA=A6=E5=92=8C=E5=8F=AF=E8=AF=BB=E6=80=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ServerCard.tsx | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/components/ServerCard.tsx b/src/components/ServerCard.tsx index c7fa6e6..befe57c 100644 --- a/src/components/ServerCard.tsx +++ b/src/components/ServerCard.tsx @@ -12,7 +12,7 @@ import BillingInfo from "./billingInfo" import { Badge } from "./ui/badge" import { Card, CardContent, CardHeader, CardFooter } from "./ui/card" import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip" -import { ArrowDown, ArrowUp, Clock, Cpu, HardDrive, Server, Activity, BarChart3 } from "lucide-react" +import { ArrowDown, ArrowUp, Clock, Cpu, HardDrive, Server, Activity, BarChart3, Calendar } from "lucide-react" interface ServerCardProps { now: number; @@ -44,7 +44,8 @@ export default function ServerCard({ now, serverInfo, cycleStats }: ServerCardPr tcp, udp, process, - uptime + uptime, + last_active_time_string } = formatNezhaInfo( now, serverInfo, @@ -290,12 +291,21 @@ export default function ServerCard({ now, serverInfo, cycleStats }: ServerCardPr )} - {uptime > 0 && ( -
- - {formatUptime(uptime, t)} -
- )} +
+ {uptime > 0 && ( +
+ + {formatUptime(uptime, t)} +
+ )} + + {last_active_time_string && ( +
+ + {last_active_time_string} +
+ )} +