- Added OWNER_USER_IDS to .env.example for specifying global bot owners. - Introduced new models in the Prisma schema: CommandOverride, OwnerTeamMember, GlobalUserBlacklist, GuildBlacklist, FeatureFlag, BotPresenceConfig, ChangelogEntry, and OwnerAuditLog to support advanced bot management features. - Updated env.ts to preprocess OWNER_USER_IDS for better handling of global bot owner IDs. - Modified ModulePlaceholderPage to ensure proper routing for remaining dashboard modules.
31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
import { CaseListQuerySchema } from '@nexumi/shared';
|
|
import { CasesTable } from '@/components/modules/cases-table';
|
|
import { ModerationForm } from '@/components/modules/moderation-form';
|
|
import { getLocale, t } from '@/lib/i18n';
|
|
import { listCases } from '@/lib/module-configs/cases';
|
|
import { getModerationDashboard } from '@/lib/module-configs/moderation';
|
|
|
|
interface ModerationPageProps {
|
|
params: Promise<{ guildId: string }>;
|
|
}
|
|
|
|
export default async function ModerationPage({ params }: ModerationPageProps) {
|
|
const { guildId } = await params;
|
|
const [locale, moderation, cases] = await Promise.all([
|
|
getLocale(),
|
|
getModerationDashboard(guildId),
|
|
listCases(guildId, CaseListQuerySchema.parse({}))
|
|
]);
|
|
|
|
return (
|
|
<div className="space-y-6">
|
|
<div>
|
|
<h1 className="text-2xl font-semibold">{t(locale, 'modules.moderation.label')}</h1>
|
|
<p className="text-sm text-muted-foreground">{t(locale, 'modules.moderation.description')}</p>
|
|
</div>
|
|
<ModerationForm guildId={guildId} initialValue={moderation} />
|
|
<CasesTable guildId={guildId} initialCases={cases} />
|
|
</div>
|
|
);
|
|
}
|