feat: refactor /me into admin-style layout with profile, security, recordings, analytics sub-pages

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 17:47:00 +01:00
parent 27e2ff5f66
commit ba648c796a
11 changed files with 870 additions and 713 deletions

View File

@@ -1,25 +1,4 @@
import { redirect } from "@sveltejs/kit";
import { getAnalytics, getFolders, getRecordings } from "$lib/services";
import { isModel } from "$lib/api";
export async function load({ locals, fetch }) {
// Redirect to login if not authenticated
if (!locals.authStatus.authenticated) {
throw redirect(302, "/login");
}
const recordings = await getRecordings(fetch).catch(() => []);
const analytics = isModel(locals.authStatus.user!)
? await getAnalytics(fetch).catch(() => null)
: null;
const folders = await getFolders(fetch).catch(() => []);
return {
authStatus: locals.authStatus,
folders,
recordings,
analytics,
};
export function load() {
throw redirect(302, "/me/profile");
}