Root cause: only admin/index.html had explicit .input / .select / .label classes.
100+ inputs across logical-groups / route-health / accounts / providers /
admin-batch-import + public portal had no class → browser default styling →
页面看起来「未统一」。
Fix:
- portal.css: add global rules that auto-apply design system styling to
any input/select/textarea/label/button/table that doesn't opt out
via .raw-input / .field-label. The existing .input / .select /
.label / .btn classes still win (same styles, just explicit).
- portal.js: detectInitialTheme() now respects HTML's data-theme
attribute first (page author intent), then localStorage, then OS
preference. This makes admin pages' explicit data-theme="dark"
actually stick instead of being overridden.
- admin/index.html: h3 标题 8 个 article 统一用 class="card-title"
(前 4 个 inline 15px / 后 3 个 inline 16px 已统一)
- 6 admin pages: 修复 critical HTML 结构 bug — 之前 batch 处理的
残留让 <link> 和 <style> 嵌套在 <style>:root{} 块内,浏览器
解析时直接忽略,导致所有 stylesheet 不加载、整个页面无样式
Verification:
- bash scripts/test/test_tksea_portal_assets.sh → PASS
- bash scripts/test/verify_frontend_smoke.sh → PASS
- 8 张 screenshot v4 在 /tmp/portal-screenshots/ (各 600KB-1.2MB)
- 浏览器实测:3 stylesheets 加载,103 个 input 全部 38px/12px 圆角输入框
35 个 label 全部 12px uppercase slate-400
6 个 select 全部 38px + 自定义箭头
33 lines
1.3 KiB
HTML
33 lines
1.3 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN" data-theme="dark">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Batch Import Admin Redirect</title>
|
|
<meta http-equiv="refresh" content="0; url=/portal/admin-batch-import.html">
|
|
<link rel="stylesheet" href="/portal/portal.css">
|
|
<link rel="stylesheet" href="/portal/admin-common.css">
|
|
<style>
|
|
.redirect-card {
|
|
width: min(34rem, calc(100vw - 2rem));
|
|
padding: 28px;
|
|
border-radius: var(--r-xl);
|
|
border: 1px solid var(--border-subtle);
|
|
background: var(--bg-elev-1);
|
|
box-shadow: var(--shadow-glass);
|
|
backdrop-filter: blur(8px);
|
|
-webkit-backdrop-filter: blur(8px);
|
|
}
|
|
.redirect-card a { color: var(--color-primary); font-weight: 700; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<main class="redirect-card">
|
|
<h1 style="margin:0 0 8px;font-size:20px;font-weight:700;color:var(--text-strong);">正在跳转到导入供应商帐号页面</h1>
|
|
<p style="margin:8px 0;color:var(--text-muted);font-size:13px;line-height:1.6;">如果浏览器没有自动跳转,请手动打开:</p>
|
|
<p style="margin:8px 0 0;"><a href="/portal/admin-batch-import.html">/portal/admin-batch-import.html</a></p>
|
|
</main>
|
|
<script src="/portal/portal.js"></script>
|
|
</body>
|
|
</html>
|