Adds profile and settings pages

This commit is contained in:
2026-06-22 23:59:04 +02:00
parent 6976eb4337
commit 2544e20b3c
49 changed files with 2741 additions and 34 deletions
+9
View File
@@ -11,6 +11,7 @@ import type { SetupStatus } from '@/api/types';
import { api } from '@/lib/api-client';
import { AppLayout } from '@/components/layout/AppLayout';
import { LoginPage } from '@/pages/LoginPage';
import { NotFoundPage } from '@/pages/NotFoundPage';
import { RoleGuard } from '@/components/auth/RoleGuard';
export interface RouterContext {
@@ -92,6 +93,7 @@ function lazyPage<P extends Record<string, never>>(
const rootRoute = createRootRouteWithContext<RouterContext>()({
pendingComponent: BootstrapSplash,
pendingMs: 0,
notFoundComponent: NotFoundPage,
beforeLoad: async ({ location }) => {
let status: SetupStatus;
try {
@@ -205,11 +207,18 @@ const profileRoute = createRoute({
component: lazyPage(() => import('@/pages/ProfilePage'), 'ProfilePage'),
});
const accessDeniedRoute = createRoute({
getParentRoute: () => rootRoute,
path: '/403',
component: lazyPage(() => import('@/pages/AccessDeniedPage'), 'AccessDeniedPage'),
});
export const routeTree = rootRoute.addChildren([
indexRoute,
loginRoute,
setupRoute,
inviteCompleteRoute,
accessDeniedRoute,
authenticatedRoute.addChildren([dashboardRoute, usersRoute, cmsRoute, settingsRoute, profileRoute]),
]);