feat: implement admin dashboard with authentication and title management capabilities

This commit is contained in:
Michael committed 2026-04-10 11:45:57 +02:00
1 parent d253eff0fa
commit 0bfed1adf2
4 files changed
+115 -1

No files matched your search

+7
View File
@@ -6,6 +6,7 @@ import { LogOut, ArrowLeft, Trash2 } from 'lucide-react';
import Link from 'next/link';
import { AddButtonForm } from '@/components/AddButtonForm';
import { AdminButtonRow } from '@/components/AdminButtonRow';
import { EditTitleForm } from '@/components/EditTitleForm';
export const dynamic = 'force-dynamic';
@@ -17,6 +18,9 @@ export default async function AdminPage() {
orderBy: { order: 'asc' },
});
const titleConfig = await prisma.config.findUnique({ where: { id: 'app_title' } });
const appTitle = titleConfig?.value || 'Menu Application';
return (
<div style={{ minHeight: '100vh', padding: '1.5rem 2rem', maxWidth: '860px', margin: '0 auto' }}>
@@ -70,6 +74,9 @@ export default async function AdminPage() {
</div>
</header>
{/* Edit Title Form */}
<EditTitleForm currentTitle={appTitle} />
{/* Add form */}
<AddButtonForm />