import Link from "next/link"; import { notFound } from "next/navigation"; import { type ModLogEntry, type ReportEntry, banText, memberHref, threadHref } from "@/lib/forum"; import { forumGet } from "@/lib/forumServer"; import { ReportsList } from "./ReportsList"; export const metadata = { title: "Moderálás", robots: { index: false } }; const ACTIONS: Record = { delete_post: "hozzászólást távolított el", restore_post: "hozzászólást állított vissza", delete_thread: "szálat távolított el", restore_thread: "szálat állított vissza", ban: "eltiltotta", unban: "feloldotta az eltiltását", lock: "lezárta a szálat", unlock: "feloldotta a szálat", pin: "kitűzte a szálat", unpin: "levette a kitűzést", resolve_report: "lezárt egy jelentést", dismiss_report: "alaptalannak ítélt egy jelentést", }; type Props = { searchParams: Promise<{ nezet?: string }> }; /** Moderators: the open reports, and the log of every moderation step. */ export default async function ModerationPage({ searchParams }: Props) { const log = (await searchParams).nezet === "naplo"; return (

Moderálás

{log ? : }
); } async function ReportsView() { const res = await forumGet<{ reports: ReportEntry[] }>("/v1/forum/mod/reports"); if (!res.ok) notFound(); return ; } async function LogView() { const res = await forumGet<{ entries: ModLogEntry[] }>("/v1/forum/mod/log"); if (!res.ok) notFound(); if (res.data.entries.length === 0) return

Még nem volt moderálás.

; return ( ); }