Files
frontend/src/app/app-routing-module.ts
Piet Ostendorp f4eb700ab4 Add zoom and device detection with warning component
Introduces DeviceDetectionService and ZoomDetectionService to detect mobile devices and browser zoom level. Adds ZoomWarningComponent to display warnings for unsupported mobile devices and non-optimal browser zoom, and integrates it into the app layout. Updates routing to allow mobile access for the 'poc-model' route.
2025-11-18 23:00:18 +01:00

43 lines
1.5 KiB
TypeScript

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { PocModelComponent } from './poc-model-component/poc-model-component';
import { HomeComponent } from './home/home.component';
import { MainLayoutComponent } from './layouts/main-layout/main-layout.component';
import { MainComponent } from './main/main.component';
import { ScheduleComponent } from './schedule/schedule.component';
import { TheaterOverlayComponent} from './theater-overlay/theater-overlay.component';
import { MovieImporterComponent } from './movie-importer/movie-importer.component';
import { AuthGuard } from './auth.guard';
const routes: Routes = [
// Seiten ohne Layout
{ path: 'landing', component: HomeComponent },
{ path: 'poc-model', component: PocModelComponent, data: { allowMobile: true } },
// Seiten mit MainLayout
{
path: '',
component: MainLayoutComponent,
children: [
{ path: '', component: MainComponent },
{ path: 'schedule', component: ScheduleComponent },
{
path: 'admin/movie-importer',
component: MovieImporterComponent,
canActivate: [AuthGuard],
data: { roles: ['admin'] }, // Array von erlaubten Rollen. Derzeit gäbe es 'admin' und 'employee'
},
{ path: 'performance/:performanceId/checkout', component: TheaterOverlayComponent},
],
},
// Fallback-Route
{ path: '**', component: HomeComponent },
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule {}