import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { ActionForm, SubmitButton } from "@/components/forms"; import { AgeTag, PageHeader, Tag } from "@/components/status"; import { DateTime } from "@/components/time"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { NativeSelect, NativeSelectOption } from "@/components/ui/native-select"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; import { api, ApiError, unwrap } from "@/lib/api"; import { ban, setLinkCap, setRole, unban } from "../../actions"; import { ConsoleNav, requireModerator } from "../../console-nav"; export const metadata: Metadata = { title: "Person" }; export default async function PersonPage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; const me = await requireModerator(`/console/people/${id}`); let data; try { data = unwrap(await api.console.people({ id }).get()); } catch (e) { if (e instanceof ApiError && e.status === 404) notFound(); throw e; } const { person, links, computers } = data; return ( <> {person.role} · joined {person.banned && banned: {person.banReason}}
IMVU accounts {links.length} of {person.linkCap}. Only moderators see which IMVU accounts belong to one person. {links.length === 0 ? (

None.

) : ( IMVU account ID Linked Age Shows {links.map((l) => ( {l.username} {l.online && ( online )} {l.imvuId} {[l.showBadge && "badge", l.showPresence && "presence"].filter(Boolean).join(", ") || "nothing"} ))}
)}

Signed in on {computers} computer{computers === 1 ? "" : "s"}.

Link cap How many IMVU accounts they can link (normally 10).
Set
Ban {person.banned ? `Banned: ${person.banReason}` : "Covers all their IMVU accounts, and signs them out everywhere."} {person.banned ? ( Unban ) : ( Ban )} {me.role === "admin" && ( Role Moderators use the console; admins also set roles.
User Moderator Admin Set
)}
); }