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:
1 parent
b621ec79a3
commit
928544100b
46 files changed
+790
-635
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { CreditCard } from "lucide-react";
|
||||
import { StatusCard } from "@/components/admin/dashboard";
|
||||
import { prisma } from "@/lib/prisma";
|
||||
|
||||
@@ -47,10 +48,15 @@ export default async function AdminSubscriptions() {
|
||||
|
||||
return (
|
||||
<main>
|
||||
<h1>Subscriptions</h1>
|
||||
<p className="muted" style={{ marginTop: "-0.4rem" }}>
|
||||
Active Habbo Club / VIP subscriptions (expiry > now). Read-only.
|
||||
</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">
|
||||
<CreditCard size={20} className="text-[var(--color-primary)]" />
|
||||
</div>
|
||||
<div>
|
||||
<h1 className="m-0 text-xl font-extrabold text-[var(--color-text)]">Subscriptions</h1>
|
||||
<p className="m-0 text-xs text-[var(--color-text-muted)] mt-0.5">Active Habbo Club / VIP subscriptions (expiry > now). Read-only.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-[repeat(auto-fit,minmax(180px,1fr))] gap-3.5 mb-6">
|
||||
<StatusCard label="Active subs" value={active.length} icon="⭐" />
|
||||
@@ -64,8 +70,8 @@ export default async function AdminSubscriptions() {
|
||||
</div>
|
||||
|
||||
<section className="mt-6">
|
||||
<h2>Active subscriptions ({active.length})</h2>
|
||||
<div className="card">
|
||||
<h2 className="admin-section-title">Active subscriptions ({active.length})</h2>
|
||||
<div className="admin-card">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -81,7 +87,7 @@ export default async function AdminSubscriptions() {
|
||||
const soon = s.expiresAt <= soonCutoff;
|
||||
return (
|
||||
<tr key={s.id}>
|
||||
<td className="muted">{s.id}</td>
|
||||
<td className="text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap">{s.id}</td>
|
||||
<td>{s.userId ?? "—"}</td>
|
||||
<td>{s.subscriptionType ?? "—"}</td>
|
||||
<td>
|
||||
@@ -89,13 +95,13 @@ export default async function AdminSubscriptions() {
|
||||
{soon ? "Expiring" : "Active"}
|
||||
</span>
|
||||
</td>
|
||||
<td className="muted">{fmt(s.expiresAt)}</td>
|
||||
<td className="text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap">{fmt(s.expiresAt)}</td>
|
||||
</tr>
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
{active.length === 0 ? <p className="muted">No active subscriptions.</p> : null}
|
||||
{active.length === 0 ? <div className="admin-empty">No active subscriptions.</div> : null}
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
Reference in new issue
Block a user