mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
Merge branch 'main' into cloudflare
This commit is contained in:
commit
bd21867c2c
@ -1,12 +1,6 @@
|
||||
import { BackIcon } from "@/components/Icon";
|
||||
import { Loader } from "@/components/loading/Loader";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
|
||||
export default function NetworkChartLoading() {
|
||||
return (
|
||||
@ -15,15 +9,16 @@ export default function NetworkChartLoading() {
|
||||
<div className="flex flex-1 flex-col justify-center gap-1 px-6 py-5">
|
||||
<CardTitle className="flex items-center gap-0.5 text-xl">
|
||||
<BackIcon />
|
||||
<Loader visible={true} />
|
||||
<div className="aspect-auto h-[20px] w-24 bg-muted"></div>
|
||||
</CardTitle>
|
||||
<CardDescription className="text-xs opacity-0">
|
||||
loading...
|
||||
</CardDescription>
|
||||
<div className="mt-[2px] aspect-auto h-[14px] w-32 bg-muted"></div>
|
||||
</div>
|
||||
<div className="hidden pr-4 pt-4 sm:block">
|
||||
<Loader visible={true} />
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent className="px-2 sm:p-6">
|
||||
<div className="aspect-auto h-[250px] w-full flex-col items-center justify-center"></div>
|
||||
<div className="aspect-auto h-[250px] w-full"></div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
|
@ -88,13 +88,13 @@ export function formatRelativeTime(timestamp: number): string {
|
||||
|
||||
if (hours > 24) {
|
||||
const days = Math.floor(hours / 24);
|
||||
return `${days}天前`;
|
||||
return `${days}d`;
|
||||
} else if (hours > 0) {
|
||||
return `${hours}小时前`;
|
||||
return `${hours}h`;
|
||||
} else if (minutes >= 0) {
|
||||
return `${minutes}分钟前`;
|
||||
return `${minutes}m`;
|
||||
} else {
|
||||
return "刚刚";
|
||||
return "just now";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user