Files
onebox/ui/src/app/app.routes.ts

101 lines
2.5 KiB
TypeScript
Raw Normal View History

2025-11-18 00:03:24 +00:00
import { Routes } from '@angular/router';
import { authGuard } from './core/guards/auth.guard';
export const routes: Routes = [
{
path: 'login',
loadComponent: () =>
import('./features/login/login.component').then((m) => m.LoginComponent),
},
{
path: '',
loadComponent: () =>
2025-11-24 19:52:35 +00:00
import('./shared/components/layout/layout.component').then(
(m) => m.LayoutComponent
),
canActivate: [authGuard],
2025-11-18 00:03:24 +00:00
children: [
{
path: '',
redirectTo: 'dashboard',
pathMatch: 'full',
},
{
path: 'dashboard',
loadComponent: () =>
2025-11-24 19:52:35 +00:00
import('./features/dashboard/dashboard.component').then(
(m) => m.DashboardComponent
),
2025-11-18 00:03:24 +00:00
},
{
path: 'services',
2025-11-24 19:52:35 +00:00
children: [
{
path: '',
loadComponent: () =>
import('./features/services/services-list.component').then(
(m) => m.ServicesListComponent
),
},
{
path: 'create',
loadComponent: () =>
import('./features/services/service-create.component').then(
(m) => m.ServiceCreateComponent
),
},
{
path: ':name',
loadComponent: () =>
import('./features/services/service-detail.component').then(
(m) => m.ServiceDetailComponent
),
},
],
2025-11-18 00:03:24 +00:00
},
{
2025-11-24 19:52:35 +00:00
path: 'domains',
children: [
{
path: '',
loadComponent: () =>
import('./features/domains/domains.component').then(
(m) => m.DomainsComponent
),
},
{
path: ':domain',
loadComponent: () =>
import('./features/domains/domain-detail.component').then(
(m) => m.DomainDetailComponent
),
},
],
2025-11-18 00:03:24 +00:00
},
{
2025-11-24 19:52:35 +00:00
path: 'dns',
2025-11-18 00:03:24 +00:00
loadComponent: () =>
2025-11-24 19:52:35 +00:00
import('./features/dns/dns.component').then((m) => m.DnsComponent),
2025-11-18 00:03:24 +00:00
},
{
path: 'registries',
loadComponent: () =>
import('./features/registries/registries.component').then(
(m) => m.RegistriesComponent
),
},
{
path: 'settings',
loadComponent: () =>
2025-11-24 19:52:35 +00:00
import('./features/settings/settings.component').then(
(m) => m.SettingsComponent
),
2025-11-18 00:03:24 +00:00
},
],
},
2025-11-24 19:52:35 +00:00
{
path: '**',
redirectTo: 'dashboard',
},
2025-11-18 00:03:24 +00:00
];