feat(webui): custom scrollbars + sliders, stat-tile fit, reduce-motion

- Scrollbars: theme native scrollbars (thin, token-colored thumb) for plain
  overflow containers; Radix ScrollArea keeps its own custom bar (it hides
  the native one, so no double bar).
- Sliders: new <Slider> component + `.slider` CSS replaces the native range
  inputs (UI scale / mask opacity / blur). Filled track + ring-bordered
  thumb, themed; input height matches the track so the thumb centers in every
  engine; Firefox fills via ::-moz-range-progress.
- Stat tiles: tighten the h=1 tile (py-2 + mt-0.5) so the three text lines +
  padding fit the 80px cell without hugging the border.
- Reduce motion: gate the always-present sidebar-width + page-transition
  animations to instant when enabled (Framer's reducedMotion only suppresses
  transforms, so these needed an explicit opt-out); kill the slider thumb
  transition too.
This commit is contained in:
DrSmoothl committed 2026-06-14 00:16:26 +08:00
1 parent 7d647e0ed7
commit 9dd46198cb
5 files changed
+129 -16

No files matched your search

@@ -173,7 +173,7 @@ function StatTile({
to?: AppPath;
}) {
const body = (
<CardContent className="flex h-full items-center gap-2.5 overflow-hidden px-4 py-3">
<CardContent className="flex h-full items-center gap-2.5 overflow-hidden px-4 py-2">
<div
className={cn(
'flex size-9 shrink-0 items-center justify-center rounded-xl',
@@ -184,8 +184,8 @@ function StatTile({
</div>
<div className="min-w-0 flex-1">
<p className="truncate text-[11px] font-medium uppercase leading-tight tracking-wider text-muted-foreground">{label}</p>
<div className="mt-1 truncate text-[15px] font-semibold leading-tight tabular-nums">{value}</div>
{subtext && <p className="mt-1 truncate text-[11px] leading-tight text-muted-foreground">{subtext}</p>}
<div className="mt-0.5 truncate text-[15px] font-semibold leading-tight tabular-nums">{value}</div>
{subtext && <p className="mt-0.5 truncate text-[11px] leading-tight text-muted-foreground">{subtext}</p>}
</div>
{to && <ArrowRight className="size-4 shrink-0 text-muted-foreground/60" />}
</CardContent>