From ed7bdda51518f15b0749eb4269f6cea777c97ef7 Mon Sep 17 00:00:00 2001 From: yuxuanhui Date: Mon, 10 Aug 2026 10:07:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(web):=20=E6=8C=89=E5=8E=9F=E5=9E=8B?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=93=8D=E5=BA=94=E5=BC=8F=E7=A0=94=E7=A9=B6?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zhixing-web/src/app/layout/app-layout.tsx | 282 +++++++++++++++ zhixing-web/src/app/layout/navigation.ts | 74 ++++ zhixing-web/src/app/layout/page-layout.tsx | 49 +++ .../features/home/components/home-shell.tsx | 124 ------- .../features/home/pages/home-page.test.tsx | 11 +- .../src/features/home/pages/home-page.tsx | 16 +- .../components/selection-presentation.ts | 55 +++ .../selection-results-workbench.tsx | 151 ++++++++ .../components/signal-detail-panel.tsx | 92 +++++ .../components/signal-record-list.tsx | 90 +++++ .../selection/components/signal-table.tsx | 98 +++++ .../pages/selection-results-page.test.tsx | 73 +++- .../pages/selection-results-page.tsx | 338 ++++++++---------- zhixing-web/src/routes/route-tree.tsx | 23 +- zhixing-web/src/shared/ui/pagination.tsx | 138 +++++++ zhixing-web/src/styles/globals.css | 55 ++- 16 files changed, 1319 insertions(+), 350 deletions(-) create mode 100644 zhixing-web/src/app/layout/app-layout.tsx create mode 100644 zhixing-web/src/app/layout/navigation.ts create mode 100644 zhixing-web/src/app/layout/page-layout.tsx delete mode 100644 zhixing-web/src/features/home/components/home-shell.tsx create mode 100644 zhixing-web/src/features/selection/components/selection-presentation.ts create mode 100644 zhixing-web/src/features/selection/components/selection-results-workbench.tsx create mode 100644 zhixing-web/src/features/selection/components/signal-detail-panel.tsx create mode 100644 zhixing-web/src/features/selection/components/signal-record-list.tsx create mode 100644 zhixing-web/src/features/selection/components/signal-table.tsx create mode 100644 zhixing-web/src/shared/ui/pagination.tsx diff --git a/zhixing-web/src/app/layout/app-layout.tsx b/zhixing-web/src/app/layout/app-layout.tsx new file mode 100644 index 0000000..e4b6fbc --- /dev/null +++ b/zhixing-web/src/app/layout/app-layout.tsx @@ -0,0 +1,282 @@ +import { BarChart3, Search } from "lucide-react" +import { useState } from "react" + +import { Link, Outlet, useMatchRoute } from "@tanstack/react-router" + +import { Avatar, AvatarFallback } from "@/shared/ui/avatar" +import { Button } from "@/shared/ui/button" +import { + Dialog, + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, +} from "@/shared/ui/dialog" +import { Input } from "@/shared/ui/input" +import { + type NavigationItem, + mobilePrimaryNavigation, + mobileOverflowNavigation, + primaryNavigation, + routePresentation, +} from "./navigation" + +function useActiveRoutePath() { + const matchRoute = useMatchRoute() + if (matchRoute({ to: "/selection", fuzzy: true })) return "/selection" + if (matchRoute({ to: "/", fuzzy: false })) return "/" + return "/" +} + +export function AppLayout() { + const activePath = useActiveRoutePath() + const presentation = routePresentation[activePath] ?? routePresentation["/"] + const [moreOpen, setMoreOpen] = useState(false) + + return ( +
+ +
+ +
+ +
+
+ setMoreOpen(true)} + /> + +
+ ) +} + +function DesktopSidebar({ activePath }: { activePath: string }) { + return ( + + ) +} + +function Brand() { + return ( +
+ + +
+

+ 知行量化 +

+

研究工作台

+
+
+ ) +} + +function DesktopNavItem({ + item, + active, +}: { + item: NavigationItem + active: boolean +}) { + const Icon = item.icon + if (item.to) { + return ( + +