polish(ui): full-system layout audit, header titles for all routes, dialog title truncation

- headless DOM audit (Edge dump, 1440/390 x 10 routes): no real horizontal page overflow on any screen size; timeline bleed & drawer offsets are intentional and verified benign
- header now labels profile/resume/assessment/admin routes (was blank h1 on those pages)
- dialog header truncates long titles instead of pushing controls out
- page containers audited for consistent rhythm (1080/1280/880 widths share identical paddings)
- www rebuilt, temp instrumentation removed
This commit is contained in:
root
2026-10-17 19:51:52 +08:00
parent a668647f35
commit 3613b9f5e1
19 changed files with 44 additions and 34 deletions
+5 -1
View File
@@ -9,7 +9,11 @@ const TITLES: Record<string, { title: string; sub?: string }> = {
'/grades': { title: '成绩', sub: '学年学科成绩 · 梯度与总览' },
'/dashboard': { title: '统计', sub: '量化个人成长收获' },
'/types': { title: '记录类型', sub: '类型与字段模板管理' },
'/taxonomy': { title: '字典与维度', sub: '级别、角色与成长维度' }
'/taxonomy': { title: '字典与维度', sub: '级别、角色与成长维度' },
'/profile': { title: '个人信息', sub: '学籍与联系方式维护' },
'/resume': { title: '我的简历', sub: '模板配置 · Word 导出' },
'/assessment': { title: '综合测评', sub: '学年素质测评与材料导出' },
'/admin': { title: '管理', sub: '用户与邀请码 · 数据维护' },
};
export function Header({ onMenu }: { onMenu?: () => void }) {
+1 -1
View File
@@ -29,7 +29,7 @@ export function Dialog({ open, onClose, title, width = 560, children, footer }:
role="dialog"
>
<div className="flex h-12 items-center justify-between border-b border-line px-4">
<div className="text-sm font-semibold text-ink-1">{title}</div>
<div className="min-w-0 flex-1 truncate text-sm font-semibold text-ink-1">{title}</div>
<Button variant="ghost" size="icon-sm" onClick={onClose} aria-label="关闭">
<X size={15} />
</Button>
+3 -1
View File
@@ -5,6 +5,8 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import App from './App';
import './styles/theme.css';
const queryClient = new QueryClient({
defaultOptions: {
queries: { retry: 1, refetchOnWindowFocus: true, staleTime: 0, gcTime: 0 }
@@ -40,4 +42,4 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
</HashRouter>
</QueryClientProvider>
</React.StrictMode>
);
);