Roots + lazy dir tree, virtualized grid with status badges and asset/slot/ download links, breadcrumb, sort, glob search, hidden toggle, filter chips, paging and truncation notice; multi-select (Shift/Ctrl/all), action bar, context menu, drag-to-move with dryRun preview, keyboard navigation, offline (503) and empty/error states, mobile layout with tree drawer. Rename/move/copy/delete dialogs with dryRun previews and reference checks, 4-step organize wizard, trash view (restore/restore-to/purge, expiry). DEV-only ?mock=1 in-memory backend; smoke route list includes /console/files. Co-Authored-By: Claude Opus 5.5 <[email protected]>
37 lines
1.8 KiB
TypeScript
37 lines
1.8 KiB
TypeScript
import { index, layout, prefix, type RouteConfig, route } from "@react-router/dev/routes";
|
|
|
|
// 显式路由表(W3-1 维护,其他工作区不改这里)。
|
|
// 控制台全部挂在 /console 下;/ 重定向到 /console;/login 为登录页(不经过控制台外壳)。
|
|
// 新增工作区:在这里加一行 + components/console/nav.ts 加导航项。
|
|
export default [
|
|
index("routes/index-redirect.tsx"),
|
|
route("login", "routes/login.tsx"),
|
|
...prefix("console", [
|
|
layout("routes/console/layout.tsx", [
|
|
index("routes/console/home.tsx"),
|
|
route("inbox", "routes/console/inbox.tsx"),
|
|
route("library", "routes/console/library.tsx"),
|
|
route("library/:id", "routes/console/library.$id.tsx"),
|
|
route("identity", "routes/console/identity.tsx"),
|
|
route("organize", "routes/console/organize.tsx"),
|
|
route("organize/:id", "routes/console/organize.$id.tsx"),
|
|
route("files", "routes/console/files.tsx"),
|
|
route("files/trash", "routes/console/files.trash.tsx"),
|
|
route("subscriptions", "routes/console/subscriptions.tsx"),
|
|
route("preferences", "routes/console/preferences.tsx"),
|
|
route("sites", "routes/console/sites.tsx"),
|
|
route("sites/:siteId", "routes/console/sites.$siteId.tsx"),
|
|
route("sources", "routes/console/sources.tsx"),
|
|
route("tasks", "routes/console/tasks.tsx"),
|
|
route("tasks/:id", "routes/console/tasks.$id.tsx"),
|
|
route("agent", "routes/console/agent.tsx"),
|
|
route("agent/:runId", "routes/console/agent.$runId.tsx"),
|
|
route("engine", "routes/console/engine.tsx"),
|
|
route("engine/:runId", "routes/console/engine.$runId.tsx"),
|
|
route("audit", "routes/console/audit.tsx"),
|
|
route("settings", "routes/console/settings.tsx"),
|
|
]),
|
|
]),
|
|
route("*", "routes/not-found.tsx"),
|
|
] satisfies RouteConfig;
|