added admin dashboard

This commit is contained in:
2026-04-20 12:48:58 +02:00
parent 6145775922
commit d3f740cfa9
56 changed files with 4438 additions and 669 deletions
+14
View File
@@ -0,0 +1,14 @@
import type { LayoutServerLoad } from './$types';
import { listSubmissions } from '$lib/server/submissions';
import { unreadCount } from '$lib/server/notifications';
export const load: LayoutServerLoad = ({ locals, url }) => {
const submissionsCount = locals.admin ? listSubmissions().length : 0;
const unreadNotifications = locals.admin ? unreadCount() : 0;
return {
admin: locals.admin,
pathname: url.pathname,
submissionsCount,
unreadNotifications
};
};