chore(toolchain): upgrade Bun to 1.4.4 and migrate console to TanStack Router
This commit is contained in:
1 parent
b44ebc2ba1
commit
3b9376c75a
134 files changed
+893
-692
No files matched your search
@@ -1,7 +1,6 @@
|
||||
import type { SessionInfo } from "@umt/contracts";
|
||||
import { Clapperboard, LoaderCircle, Menu, PanelLeftClose, PanelLeftOpen } from "lucide-react";
|
||||
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
||||
import { Link, Outlet, useLocation, useMatches } from "react-router";
|
||||
import { useSession } from "~/api/auth.ts";
|
||||
import { AgentDrawer, AgentDrawerTrigger } from "~/components/agent/agent-drawer.tsx";
|
||||
import { outletKey } from "~/components/agent/agent-store.ts";
|
||||
@@ -18,6 +17,7 @@ import { ThemeToggle } from "~/components/theme-toggle.tsx";
|
||||
import { Button } from "~/components/ui/button.tsx";
|
||||
import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from "~/components/ui/sheet.tsx";
|
||||
import { redirectToLogin } from "~/lib/api.ts";
|
||||
import { Link, Outlet, useLocation } from "~/lib/router-compat.tsx";
|
||||
import { cn } from "~/lib/utils.ts";
|
||||
|
||||
const PORTAL_NAME = "媒体自动化";
|
||||
@@ -173,7 +173,7 @@ function ConsoleShell({ session }: { session: SessionInfo }) {
|
||||
const [sheetOpen, setSheetOpen] = useState(false);
|
||||
const activeLabel = pageTitle(location.pathname) ?? PORTAL_NAME;
|
||||
// 路由 handle.layout === "wide"(文件管理):内容区不限最大宽度、不留外边距,页面自己排版
|
||||
const wide = useMatches().some((m) => (m.handle as { layout?: string } | undefined)?.layout === "wide");
|
||||
const wide = location.pathname === "/console/files";
|
||||
|
||||
return (
|
||||
<div className="app-scrollbars relative isolate flex min-h-screen overflow-x-clip bg-background">
|
||||
|
||||
Reference in new issue
Block a user