From 68f06344dcad9125e058c40fdd81017566db2a50 Mon Sep 17 00:00:00 2001 From: allen2fuc Date: Fri, 8 May 2026 18:15:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0AI=E9=A1=B5=E9=9D=A2=E5=9C=A8?= =?UTF-8?q?=E5=85=B6=E5=AE=83=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/App.tsx | 22 +++-- client/src/components/BottomNav.tsx | 53 ++++++++-- client/src/components/DesktopAIShell.tsx | 121 +++++++++++++++++++++++ client/src/contexts/AIDrawerContext.tsx | 78 +++++++++++++++ client/src/hooks/useIsLgUp.ts | 20 ++++ client/src/locales/data-en.json | 2 + client/src/locales/data-zh-HK.json | 2 + client/src/locales/data-zh.json | 2 + client/src/pages/AIPage.tsx | 49 ++++++++- 9 files changed, 334 insertions(+), 15 deletions(-) create mode 100644 client/src/components/DesktopAIShell.tsx create mode 100644 client/src/contexts/AIDrawerContext.tsx create mode 100644 client/src/hooks/useIsLgUp.ts diff --git a/client/src/App.tsx b/client/src/App.tsx index b8be9c2..5cac1cf 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -20,6 +20,12 @@ import VUPage from "./pages/VUPage"; import SelectPage from "./pages/SelectPage"; import AIPage from "./pages/AIPage"; import CommunityPage from "./pages/CommunityPage"; +import { AIDrawerProvider } from "./contexts/AIDrawerContext"; +import DesktopAIShell from "./components/DesktopAIShell"; + +function AIPageRoute() { + return ; +} function AppRouter() { return ( @@ -36,7 +42,7 @@ function AppRouter() { - + @@ -52,12 +58,16 @@ function App() { - {/* Desktop: narrow shell centered in the browser with side gutters */} -
-
- + + {/* Desktop: narrow shell centered in the browser with side gutters */} +
+
+ + + +
-
+ diff --git a/client/src/components/BottomNav.tsx b/client/src/components/BottomNav.tsx index 34f4e85..7e3f3ba 100644 --- a/client/src/components/BottomNav.tsx +++ b/client/src/components/BottomNav.tsx @@ -6,6 +6,8 @@ - Inactive: muted icon + label ============================================================ */ import { cn } from "@/lib/utils"; +import { useAIDrawer } from "@/contexts/AIDrawerContext"; +import { useIsLgUp } from "@/hooks/useIsLgUp"; import { Activity, Bot, @@ -31,6 +33,8 @@ const NAV_ITEMS: NavItem[] = [ export default function BottomNav() { const [location] = useLocation(); + const isLgUp = useIsLgUp(); + const { open: aiDrawerOpen, setOpen: setAiDrawerOpen } = useAIDrawer(); return (