Carlos Santos 1617e2b9d6 frontend: refactored video-room component and renamed by meeting component
- Implemented EndMeetingComponent to handle user disconnection scenarios.
- Created SCSS styles for the EndMeetingComponent to enhance UI/UX.
- Updated MeetingComponent to manage participant interactions and room functionalities.
- Added HTML structure for meeting access and participant form.
- Integrated routing to replace DisconnectedComponent with EndMeetingComponent.
- Added unit tests for MeetingComponent to ensure functionality.
2025-07-28 18:10:50 +02:00

110 lines
2.3 KiB
TypeScript

import { Routes } from '@angular/router';
import {
checkParticipantRoleAndAuthGuard,
checkRecordingAuthGuard,
checkUserAuthenticatedGuard,
checkUserNotAuthenticatedGuard,
extractRecordingQueryParamsGuard,
extractRoomQueryParamsGuard,
removeRoomSecretGuard,
runGuardsSerially,
validateRecordingAccessGuard
} from '@lib/guards';
import {
ConsoleComponent,
DevelopersSettingsComponent,
EndMeetingComponent,
ErrorComponent,
LoginComponent,
OverviewComponent,
RecordingsComponent,
RoomRecordingsComponent,
RoomsComponent,
RoomWizardComponent,
UsersPermissionsComponent,
MeetingComponent,
ViewRecordingComponent
} from '@lib/pages';
export const baseRoutes: Routes = [
{
path: 'login',
component: LoginComponent,
canActivate: [checkUserNotAuthenticatedGuard]
},
{
path: 'room/:room-id',
component: MeetingComponent,
canActivate: [
runGuardsSerially(extractRoomQueryParamsGuard, checkParticipantRoleAndAuthGuard, removeRoomSecretGuard)
]
},
{
path: 'room/:room-id/recordings',
component: RoomRecordingsComponent,
canActivate: [
runGuardsSerially(
extractRecordingQueryParamsGuard,
checkParticipantRoleAndAuthGuard,
validateRecordingAccessGuard,
removeRoomSecretGuard
)
]
},
{
path: 'recording/:recording-id',
component: ViewRecordingComponent,
canActivate: [checkRecordingAuthGuard]
},
{ path: 'disconnected', component: EndMeetingComponent },
{ path: 'error', component: ErrorComponent },
{
path: '',
component: ConsoleComponent,
canActivate: [checkUserAuthenticatedGuard],
children: [
{
path: '',
redirectTo: 'overview',
pathMatch: 'full'
},
{
path: 'overview',
component: OverviewComponent
},
{
path: 'rooms',
component: RoomsComponent
},
{
path: 'rooms/new',
component: RoomWizardComponent
},
{
path: 'rooms/:roomId/edit',
component: RoomWizardComponent
},
{
path: 'recordings',
component: RecordingsComponent
},
{
path: 'embedded',
component: DevelopersSettingsComponent
},
{
path: 'users-permissions',
component: UsersPermissionsComponent
},
// {
// path: 'about',
// component: AboutComponent
// },
{ path: '**', redirectTo: 'overview' }
]
},
// Redirect all other routes to the console
{ path: '**', redirectTo: '' }
];