From a804d71fae38e7e134544ea490f49244a4e5734e Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Fri, 5 Jun 2026 09:52:08 +0800 Subject: [PATCH] Build out home dashboard and simplify topbar layout. Add hero section with stats and quick actions on the home page, remove the unused topbar search bar, and rename the assistants nav item. Co-authored-by: Cursor --- src/components/layout/Sidebar.tsx | 2 +- src/components/layout/Topbar.tsx | 9 +--- src/components/pages/ComponentsPage.tsx | 4 +- src/components/pages/HomePage.tsx | 69 ++++++++++++++++++++++++- 4 files changed, 73 insertions(+), 11 deletions(-) diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index e7d2d68..14412d6 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -19,7 +19,7 @@ const navItems: Array<{ icon: React.ComponentType<{ size?: number }>; }> = [ { key: "home", label: "控制台", icon: Home }, - { key: "assistants", label: "小助手管理", icon: Bot }, + { key: "assistants", label: "创建助手", icon: Bot }, { key: "components", label: "组件库", icon: Boxes }, { key: "history", label: "历史记录", icon: Clock3 }, { key: "test", label: "测试助手", icon: PlayCircle }, diff --git a/src/components/layout/Topbar.tsx b/src/components/layout/Topbar.tsx index 0967b13..2fb03b7 100644 --- a/src/components/layout/Topbar.tsx +++ b/src/components/layout/Topbar.tsx @@ -1,13 +1,8 @@ -import { Bell, HelpCircle, Search } from "lucide-react"; +import { Bell, HelpCircle } from "lucide-react"; export function Topbar() { return ( -
-
- - 搜索助手、组件、会话记录... -
- +
+ + +
+ + +
+ {stats.map((item) => ( +
+
+ +
+ +
{item.label}
+
{item.value}
+
{item.sub}
+
+ ))} +
+ + + ); } \ No newline at end of file