fix: 审查修补前端布局重构并归档 change

- 补实现 ProtectedRoute 空壳组件(预留接口,不启用认证逻辑)
- 修复页面组件内联 style 为 CSS 类,符合样式规范
- 补充 Sidebar 菜单项激活状态测试、404 按钮可点击测试
- 回写 admin-layout spec Header 页面标题 fallback 行为
- 同步 delta specs 至主规范(admin-layout、frontend-routing、app-constants)
- 归档 refactor-frontend-layout change
This commit is contained in:
2026-05-24 22:28:17 +08:00
parent 4caf502908
commit 1e3269380e
16 changed files with 51 additions and 210 deletions

View File

@@ -11,7 +11,7 @@ export function NotFoundPage() {
return (
<Space align="center" className="not-found-page" direction="vertical" size="large">
<ErrorCircleIcon size="64px" style={{ color: "var(--td-warning-color)" }} />
<ErrorCircleIcon className="not-found-icon" size="64px" />
<h1>404</h1>
<p>访</p>
<Button onClick={handleGoHome} theme="primary">

View File

@@ -14,7 +14,7 @@ export function DashboardPage() {
});
return (
<Space direction="vertical" size="large" style={{ width: "100%" }}>
<Space className="full-width-space" direction="vertical" size="large">
<h2>使 {APP.title}</h2>
<p> /health API </p>
{health && <pre className="health-response">{JSON.stringify(health, null, 2)}</pre>}

View File

@@ -2,7 +2,7 @@ import { Card, Space } from "tdesign-react";
export function SettingsPage() {
return (
<Space direction="vertical" size="large" style={{ width: "100%" }}>
<Space className="full-width-space" direction="vertical" size="large">
<h2></h2>
<Card>
<p>...</p>

View File

@@ -2,7 +2,7 @@ import { Card, Space } from "tdesign-react";
export function UsersPage() {
return (
<Space direction="vertical" size="large" style={{ width: "100%" }}>
<Space className="full-width-space" direction="vertical" size="large">
<h2></h2>
<Card>
<p>...</p>

View File

@@ -1,3 +1,5 @@
import type { ReactNode } from "react";
import { Route, Routes } from "react-router";
import { NotFoundPage } from "./pages/404";
@@ -15,3 +17,7 @@ export function AppRoutes() {
</Routes>
);
}
export function ProtectedRoute({ children }: { children: ReactNode }) {
return children;
}

View File

@@ -86,6 +86,14 @@
color: var(--td-text-color-disabled);
}
.full-width-space {
width: 100%;
}
.not-found-icon {
color: var(--td-warning-color);
}
.tabular-nums {
font-variant-numeric: tabular-nums;
}