diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index 4c6384e..dd51c3b 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -17,8 +17,11 @@ import { import { Navigate, Route, Routes, useLocation, useNavigate } from "react-router-dom"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; +import { AiChatPage } from "@/pages/ai-chat-page"; import { EmailLoginPage } from "@/pages/email-login-page"; import { OAuthCallbackPage } from "@/pages/oauth-callback-page"; +import { PlaceholderPage } from "@/pages/placeholder-page"; +import { SettingsPage } from "@/pages/settings-page"; import { TodoShellPage } from "@/pages/todo-shell-page"; import { revokeRefreshToken, type EmailLoginResult } from "@/services/auth-api"; import { @@ -38,17 +41,18 @@ type SidebarItem = { key: string; label: string; icon: LucideIcon; + path: string; }; const SIDEBAR_ITEMS: SidebarItem[] = [ - { key: "dashboard", label: "概览面板", icon: LayoutDashboard }, - { key: "todo", label: "待办事项", icon: ListTodo }, - { key: "ai", label: "AI 建议", icon: Sparkles }, - { key: "notice", label: "提醒中心", icon: Bell }, - { key: "settings", label: "系统设置", icon: Settings } + { key: "dashboard", label: "概览面板", icon: LayoutDashboard, path: "/dashboard" }, + { key: "todo", label: "待办事项", icon: ListTodo, path: "/todo" }, + { key: "ai", label: "AI 助手", icon: Sparkles, path: "/ai" }, + { key: "notice", label: "提醒中心", icon: Bell, path: "/notice" }, + { key: "settings", label: "系统设置", icon: Settings, path: "/settings" } ]; -const READY_SIDEBAR_KEYS = new Set(["todo", "ai"]); +const READY_SIDEBAR_KEYS = new Set(["todo", "ai", "settings"]); function toWebSession(payload: EmailLoginResult): WebSession { return { @@ -106,7 +110,7 @@ function App() { saveSession(nextSession); setSession(nextSession); setMobileSidebarOpen(false); - navigate("/", { replace: true }); + navigate("/todo", { replace: true }); } function handleBootstrapSession(nextSession: WebSession): void { @@ -138,14 +142,21 @@ function App() {