From 852c327360a21ba12404f5c52d06c83e1173e840 Mon Sep 17 00:00:00 2001
From: AskaEth
Date: Sun, 4 Oct 2026 14:01:43 +0800
Subject: [PATCH] =?UTF-8?q?refactor(web):=20=E9=9A=8F=E8=B7=AF=E5=BE=84?=
=?UTF-8?q?=E5=BC=8F=E5=85=A5=E5=8F=A3=E6=B8=85=E7=90=86=E5=A4=B1=E6=95=88?=
=?UTF-8?q?=E7=9A=84=E7=AE=A1=E7=90=86=E9=93=BE=E6=8E=A5=EF=BC=88=E8=AE=BE?=
=?UTF-8?q?=E8=AE=A1=EF=BC=9A=E7=94=A8=E6=88=B7=E7=AB=AF=E4=B8=8D=E6=8F=90?=
=?UTF-8?q?=E4=BE=9B=E7=AE=A1=E7=90=86=E5=85=A5=E5=8F=A3=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- TopBar / Nav 的 hash 形式管理入口(#/admin、#/admin/system)**删除**(design/07 §0.2:用户端不提供任何
管理入口、bundle 不含该路径串);面板只经 ADMIN_PATH 路径直入
- AdminApp 三处 window.location.hash = "" 改调 router 导出的 navigateUserShell()
- 复核:tsc 0 错 + vite build 成功;用户端源码 grep "#/admin" 0 命中(仅在 channels/useAdapterNav.ts
尚有模块内闭环的 hash 字面量,属另一决策,仅报告未改)
- 局限:无 playwright/puppeteer 且不许加依赖 ⇒ 「布局未塌」为结构+静态样式依赖推断(无子元素数量相关样式)
---
frontend/web/src/admin/AdminApp.tsx | 8 ++++----
frontend/web/src/components/Nav.tsx | 18 +-----------------
frontend/web/src/components/TopBar.tsx | 8 --------
3 files changed, 5 insertions(+), 29 deletions(-)
diff --git a/frontend/web/src/admin/AdminApp.tsx b/frontend/web/src/admin/AdminApp.tsx
index b81f401..514183e 100644
--- a/frontend/web/src/admin/AdminApp.tsx
+++ b/frontend/web/src/admin/AdminApp.tsx
@@ -5,7 +5,7 @@ import { useAppStore } from "../store/useAppStore";
import type { WsStatus } from "../lib/types";
import { UiModeSwitch } from "../design/UiModeSwitch";
import { ADMIN_GROUPS, ADMIN_SECTIONS } from "./sections";
-import { navigateAdmin, type AdminSectionId } from "./router";
+import { navigateAdmin, navigateUserShell, type AdminSectionId } from "./router";
import { Button, Tag, type TagTone } from "../components/primitives";
import { Icon } from "../components/Icon";
import { DashboardModule } from "./modules/Dashboard";
@@ -239,7 +239,7 @@ function AdminTopBar({ section, onMenu }: { section: AdminSectionId; onMenu?: ()
>