diff --git a/frontend/projects/shared-meet-components/src/lib/components/console-nav/console-nav.component.ts b/frontend/projects/shared-meet-components/src/lib/components/console-nav/console-nav.component.ts index a8a0e88..931d47a 100644 --- a/frontend/projects/shared-meet-components/src/lib/components/console-nav/console-nav.component.ts +++ b/frontend/projects/shared-meet-components/src/lib/components/console-nav/console-nav.component.ts @@ -7,12 +7,20 @@ import { MatSidenav, MatSidenavModule } from '@angular/material/sidenav'; import { MatToolbarModule } from '@angular/material/toolbar'; import { RouterModule } from '@angular/router'; import { ConsoleNavLink } from '../../models/sidenav.model'; +import { ContextService } from 'shared-meet-components'; -import packageJson from 'package.json'; @Component({ selector: 'ov-console-nav', standalone: true, - imports: [CommonModule, MatToolbarModule, MatListModule, MatButtonModule, MatIconModule, MatSidenavModule, RouterModule], + imports: [ + CommonModule, + MatToolbarModule, + MatListModule, + MatButtonModule, + MatIconModule, + MatSidenavModule, + RouterModule + ], templateUrl: './console-nav.component.html', styleUrl: './console-nav.component.scss' }) @@ -21,11 +29,15 @@ export class ConsoleNavComponent { isMobile = false; isTablet = false; isSideMenuCollapsed = false; - version: string = packageJson.version; - @Input() navLinks: ConsoleNavLink[] = []; + version = ''; + @Input() navLinks: ConsoleNavLink[] = []; @Output() onLogoutClicked: EventEmitter = new EventEmitter(); + constructor(private contextService: ContextService) { + this.version = this.contextService.getVersion(); + } + async toggleSideMenu() { if (this.isMobile) { this.isSideMenuCollapsed = false; diff --git a/frontend/projects/shared-meet-components/src/lib/models/context.model.ts b/frontend/projects/shared-meet-components/src/lib/models/context.model.ts index 2b9a1f1..81035fb 100644 --- a/frontend/projects/shared-meet-components/src/lib/models/context.model.ts +++ b/frontend/projects/shared-meet-components/src/lib/models/context.model.ts @@ -2,7 +2,7 @@ import { OpenViduMeetPermissions, ParticipantRole, RecordingPermissions, - SecurityPreferencesDTO + SecurityPreferences } from 'projects/shared-meet-components/src/public-api'; export interface ContextData { @@ -10,9 +10,8 @@ export interface ContextData { edition: Edition; version: string; parentDomain: string; - securityPreferences?: SecurityPreferencesDTO; + securityPreferences?: SecurityPreferences; openviduLogoUrl: string; - backgroundImageUrl: string; roomId: string; secret: string; participantName: string; diff --git a/frontend/projects/shared-meet-components/src/lib/services/context/context.service.ts b/frontend/projects/shared-meet-components/src/lib/services/context/context.service.ts index d25f695..0d2b081 100644 --- a/frontend/projects/shared-meet-components/src/lib/services/context/context.service.ts +++ b/frontend/projects/shared-meet-components/src/lib/services/context/context.service.ts @@ -18,7 +18,6 @@ export class ContextService { parentDomain: '', securityPreferences: undefined, openviduLogoUrl: '', - backgroundImageUrl: '', roomId: '', secret: '', participantName: '', @@ -90,28 +89,9 @@ export class ContextService { return this.context.openviduLogoUrl; } - setBackgroundImageUrl(backgroundImageUrl: string): void { - this.context.backgroundImageUrl = backgroundImageUrl; - } - - getBackgroundImageUrl(): string { - return this.context.backgroundImageUrl; - } - - async canUsersCreateRooms(): Promise { + async getAuthModeToAccessRoom(): Promise { await this.getSecurityPreferences(); - return this.context.securityPreferences!.roomCreationPolicy.allowRoomCreation; - } - - async isAuthRequiredToCreateRooms(): Promise { - await this.getSecurityPreferences(); - const requireAuthentication = this.context.securityPreferences!.roomCreationPolicy.requireAuthentication; - return requireAuthentication !== undefined && requireAuthentication; - } - - async getAuthModeToEnterRoom(): Promise { - await this.getSecurityPreferences(); - return this.context.securityPreferences!.authentication.authMode; + return this.context.securityPreferences!.authentication.authModeToAccessRoom; } setRoomId(roomId: string): void { diff --git a/frontend/projects/shared-meet-components/src/lib/services/http/http.service.ts b/frontend/projects/shared-meet-components/src/lib/services/http/http.service.ts index 90f9a32..270c34d 100644 --- a/frontend/projects/shared-meet-components/src/lib/services/http/http.service.ts +++ b/frontend/projects/shared-meet-components/src/lib/services/http/http.service.ts @@ -7,7 +7,7 @@ import { MeetRoomPreferences, MeetRoomRoleAndPermissions, ParticipantOptions, - SecurityPreferencesDTO, + SecurityPreferences, User } from '@lib/typings/ce'; import { lastValueFrom } from 'rxjs'; @@ -66,12 +66,7 @@ export class HttpService { return this.postRequest(`${this.INTERNAL_API_PATH_PREFIX}/participants/token/refresh`, participantOptions); } - /** - * Retrieves security preferences. - * - * @returns {Promise} A promise that resolves to the global preferences. - */ - getSecurityPreferences(): Promise { + getSecurityPreferences(): Promise { return this.getRequest(`${this.INTERNAL_API_PATH_PREFIX}/preferences/security`); } diff --git a/frontend/src/app/app.component.html b/frontend/src/app/app.component.html index efbf963..0680b43 100644 --- a/frontend/src/app/app.component.html +++ b/frontend/src/app/app.component.html @@ -1,2 +1 @@ - diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index 86e97af..5442c88 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -16,6 +16,5 @@ export class AppComponent implements OnInit { ngOnInit() { this.contextService.setVersion(packageInfo.version); this.contextService.setOpenViduLogoUrl('assets/images/openvidu_logo.png'); - this.contextService.setBackgroundImageUrl('/assets/images/bg.webp'); } } diff --git a/frontend/src/assets/images/bg.webp b/frontend/src/assets/images/bg.webp deleted file mode 100644 index fdfcec4..0000000 Binary files a/frontend/src/assets/images/bg.webp and /dev/null differ