frontend: enhance room creation navigation by extracting path and query parameters from moderator URL
This commit is contained in:
parent
9ee5519520
commit
12b943764e
@ -129,9 +129,12 @@ export class RoomWizardComponent implements OnInit {
|
|||||||
|
|
||||||
async createRoom(roomName?: string) {
|
async createRoom(roomName?: string) {
|
||||||
try {
|
try {
|
||||||
// Call the room service to create a new room
|
|
||||||
const { moderatorUrl } = await this.roomService.createRoom({ roomName });
|
const { moderatorUrl } = await this.roomService.createRoom({ roomName });
|
||||||
await this.navigationService.redirectTo(moderatorUrl);
|
|
||||||
|
// Extract the path and query parameters from the moderator URL and navigate to it
|
||||||
|
const url = new URL(moderatorUrl);
|
||||||
|
const pathWithParams = url.pathname + url.search + url.hash;
|
||||||
|
await this.navigationService.redirectTo(pathWithParams);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const errorMessage = `Failed to create room ${roomName}`;
|
const errorMessage = `Failed to create room ${roomName}`;
|
||||||
this.notificationService.showSnackbar(errorMessage);
|
this.notificationService.showSnackbar(errorMessage);
|
||||||
@ -158,7 +161,11 @@ export class RoomWizardComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
// Create new room
|
// Create new room
|
||||||
const { moderatorUrl } = await this.roomService.createRoom(roomOptions);
|
const { moderatorUrl } = await this.roomService.createRoom(roomOptions);
|
||||||
await this.navigationService.redirectTo(moderatorUrl);
|
|
||||||
|
// Extract the path and query parameters from the moderator URL and navigate to it
|
||||||
|
const url = new URL(moderatorUrl);
|
||||||
|
const pathWithParams = url.pathname + url.search + url.hash;
|
||||||
|
await this.navigationService.redirectTo(pathWithParams);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const errorMessage = `Failed to ${this.editMode ? 'update' : 'create'} room`;
|
const errorMessage = `Failed to ${this.editMode ? 'update' : 'create'} room`;
|
||||||
|
|||||||
@ -439,7 +439,7 @@ export class MeetingComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Navigate to the disconnected page with the reason
|
// Navigate to the disconnected page with the reason
|
||||||
await this.navigationService.navigateTo('disconnected', { reason: leftReason });
|
await this.navigationService.navigateTo('disconnected', { reason: leftReason }, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user