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:
@@ -3,6 +3,7 @@ import type { ReactNode } from 'react';
|
||||
import { DashboardShell } from '@/components/layout/dashboard-shell';
|
||||
import { requireGuildAccessOrRedirect } from '@/lib/auth';
|
||||
import { getManageableGuilds } from '@/lib/guilds';
|
||||
import { isOwnerUser } from '@/lib/owner-auth';
|
||||
|
||||
interface GuildLayoutProps {
|
||||
children: ReactNode;
|
||||
@@ -20,9 +21,16 @@ export default async function GuildLayout({ children, params }: GuildLayoutProps
|
||||
}
|
||||
|
||||
const otherGuilds = guilds.filter((guild) => guild.id !== guildId);
|
||||
const showOwnerLink = await isOwnerUser(session.user.id);
|
||||
|
||||
return (
|
||||
<DashboardShell guildId={guildId} currentGuild={currentGuild} otherGuilds={otherGuilds} user={session.user}>
|
||||
<DashboardShell
|
||||
guildId={guildId}
|
||||
currentGuild={currentGuild}
|
||||
otherGuilds={otherGuilds}
|
||||
user={session.user}
|
||||
showOwnerLink={showOwnerLink}
|
||||
>
|
||||
{children}
|
||||
</DashboardShell>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user