From 8bde6f11568b0f49ed560af4fd17832b7ca1a537 Mon Sep 17 00:00:00 2001 From: Quick <31828688+Quick104@users.noreply.github.com> Date: Tue, 4 Aug 2026 11:43:50 -0400 Subject: [PATCH] feat(admin): improve responsive dashboard and settings (#539) --- web/src/app.css | 35 ++++ web/src/components/AdminLayout.tsx | 114 ++++++++--- web/src/components/AdminSidebar.test.tsx | 12 +- web/src/components/AdminSidebar.tsx | 14 +- web/src/components/ServerActivity.tsx | 9 +- .../settings/SettingsOverviewNav.tsx | 188 ++++++++++++++---- .../settings/SettingsSearchInput.tsx | 17 +- web/src/lib/documentTitle.test.ts | 3 + web/src/lib/documentTitle.ts | 3 + web/src/pages/AdminDashboard.tsx | 22 +- web/src/pages/AdminLibraries.tsx | 2 +- web/src/pages/AdminRequests.tsx | 18 +- .../AdminSettingsLayout.test.tsx | 55 +++++ .../admin-settings/AdminSettingsLayout.tsx | 8 +- 14 files changed, 401 insertions(+), 99 deletions(-) diff --git a/web/src/app.css b/web/src/app.css index 5c11f19f..f9df08bb 100644 --- a/web/src/app.css +++ b/web/src/app.css @@ -1805,10 +1805,45 @@ .admin-shell { width: 100%; + min-width: 0; max-width: 1560px; margin-inline: auto; } + /* AdminLayout owns the outer gutter. Older admin pages still use page-shell + for their max-width, so remove its second horizontal gutter when nested. */ + .admin-shell > .page-shell, + .admin-shell > .page-shell-wide { + padding-inline: 0; + } + + .admin-dashboard-stats { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); + gap: 0.875rem; + } + + @media (max-width: 639px) { + .admin-shell .page-header { + align-items: stretch; + } + + .admin-shell .page-header > * { + width: 100%; + min-width: 0; + } + + .admin-shell .page-header > :not(:first-child) { + flex-wrap: wrap; + justify-content: flex-start; + text-align: left; + } + + .admin-shell .page-header [data-slot="button"] { + min-height: 2.75rem; + } + } + /* ── Section Header ──────────────────────────────────────── */ /* Consistent section heading with optional icon. Usage: