diff --git a/client/src/app/header/header.component.html b/client/src/app/header/header.component.html index ab6ede5d6..78ef68503 100644 --- a/client/src/app/header/header.component.html +++ b/client/src/app/header/header.component.html @@ -88,4 +88,4 @@ - + diff --git a/client/src/app/menu/quick-settings-modal.component.html b/client/src/app/menu/quick-settings-modal.component.html index a9fe150ad..cefaf4d90 100644 --- a/client/src/app/menu/quick-settings-modal.component.html +++ b/client/src/app/menu/quick-settings-modal.component.html @@ -23,5 +23,7 @@ *ngIf="!isUserLoggedIn()" [user]="user" [userInformationLoaded]="userInformationLoaded" [reactiveUpdate]="true" [notifyOnUpdate]="true" > + + Change interface language diff --git a/client/src/app/menu/quick-settings-modal.component.ts b/client/src/app/menu/quick-settings-modal.component.ts index a25a95465..0cb900507 100644 --- a/client/src/app/menu/quick-settings-modal.component.ts +++ b/client/src/app/menu/quick-settings-modal.component.ts @@ -1,8 +1,9 @@ import { CommonModule } from '@angular/common' -import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core' +import { Component, EventEmitter, OnDestroy, OnInit, Output, ViewChild } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' import { AuthService, AuthStatus, LocalStorageService, User, UserService } from '@app/core' import { GlobalIconComponent } from '@app/shared/shared-icons/global-icon.component' +import { ButtonComponent } from '@app/shared/shared-main/buttons/button.component' import { AlertComponent } from '@app/shared/shared-main/common/alert.component' import { UserInterfaceSettingsComponent } from '@app/shared/shared-user-settings/user-interface-settings.component' import { UserVideoSettingsComponent } from '@app/shared/shared-user-settings/user-video-settings.component' @@ -15,13 +16,22 @@ import { filter } from 'rxjs/operators' selector: 'my-quick-settings', templateUrl: './quick-settings-modal.component.html', standalone: true, - imports: [ CommonModule, GlobalIconComponent, UserVideoSettingsComponent, UserInterfaceSettingsComponent, AlertComponent ] + imports: [ + CommonModule, + GlobalIconComponent, + UserVideoSettingsComponent, + UserInterfaceSettingsComponent, + AlertComponent, + ButtonComponent + ] }) export class QuickSettingsModalComponent implements OnInit, OnDestroy { private static readonly QUERY_MODAL_NAME = 'quick-settings' @ViewChild('modal', { static: true }) modal: NgbModal + @Output() openLanguageModal = new EventEmitter() + user: User userInformationLoaded = new ReplaySubject(1) @@ -83,6 +93,11 @@ export class QuickSettingsModalComponent implements OnInit, OnDestroy { this.setModalQuery('add') } + changeLanguage () { + this.openedModal.close() + this.openLanguageModal.emit() + } + private setModalQuery (type: 'add' | 'remove') { const modal = type === 'add' ? QuickSettingsModalComponent.QUERY_MODAL_NAME