feat(auth): add Ed25519 login page, error screens, wire routes

admin-login page + single parameterized auth-error-page covering all 5
error codes; auth.routes.ts registered top-level (not linked from live
nav yet). Also closes a real gap: /edit and /edit/:section had no
adminAuthGuard at all - now protected like /backoffice.
This commit is contained in:
sdarbinyan
2026-07-20 09:04:19 +04:00
parent 6510df6566
commit e53f90738c
8 changed files with 230 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ import { Routes } from '@angular/router';
import { languageGuard } from './guards/language.guard';
import { projectEditorDirtyGuard } from './features/project-editor/guards/project-editor-dirty.guard';
import { adminAuthGuard } from './core/admin-auth/admin-auth.guard';
import { authRoutes } from './core/auth/auth.routes';
import { adminCategoryDirtyGuard } from './features/admin/categories/guards/admin-category-dirty.guard';
import { AdminLayoutComponent } from './features/admin/shell/admin-layout.component';
import { environment } from '../environments/environment';
@@ -45,10 +46,12 @@ const coreRoutes: Routes = [
},
{
path: 'edit',
canActivate: [adminAuthGuard],
loadComponent: () => import('./features/project-editor/pages/builder-overview-page.component').then(m => m.BuilderOverviewPageComponent)
},
{
path: 'edit/:section',
canActivate: [adminAuthGuard],
loadComponent: () => import('./features/project-editor/pages/project-editor-page.component').then(m => m.ProjectEditorPageComponent),
canDeactivate: [projectEditorDirtyGuard]
},
@@ -294,6 +297,7 @@ export const routes: Routes = [
path: '__diagnostics',
loadComponent: () => import('./features/diagnostics/components/diagnostics-page.component').then(m => m.DiagnosticsPageComponent)
}]),
...authRoutes,
{
path: ':lang',
canActivate: [languageGuard],