feat: Integrate new dashboard design and components, remove old dashboard routes, and update dependencies.

This commit is contained in:
2026-02-10 15:00:11 +08:00
parent 1c2ef98dcd
commit 48cf6c44f5
82 changed files with 6896 additions and 261 deletions

View File

@@ -0,0 +1,43 @@
import type { ReactNode } from "react";
import { Card } from "./ui/card";
interface DashboardCardProps {
title: string;
value: string | number;
subtitle?: string;
change?: string;
icon: ReactNode;
badge?: string;
}
export function DashboardCard({
title,
value,
subtitle,
change,
icon,
badge,
}: DashboardCardProps) {
return (
<Card className="p-6 bg-gray-50 border-none relative">
<div className="flex items-start justify-between">
<div className="flex-1">
<p className="text-sm text-gray-600 mb-2">{title}</p>
<div className="flex items-baseline gap-2">
<h3 className="text-4xl font-bold text-gray-900">{value}</h3>
{badge && (
<div className="flex items-center justify-center w-12 h-12 rounded-full bg-slate-200 text-sm font-semibold">
{badge}
</div>
)}
</div>
{subtitle && <p className="text-sm text-gray-600 mt-2">{subtitle}</p>}
{change && <p className="text-sm text-red-500 mt-1"> {change}</p>}
</div>
<div className="flex items-center justify-center w-14 h-14 rounded-full bg-slate-800 text-white">
{icon}
</div>
</div>
</Card>
);
}