2026-04-13 00:46:58 -06:00
|
|
|
import { auth } from "@/lib/auth";
|
|
|
|
|
import { redirect } from "next/navigation";
|
|
|
|
|
import { Navbar } from "@/components/Navbar";
|
UX/UI/perf pass: admin tabs, theme toggle, log polish, mod search, JAR cache
- Admin page split into tabs (Server/Players/Chat/Mods/Backups/Logs) with
hash + localStorage persistence; inactive tabs no longer mount.
- Log viewer: level color-coding, search, level filter chips, auto-scroll
toggle, copy button, visible-line count.
- Installed mods list: search field + side filter (all/both/server/client)
with live count; public ModList gets skeleton + empty states and search.
- Theme toggle with no-flash inline init, localStorage + system preference.
- Layout: full OG / Twitter metadata, title template, keywords,
dual-theme themeColor, metadataBase.
- lib/mods.ts: per-jar mtime+size parse cache (cold 6s -> warm ~45ms on
/api/mods for the full mod list); cache eviction on mod removal.
- ChatBridge polling eased 3s -> 5s with 2s stale window.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 04:58:25 -06:00
|
|
|
import { AdminTabs } from "@/components/AdminTabs";
|
2026-04-13 00:46:58 -06:00
|
|
|
import Link from "next/link";
|
|
|
|
|
|
|
|
|
|
export default async function AdminPage() {
|
|
|
|
|
const session = await auth();
|
|
|
|
|
if (!session) redirect("/login");
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Navbar />
|
|
|
|
|
|
|
|
|
|
<div className="border-b border-border bg-card py-4 sm:py-6">
|
|
|
|
|
<div className="max-w-5xl mx-auto px-3 sm:px-6">
|
|
|
|
|
<h1 className="text-xl sm:text-2xl font-bold tracking-tight">Admin Panel</h1>
|
|
|
|
|
<p className="text-sm text-muted-foreground mt-1">
|
|
|
|
|
Manage your Minecraft server
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
UX/UI/perf pass: admin tabs, theme toggle, log polish, mod search, JAR cache
- Admin page split into tabs (Server/Players/Chat/Mods/Backups/Logs) with
hash + localStorage persistence; inactive tabs no longer mount.
- Log viewer: level color-coding, search, level filter chips, auto-scroll
toggle, copy button, visible-line count.
- Installed mods list: search field + side filter (all/both/server/client)
with live count; public ModList gets skeleton + empty states and search.
- Theme toggle with no-flash inline init, localStorage + system preference.
- Layout: full OG / Twitter metadata, title template, keywords,
dual-theme themeColor, metadataBase.
- lib/mods.ts: per-jar mtime+size parse cache (cold 6s -> warm ~45ms on
/api/mods for the full mod list); cache eviction on mod removal.
- ChatBridge polling eased 3s -> 5s with 2s stale window.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 04:58:25 -06:00
|
|
|
<div className="max-w-5xl mx-auto px-3 py-4 sm:p-6 w-full overflow-x-hidden">
|
|
|
|
|
<AdminTabs />
|
2026-04-13 00:46:58 -06:00
|
|
|
|
UX/UI/perf pass: admin tabs, theme toggle, log polish, mod search, JAR cache
- Admin page split into tabs (Server/Players/Chat/Mods/Backups/Logs) with
hash + localStorage persistence; inactive tabs no longer mount.
- Log viewer: level color-coding, search, level filter chips, auto-scroll
toggle, copy button, visible-line count.
- Installed mods list: search field + side filter (all/both/server/client)
with live count; public ModList gets skeleton + empty states and search.
- Theme toggle with no-flash inline init, localStorage + system preference.
- Layout: full OG / Twitter metadata, title template, keywords,
dual-theme themeColor, metadataBase.
- lib/mods.ts: per-jar mtime+size parse cache (cold 6s -> warm ~45ms on
/api/mods for the full mod list); cache eviction on mod removal.
- ChatBridge polling eased 3s -> 5s with 2s stale window.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 04:58:25 -06:00
|
|
|
<div className="text-center mt-6">
|
|
|
|
|
<Link
|
|
|
|
|
href="/"
|
|
|
|
|
className="text-sm text-muted-foreground hover:text-foreground transition"
|
|
|
|
|
>
|
|
|
|
|
Back to dashboard
|
|
|
|
|
</Link>
|
2026-04-13 00:46:58 -06:00
|
|
|
</div>
|
UX/UI/perf pass: admin tabs, theme toggle, log polish, mod search, JAR cache
- Admin page split into tabs (Server/Players/Chat/Mods/Backups/Logs) with
hash + localStorage persistence; inactive tabs no longer mount.
- Log viewer: level color-coding, search, level filter chips, auto-scroll
toggle, copy button, visible-line count.
- Installed mods list: search field + side filter (all/both/server/client)
with live count; public ModList gets skeleton + empty states and search.
- Theme toggle with no-flash inline init, localStorage + system preference.
- Layout: full OG / Twitter metadata, title template, keywords,
dual-theme themeColor, metadataBase.
- lib/mods.ts: per-jar mtime+size parse cache (cold 6s -> warm ~45ms on
/api/mods for the full mod list); cache eviction on mod removal.
- ChatBridge polling eased 3s -> 5s with 2s stale window.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 04:58:25 -06:00
|
|
|
</div>
|
2026-04-13 00:46:58 -06:00
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
}
|