Files
k-tv/k-tv-frontend/app/(main)/layout.tsx
Gabriel Kaszewski e805028d46 feat: add server-sent events for logging and activity tracking
- Implemented a custom tracing layer (`AppLogLayer`) to capture log events and broadcast them to SSE clients.
- Created admin routes for streaming server logs and listing recent activity logs.
- Added an activity log repository interface and SQLite implementation for persisting activity events.
- Integrated activity logging into user authentication and channel CRUD operations.
- Developed frontend components for displaying server logs and activity logs in the admin panel.
- Enhanced the video player with a stats overlay for monitoring streaming metrics.
2026-03-16 02:21:40 +01:00

47 lines
1.6 KiB
TypeScript

import Link from "next/link";
import { type ReactNode } from "react";
import { NavAuth } from "./components/nav-auth";
const NAV_LINKS = [
{ href: "/tv", label: "TV" },
{ href: "/guide", label: "Guide" },
{ href: "/dashboard", label: "Dashboard" },
{ href: "/admin", label: "Admin" },
{ href: "/docs", label: "Docs" },
];
export default function MainLayout({ children }: { children: ReactNode }) {
return (
<div className="flex min-h-screen flex-col bg-zinc-950 text-zinc-100">
<header className="sticky top-0 z-50 border-b border-zinc-800 bg-zinc-950/80 backdrop-blur">
<nav className="mx-auto flex h-14 max-w-7xl items-center justify-between px-6">
<Link
href="/"
className="text-sm font-semibold tracking-widest text-zinc-100 uppercase"
>
K-TV
</Link>
<div className="flex items-center gap-1">
<ul className="flex items-center gap-1">
{NAV_LINKS.map(({ href, label }) => (
<li key={href}>
<Link
href={href}
className="rounded-md px-3 py-1.5 text-sm text-zinc-400 transition-colors hover:bg-zinc-800 hover:text-zinc-100"
>
{label}
</Link>
</li>
))}
</ul>
<div className="ml-2 border-l border-zinc-800 pl-2">
<NavAuth />
</div>
</div>
</nav>
</header>
<main className="flex flex-1 flex-col">{children}</main>
</div>
);
}