feat(design): the page band (B4) — one h1 per page, section headings, skip to content, filters fold on a short window (E28 S3d4)
- PageShell names the page with a visually hidden h1; a view with its own title renders it as PageHeading and the hidden one steps aside (contract: no hand <h1> inside the shell). - Section captions are SectionLabel headings (h2, h3 in a dialog), ui/form Section included. - "Skip to content" is the first Tab stop and focuses the scroller's <main>. - Below 600px of height the band's filter row folds into "Filters · n" (Feed, Plex, server log), the same row shown in place. - The band holds controls only: Downloads and Notifications lose their title cards, the Config and channel-discovery intros scroll with the content, the Stats tabs and the audit pager join the band, and the server log's toolbar sticks with the fade under it.
This commit is contained in:
@@ -13,6 +13,7 @@ import Tooltip from "./ui/Tooltip";
|
||||
import { LoadingState, StateMessage } from "./ui/QueryState";
|
||||
import FilterChipGroup from "./ui/FilterChipGroup";
|
||||
import Tabs from "./ui/Tabs";
|
||||
import { PageToolbar } from "./ui/PageShell";
|
||||
import { Section, SettingRow } from "./ui/form";
|
||||
import { useMe } from "../lib/useMe";
|
||||
import { notifyActionError } from "../lib/actionErrors";
|
||||
@@ -35,17 +36,23 @@ export default function Stats() {
|
||||
const tab: StatsTab = tabRaw === "system" && isAdmin ? "system" : "overview";
|
||||
|
||||
return (
|
||||
<div className="p-4 max-w-4xl mx-auto">
|
||||
{/* Only admins have a second (System) tab; everyone else just sees the Overview. */}
|
||||
<div className="px-4 pb-4 pt-3 max-w-4xl mx-auto">
|
||||
{/* Only admins have a second (System) tab; everyone else just sees the Overview. The tabs are
|
||||
the page's band (B4), so they stay in reach on the long System tab. */}
|
||||
{isAdmin && (
|
||||
<Tabs
|
||||
active={tab}
|
||||
onChange={setTab}
|
||||
tabs={(["overview", "system"] as StatsTab[]).map((id) => ({
|
||||
id,
|
||||
label: t(`stats.tabs.${id}`),
|
||||
}))}
|
||||
/>
|
||||
<PageToolbar>
|
||||
<div className="px-4 pt-2 max-w-4xl w-full mx-auto">
|
||||
<Tabs
|
||||
active={tab}
|
||||
onChange={setTab}
|
||||
tabs={(["overview", "system"] as StatsTab[]).map((id) => ({
|
||||
id,
|
||||
label: t(`stats.tabs.${id}`),
|
||||
}))}
|
||||
className="flex flex-wrap gap-1 pb-2"
|
||||
/>
|
||||
</div>
|
||||
</PageToolbar>
|
||||
)}
|
||||
|
||||
{tab === "system" && isAdmin ? <SystemStats /> : <Overview me={me} />}
|
||||
|
||||
Reference in New Issue
Block a user