48 lines
1.6 KiB
TypeScript
48 lines
1.6 KiB
TypeScript
import { Routes } from '@angular/router';
|
|
import { AuthGuard } from './core/guards/auth.guard';
|
|
import { LoginGuard } from './core/guards/login.guard';
|
|
|
|
export const routes: Routes = [
|
|
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
|
|
{
|
|
path: 'login',
|
|
loadComponent: () => import('./auth/login/login.component').then(m => m.LoginComponent),
|
|
canActivate: [LoginGuard],
|
|
},
|
|
{
|
|
path: 'verify-email',
|
|
loadComponent: () => import('./auth/verify-email/verify-email.component').then(m => m.VerifyEmailComponent),
|
|
},
|
|
{
|
|
path: 'register',
|
|
loadComponent: () => import('./auth/register/register.component').then(m => m.RegisterComponent),
|
|
canActivate: [LoginGuard],
|
|
},
|
|
{
|
|
path: 'resend-verification',
|
|
loadComponent: () => import('./auth/resend-verification/resend-verification.component').then(m => m.ResendVerificationComponent),
|
|
canActivate: [LoginGuard],
|
|
},
|
|
{
|
|
path: 'dashboard',
|
|
loadComponent: () => import('./dashboard/dashboard.component').then(m => m.DashboardComponent),
|
|
canActivate: [AuthGuard],
|
|
},
|
|
{
|
|
path: 'llm/:siteId',
|
|
loadComponent: () => import('./llm-workspace/llm-workspace.component').then(m => m.LlmWorkspaceComponent),
|
|
canActivate: [AuthGuard],
|
|
},
|
|
{
|
|
path: 'llm/:siteId/settings',
|
|
loadComponent: () => import('./llm-workspace/settings/settings.component').then(m => m.SettingsComponent),
|
|
canActivate: [AuthGuard],
|
|
},
|
|
{
|
|
path: 'llm/:siteId/git',
|
|
loadComponent: () => import('./llm-workspace/git-settings/git-settings.component').then(m => m.GitSettingsComponent),
|
|
canActivate: [AuthGuard],
|
|
},
|
|
{ path: '**', redirectTo: '/dashboard' },
|
|
];
|