Files
t5de-hub/apps/web/components/header.tsx
T
dhkatzandClaude Opus 5.5 6ba4d83317
CI / test (push) Successful in 6m38s
Room channel and rooms list
The realtime connection now carries the IMVU chats a client is in: the hub tells each proxy in a chat which
other T5DE users are there and what community products they wear (adult products only to adult accounts), on
joining and on every change. Rooms T5DE users enter are looked up on IMVU; those that are public, listed and
whose owner turned on "List my public rooms" appear on the new Rooms page, with the T5DE users in them who
show they're online. AP rooms are shown to adults only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 18:14:43 -07:00

53 lines
1.7 KiB
TypeScript

import Link from "next/link";
import { getMe, isModerator } from "@/lib/api";
import { buttonVariants } from "@/components/ui/button";
import { NavLink, SignOutButton } from "./header-client";
export function Logo() {
return (
<span
className="grid size-7 place-items-center rounded-md bg-foreground text-[11px] font-bold tracking-tight text-background"
aria-hidden
>
T5
</span>
);
}
export async function Header() {
const me = await getMe();
return (
<header className="border-b">
<div className="mx-auto flex max-w-5xl flex-wrap items-center gap-x-6 gap-y-2 px-4 py-3 sm:px-6">
<Link href="/" className="flex items-center gap-2 font-semibold">
<Logo />
T5DE Hub
</Link>
<nav className="order-last flex w-full items-center gap-1 text-sm sm:order-none sm:w-auto">
<NavLink href="/online">Online</NavLink>
<NavLink href="/rooms">Rooms</NavLink>
{me && <NavLink href="/account">Account</NavLink>}
{isModerator(me) && <NavLink href="/console">Console</NavLink>}
</nav>
<div className="ml-auto flex items-center gap-2 text-sm">
{me ? (
<>
<span className="hidden text-muted-foreground sm:inline">{me.username}</span>
<SignOutButton />
</>
) : (
<>
<Link href="/signin" className={buttonVariants({ variant: "ghost" })}>
Sign in
</Link>
<Link href="/signup" className={buttonVariants()}>
Create account
</Link>
</>
)}
</div>
</div>
</header>
);
}