Design: Onest+Unbounded font pairing (Cyrillic-verified, replacing plain
Golos Text), manual light/dark toggle wired to the data-theme cascade
already built in MVP-1, refreshed palette + new chart-mark tokens
(CVD-validated via the dataviz skill's validator), colored avatar
initials, per-channel colored badges, favicon, nicer empty states.
Stats: /stats page — status/channel breakdown, 14-day ticket volume,
avg first-response time, per-agent open-ticket workload. Colors and
chart forms follow the dataviz skill's procedure (categorical order
re-stepped to clear the CVD adjacency check in both themes).
Internal notes: messages.visibility ("public"/"internal") column.
Agent-only notes never reach customer-facing reads (getTicketForCustomer)
or the customer SSE stream (/api/portal/events, reused by the widget) —
fixed at both the initial-fetch and live-delivery layers.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QcXH24ky6zjk2UyK5oZUPH
36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
import { redirect } from "next/navigation";
|
|
import { Ticket } from "lucide-react";
|
|
import { getCurrentSession } from "@/lib/auth/session";
|
|
import { LogoutButton } from "./logout-button";
|
|
import { NavLinks } from "./nav-links";
|
|
import { ThemeToggle } from "./theme-toggle";
|
|
|
|
export default async function AdminLayout({ children }: { children: React.ReactNode }) {
|
|
const session = await getCurrentSession();
|
|
if (!session) {
|
|
redirect("/login");
|
|
}
|
|
|
|
return (
|
|
<div className="flex min-h-screen flex-col bg-bg">
|
|
<header className="border-b border-border bg-surface">
|
|
<div className="mx-auto flex max-w-7xl items-center gap-6 px-6 py-3">
|
|
<div className="flex items-center gap-2 font-display text-[15px] font-bold tracking-tight">
|
|
<div className="flex h-7 w-7 items-center justify-center rounded-md bg-accent text-white">
|
|
<Ticket size={15} strokeWidth={2.5} />
|
|
</div>
|
|
top-tickets
|
|
</div>
|
|
<NavLinks />
|
|
<div className="ml-auto flex items-center gap-3">
|
|
<span className="text-sm text-text-muted">{session.user.name}</span>
|
|
<ThemeToggle />
|
|
<LogoutButton />
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<main className="mx-auto w-full max-w-7xl flex-1 px-6 py-6">{children}</main>
|
|
</div>
|
|
);
|
|
}
|