Implement premium features and GDPR compliance in bot and WebUI
- Added new models for premium tier configurations and assignments, enabling feature limits for free and premium users. - Introduced GDPR deletion logging and commands for user data management. - Enhanced logging configuration with retention days for audit logs. - Updated bot commands and job processing to include new premium and GDPR functionalities. - Improved localization with new keys for premium features and GDPR commands in both English and German. - Added UI components for managing premium settings and logging retention in the WebUI.
This commit is contained in:
40
apps/webui/src/app/owner/premium/page.tsx
Normal file
40
apps/webui/src/app/owner/premium/page.tsx
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { PremiumTierConfig } from '@nexumi/shared';
|
||||
import { PremiumManager } from '@/components/owner/premium-manager';
|
||||
import { getLocale, t } from '@/lib/i18n';
|
||||
import { ensurePremiumTierConfigs } from '@/lib/premium';
|
||||
import { prisma } from '@/lib/prisma';
|
||||
|
||||
export default async function OwnerPremiumPage() {
|
||||
const [locale, tiers, guilds, users] = await Promise.all([
|
||||
getLocale(),
|
||||
ensurePremiumTierConfigs(prisma),
|
||||
prisma.guildPremiumAssignment.findMany({ orderBy: { updatedAt: 'desc' } }),
|
||||
prisma.userPremiumAssignment.findMany({ orderBy: { updatedAt: 'desc' } })
|
||||
]);
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div>
|
||||
<h1 className="text-2xl font-semibold">{t(locale, 'owner.premium.title')}</h1>
|
||||
<p className="text-sm text-muted-foreground">{t(locale, 'owner.premium.subtitle')}</p>
|
||||
</div>
|
||||
<PremiumManager
|
||||
initialTiers={tiers as PremiumTierConfig[]}
|
||||
initialGuilds={guilds.map((row) => ({
|
||||
id: row.id,
|
||||
guildId: row.guildId,
|
||||
tier: row.tier,
|
||||
note: row.note,
|
||||
expiresAt: row.expiresAt?.toISOString() ?? null
|
||||
}))}
|
||||
initialUsers={users.map((row) => ({
|
||||
id: row.id,
|
||||
userId: row.userId,
|
||||
tier: row.tier,
|
||||
note: row.note,
|
||||
expiresAt: row.expiresAt?.toISOString() ?? null
|
||||
}))}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user