diff --git a/src/app/components/shared/shared.module.ts b/src/app/components/shared/shared.module.ts index 2c43d6168e9f2c810dfc88b4f8fcc4ff48de65d2..8c6b346aaa2453d90096ed872084ac3b5e970427 100644 --- a/src/app/components/shared/shared.module.ts +++ b/src/app/components/shared/shared.module.ts @@ -71,7 +71,8 @@ import { StatisticHelpComponent } from './_dialogs/statistic-help/statistic-help ], entryComponents: [ RoomCreateComponent, - LoginComponent + LoginComponent, + StatisticHelpComponent ] }) export class SharedModule { diff --git a/src/app/components/shared/statistics-page/statistics-page.component.html b/src/app/components/shared/statistics-page/statistics-page.component.html index 2ff7c225e1aca3db16fc185a5ac7b9e2c16767a8..b7730551048c817dcc3da0bc0db61b606227c59b 100644 --- a/src/app/components/shared/statistics-page/statistics-page.component.html +++ b/src/app/components/shared/statistics-page/statistics-page.component.html @@ -3,7 +3,7 @@ <mat-card-header> <h2>{{'statistic.learning-status' | translate}}</h2> <span class="fill-remaining-space"></span> - <button mat-icon-button><mat-icon color="primary">help</mat-icon></button> + <button mat-icon-button (click)="showHelp()"><mat-icon color="primary">help</mat-icon></button> </mat-card-header> <mat-divider></mat-divider> <div *ngIf="isLoading" fxLayout="column" fxLayoutAlign="center" fxLayoutGap="20px" fxFill> diff --git a/src/app/components/shared/statistics-page/statistics-page.component.ts b/src/app/components/shared/statistics-page/statistics-page.component.ts index ae3b5bc181d4cfa1e1d01588c7eb7d13f3f5010d..b1ca52aa6d5ad37b9088017ece390983e9f327df 100644 --- a/src/app/components/shared/statistics-page/statistics-page.component.ts +++ b/src/app/components/shared/statistics-page/statistics-page.component.ts @@ -5,7 +5,8 @@ import { ContentGroup } from '../../../models/content-group'; import { Room } from '../../../models/room'; import { TranslateService } from '@ngx-translate/core'; import { LanguageService } from '../../../services/util/language.service'; -import { MatTabGroup } from '@angular/material'; +import { MatTabGroup, MatDialog } from '@angular/material'; +import { StatisticHelpComponent } from '../_dialogs/statistic-help/statistic-help.component'; @Component({ selector: 'app-statistics', @@ -22,12 +23,12 @@ export class StatisticsPageComponent implements OnInit { @ViewChild(MatTabGroup) tabGroup: MatTabGroup; - constructor( - private route: ActivatedRoute, - private roomService: RoomService, - private translateService: TranslateService, - protected langService: LanguageService) { - langService.langEmitter.subscribe(lang => translateService.use(lang)); + constructor(private route: ActivatedRoute, + private roomService: RoomService, + private translateService: TranslateService, + protected langService: LanguageService, + public dialog: MatDialog,) { + langService.langEmitter.subscribe(lang => translateService.use(lang)); } ngOnInit(): void { @@ -49,4 +50,10 @@ export class StatisticsPageComponent implements OnInit { }); } + showHelp(): void { + this.dialog.open(StatisticHelpComponent, { + width: '350px' + }); + } + }