Convert admin pages to new Tailwind design pattern

- Replace 'card' class with 'admin-card' (gradient cards, dark mode support)
- Replace 'muted' class with consistent Tailwind muted states
- Standardize page headers with gradient backgrounds and Lucide icons
- Convert all inline styles to Tailwind classes
- Add admin-page CSS helpers (admin-card, admin-filter-bar, admin-section-title)
- Apply pattern to all 42 admin pages (was only 6 before)
- Zero TypeScript errors, production builds successfully

Co-authored-by: openhands <[email protected]>
This commit is contained in:
openhands committed 2026-07-02 16:05:35 +02:00
1 parent b621ec79a3
commit 928544100b
46 files changed
+790 -635

No files matched your search

+13 -11
View File
@@ -2,6 +2,7 @@ import Link from 'next/link';
import { requireStaff } from '@/lib/admin/guard';
import { siteSettings } from '@/lib/services/site-settings';
import { StatusCard, DiagnosticRow } from '@/components/admin/dashboard';
import { Radio } from 'lucide-react';
export const dynamic = 'force-dynamic';
@@ -215,7 +216,7 @@ export default async function AdminRadioMonitoringPage() {
return (
<main>
<nav className="muted" style={{ marginBottom: '0.5rem' }}>
<nav className="text-xs text-gray-500 dark:text-gray-400 mb-2">
<Link href="/admin/radio">Radio</Link> ·{' '}
<Link href="/admin/radio/settings">Settings</Link> ·{' '}
<Link href="/admin/radio/monitoring">Monitoring</Link> ·{' '}
@@ -225,14 +226,15 @@ export default async function AdminRadioMonitoringPage() {
</nav>
<section className="mt-6">
<h2>Radio Monitoring</h2>
<p className="muted" style={{ marginTop: '-0.4rem' }}>
Read-only live probe of the configured radio endpoints
(<code>radio_now_playing_api_url</code>, <code>radio_listeners_api_url</code>).
Each request fails soft with a {FETCH_TIMEOUT_MS / 1000}s timeout — no data is
written. Configure URLs under{' '}
<Link href="/admin/radio/settings">Settings</Link>.
</p>
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-10 rounded-xl bg-gradient-to-br from-[var(--color-primary)]/20 to-[var(--color-primary)]/5 grid place-items-center">
<Radio size={20} className="text-[var(--color-primary)]" />
</div>
<div>
<h1 className="m-0 text-xl font-extrabold text-[var(--color-text)]">Radio Monitoring</h1>
<p className="m-0 text-xs text-[var(--color-text-muted)] mt-0.5">Read-only live probe of the configured radio endpoints (<code>radio_now_playing_api_url</code>, <code>radio_listeners_api_url</code>). Each request fails soft with a {FETCH_TIMEOUT_MS / 1000}s timeout — no data is written. Configure URLs under <Link href="/admin/radio/settings">Settings</Link>.</p>
</div>
</div>
<div className="grid grid-cols-[repeat(auto-fit,minmax(180px,1fr))] gap-3.5 mb-6">
<StatusCard
@@ -262,8 +264,8 @@ export default async function AdminRadioMonitoringPage() {
</section>
<section className="mt-6">
<h2>Endpoint diagnostics</h2>
<p className="muted" style={{ marginTop: '-0.4rem' }}>
<h2 className="admin-section-title">Endpoint diagnostics</h2>
<p className="text-xs text-gray-500 dark:text-gray-400">
<span className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-green-600/20 text-[var(--color-text)]">OK</span> reachable ·{' '}
<span className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-[var(--color-primary)]/18 text-[var(--color-text)]">WARN</span> not configured ·{' '}
<span className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-red-500/22 text-[var(--color-text)]">ERROR</span> fetch failed / timed out.