diff --git a/apps/web/src/pages/dashboard/Dashboard.tsx b/apps/web/src/pages/dashboard/Dashboard.tsx index d222fc0f6..d1ba9c651 100644 --- a/apps/web/src/pages/dashboard/Dashboard.tsx +++ b/apps/web/src/pages/dashboard/Dashboard.tsx @@ -9,161 +9,56 @@ import { Button, Tag } from "@/components/ui"; import { DatabaseOutlined } from "@ant-design/icons"; import "./dashboard.css"; -/* ── 类型定义 ───────────────────────────────────────────── */ - -interface KpiItem { - key: string; - icon: string; - iconGradient: string; - value: string; - label: string; - trend: string; - trendDirection: "up" | "down" | "neutral"; - accent: string; -} - -interface QuickEntry { - key: string; - icon: React.ReactNode; - label: string; - desc: string; - badge?: string; - badgeTone?: "blue" | "green" | "orange" | "purple" | "slate"; - gradient: string; - to: string; -} - -interface RecentTask { - id: string; - title: string; - type: "成片" | "草稿" | "素材"; - typeTone: "green" | "blue" | "slate"; - updatedAt: string; - size: string; - status: "已完成" | "进行中" | "待处理"; - statusTone: "green" | "blue" | "slate"; -} - /* ── 主组件 ─────────────────────────────────────────────── */ const Dashboard: React.FC = () => { const navigate = useNavigate(); - const kpiData: KpiItem[] = []; - const quickEntries: QuickEntry[] = []; - const recentTasks: RecentTask[] = []; - return (
{/* KPI 卡片网格 */} -
- {kpiData.length > 0 ? ( - kpiData.map((kpi) => ( -
-
- {kpi.icon} -
-
{kpi.value}
-
{kpi.label}
-
- {kpi.trendDirection === "up" ? "↑" : kpi.trendDirection === "down" ? "↓" : "→"}{" "} - {kpi.trend} -
-
- )) - ) : ( -
-

暂无统计数据

-
- )} -
+
+
+

暂无统计数据

+
+
{/* 快速入口 */} -
-

快速入口

- {quickEntries.length > 0 ? ( -
- {quickEntries.map((entry) => ( - - ))} -
- ) : ( +
+
+

快速入口

+
+

暂无快速入口

- )} -
+
+ {/* 最近任务 */}
-

最近任务

-
- {recentTasks.length > 0 ? ( -
- {recentTasks.map((task) => ( -
-
- {task.type} -
-
{task.title}
-
- 更新于 {task.updatedAt} · {task.size} -
-
-
- {task.status} -
- ))} -
- ) : ( +

暂无最近任务

- )} +
{/* 使用统计 */} -
-

使用统计

-
-
- - -
-
-
- +
+
+

使用统计

+
+
+
+
+

暂无统计数据

@@ -171,17 +66,18 @@ const Dashboard: React.FC = () => {
{/* 公告 */} -
-

公告

-
-
- 📢 - 系统公告 - 官方 +
+
+

公告

+
+
+
+ 官方 +
+

欢迎使用小应 SaaS 平台

+ +
-

- 欢迎使用小应 SaaS 平台。当前为演示版本,部分功能正在开发中。 -