增加AI页面在其它页面的展示

This commit is contained in:
allen2fuc
2026-05-08 18:15:52 +08:00
parent 9817ecca33
commit 68f06344dc
9 changed files with 334 additions and 15 deletions
+16 -6
View File
@@ -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 <AIPage />;
}
function AppRouter() {
return (
@@ -36,7 +42,7 @@ function AppRouter() {
<Route path="/io" component={IOPage} />
<Route path="/vu" component={VUPage} />
<Route path="/select" component={SelectPage} />
<Route path="/ai" component={AIPage} />
<Route path="/ai" component={AIPageRoute} />
<Route path="/community" component={CommunityPage} />
<Route path="/404" component={NotFound} />
<Route component={NotFound} />
@@ -52,12 +58,16 @@ function App() {
<TooltipProvider>
<Toaster />
<Router hook={useHashLocation}>
{/* Desktop: narrow shell centered in the browser with side gutters */}
<div className="min-h-dvh bg-[#0d1117]">
<div className="mx-auto min-h-dvh w-full max-w-full lg:max-w-[min(1180px,calc(100vw-3rem))]">
<AppRouter />
<AIDrawerProvider>
{/* Desktop: narrow shell centered in the browser with side gutters */}
<div className="min-h-dvh bg-[#0d1117]">
<div className="mx-auto min-h-dvh w-full max-w-full lg:max-w-[min(1180px,calc(100vw-3rem))]">
<DesktopAIShell>
<AppRouter />
</DesktopAIShell>
</div>
</div>
</div>
</AIDrawerProvider>
</Router>
</TooltipProvider>
</DeviceProvider>