Implement Owner Panel features and maintenance mode handling
- Introduced the Owner Panel with new routes and UI components for managing guilds, user blacklists, feature flags, and bot presence. - Added maintenance mode functionality to prevent non-owner users from executing commands during maintenance periods. - Enhanced localization with new keys for Owner Panel features in both English and German. - Updated job processing to include a presence refresh job, ensuring the bot's status is regularly updated. - Improved environment configuration to support owner user IDs for access control.
This commit is contained in:
37
apps/webui/src/app/owner/audit/page.tsx
Normal file
37
apps/webui/src/app/owner/audit/page.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { getLocale, t } from '@/lib/i18n';
|
||||
import { listOwnerAudit } from '@/lib/owner-audit';
|
||||
|
||||
export default async function OwnerAuditPage() {
|
||||
const [locale, entries] = await Promise.all([getLocale(), listOwnerAudit(100)]);
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div>
|
||||
<h1 className="text-2xl font-semibold">{t(locale, 'owner.audit.title')}</h1>
|
||||
<p className="text-sm text-muted-foreground">{t(locale, 'owner.audit.subtitle')}</p>
|
||||
</div>
|
||||
<Card>
|
||||
<CardContent className="divide-y divide-border p-0">
|
||||
{entries.length === 0 ? (
|
||||
<p className="p-4 text-sm text-muted-foreground">{t(locale, 'owner.common.empty')}</p>
|
||||
) : (
|
||||
entries.map((entry) => (
|
||||
<div key={entry.id} className="flex flex-col gap-1 px-4 py-3 text-sm sm:flex-row sm:justify-between">
|
||||
<div>
|
||||
<p className="font-medium">{entry.action}</p>
|
||||
<p className="text-muted-foreground">
|
||||
{entry.actorUserId}
|
||||
{entry.targetType ? ` · ${entry.targetType}` : ''}
|
||||
{entry.targetId ? ` · ${entry.targetId}` : ''}
|
||||
</p>
|
||||
</div>
|
||||
<span className="text-muted-foreground">{new Date(entry.createdAt).toLocaleString()}</span>
|
||||
</div>
|
||||
))
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user