Dark muted surfaces missed WCAG AA; action and tertiary tokens plus a 32-pair contract close that. Hit targets, remaining-count, and Enter-to-send follow the interaction audit without changing visual sizes. Co-authored-by: Cursor <cursoragent@cursor.com>
62 lines
2.2 KiB
TypeScript
62 lines
2.2 KiB
TypeScript
// Sits in the shared root layout segment and must not import the site
|
|
// stylesheet — that would drag the chat styles onto every admin route — so it
|
|
// restates the few tokens it needs, in both themes, kept in step by hand.
|
|
// It used to paint a bespoke near-black page in colours that appear nowhere in
|
|
// the palette, which broke the rule that dark ink is punctuation and never a
|
|
// page-scale surface.
|
|
const canvas = "var(--bp-canvas)";
|
|
const ink = "var(--bp-ink)";
|
|
const inkSecondary = "var(--bp-ink-soft)";
|
|
const action = "var(--bp-action)";
|
|
|
|
export default function Forbidden() {
|
|
return (
|
|
<main
|
|
style={{
|
|
alignItems: "center",
|
|
background: canvas,
|
|
color: ink,
|
|
display: "flex",
|
|
fontFamily:
|
|
'-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif',
|
|
justifyContent: "center",
|
|
minHeight: "100vh",
|
|
padding: "2rem",
|
|
}}
|
|
>
|
|
<style>{`
|
|
:root {
|
|
color-scheme: light;
|
|
--bp-canvas: #fbfaf7;
|
|
--bp-ink: #1d1d1f;
|
|
--bp-ink-soft: #5f5f59;
|
|
--bp-action: #85432f;
|
|
}
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not([data-theme="light"]) {
|
|
color-scheme: dark;
|
|
--bp-canvas: #262624;
|
|
--bp-ink: #f2f0ea;
|
|
--bp-ink-soft: #b3afa4;
|
|
--bp-action: #d78064;
|
|
}
|
|
}
|
|
:root[data-theme="dark"] {
|
|
color-scheme: dark;
|
|
--bp-canvas: #262624;
|
|
--bp-ink: #f2f0ea;
|
|
--bp-ink-soft: #b3afa4;
|
|
--bp-action: #d78064;
|
|
}
|
|
`}</style>
|
|
<section style={{ maxWidth: "32rem", textAlign: "center" }}>
|
|
<p style={{ color: action, fontSize: "14px", fontWeight: 500, letterSpacing: "0.12em", margin: 0 }}>403</p>
|
|
<h1 style={{ color: ink, fontSize: "20px", fontWeight: 600, margin: "12px 0 0" }}>无权访问后台</h1>
|
|
<p style={{ color: inkSecondary, fontSize: "14px", lineHeight: 1.7, margin: "12px 0 0" }}>
|
|
当前账号已登录,但没有后台访问权限。请联系管理员核对角色授权。
|
|
</p>
|
|
</section>
|
|
</main>
|
|
);
|
|
}
|