Loading src/app/app.module.ts +2 −0 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,7 @@ import { RoundHistoryComponent } from './round-history/round-history.component'; import {MatTableModule} from '@angular/material/table'; import {MatTableModule} from '@angular/material/table'; import {MatTreeModule} from '@angular/material/tree'; import {MatTreeModule} from '@angular/material/tree'; import {ViewModus} from './dao/viewModus'; import {ViewModus} from './dao/viewModus'; import {MatDialogModule} from '@angular/material/dialog'; @NgModule({ @NgModule({ declarations: [ declarations: [ Loading Loading @@ -64,6 +65,7 @@ import {ViewModus} from './dao/viewModus'; MatTooltipModule, MatTooltipModule, MatTableModule, MatTableModule, MatTreeModule, MatTreeModule, MatDialogModule ], ], providers: [ providers: [ IsAllowedToPlay, IsAllowedToPlay, Loading src/app/overview/overview.component.html +1 −0 Original line number Original line Diff line number Diff line Loading @@ -69,6 +69,7 @@ <mat-card-title *ngIf="!isActiveRound">{{nextTeam}} ist am Zug:</mat-card-title> <mat-card-title *ngIf="!isActiveRound">{{nextTeam}} ist am Zug:</mat-card-title> <br> <br> <button [disabled]="buttonNextRoundDisabled || gameStatus.activeExplainer == 1" mat-raised-button color="primary" (click)="nextRound()">Ich erkläre und los!</button> <button [disabled]="buttonNextRoundDisabled || gameStatus.activeExplainer == 1" mat-raised-button color="primary" (click)="nextRound()">Ich erkläre und los!</button> <button mat-button (click)="openDialog()">Launch dialog</button> </mat-card-actions> </mat-card-actions> </mat-card> </mat-card> </div> </div> Loading src/app/overview/overview.component.ts +12 −1 Original line number Original line Diff line number Diff line Loading @@ -8,6 +8,7 @@ import {Subject} from 'rxjs'; import {takeUntil} from 'rxjs/operators'; import {takeUntil} from 'rxjs/operators'; import {ViewModus} from '../dao/viewModus'; import {ViewModus} from '../dao/viewModus'; import {Location} from '@angular/common'; import {Location} from '@angular/common'; import {MatDialog} from '@angular/material/dialog'; @Component({ @Component({ selector: 'app-overview', selector: 'app-overview', Loading Loading @@ -54,7 +55,8 @@ export class OverviewComponent implements OnInit, OnDestroy { private service: TabuMiddlewareService, private service: TabuMiddlewareService, private isAllowedToPlay: IsAllowedToPlay, private isAllowedToPlay: IsAllowedToPlay, private socketDataService: SocketDataService, private socketDataService: SocketDataService, private screen: ViewModus) { private screen: ViewModus, public dialog: MatDialog) { screen.$view.subscribe( screen.$view.subscribe( view => { view => { this.view = view; this.view = view; Loading Loading @@ -252,6 +254,10 @@ export class OverviewComponent implements OnInit, OnDestroy { } } } } openDialog() { this.dialog.open(TestDialogComponent); } @HostListener('window:scroll', ['$event']) @HostListener('window:scroll', ['$event']) onWindowScroll($event: any): void { onWindowScroll($event: any): void { const numb = window.scrollY; const numb = window.scrollY; Loading @@ -274,3 +280,8 @@ export class OverviewComponent implements OnInit, OnDestroy { this.ngUnsubscribe.complete(); this.ngUnsubscribe.complete(); } } } } @Component({ selector: 'testdialog', templateUrl: './testdialog.html', }) export class TestDialogComponent {} No newline at end of file src/app/overview/testdialog.html 0 → 100644 +6 −0 Original line number Original line Diff line number Diff line <h1 mat-dialog-title>Ihr habt alle Begriffe durchgespielt!</h1> <div mat-dialog-content>Eröffnet einen neuen Raum oder setzt den Fortschritt sofort hier zurück:</div> <div mat-dialog-actions> <button mat-button mat-dialog-close>Zurücksetzen</button> <button mat-button >Schließen</button> </div> Loading
src/app/app.module.ts +2 −0 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,7 @@ import { RoundHistoryComponent } from './round-history/round-history.component'; import {MatTableModule} from '@angular/material/table'; import {MatTableModule} from '@angular/material/table'; import {MatTreeModule} from '@angular/material/tree'; import {MatTreeModule} from '@angular/material/tree'; import {ViewModus} from './dao/viewModus'; import {ViewModus} from './dao/viewModus'; import {MatDialogModule} from '@angular/material/dialog'; @NgModule({ @NgModule({ declarations: [ declarations: [ Loading Loading @@ -64,6 +65,7 @@ import {ViewModus} from './dao/viewModus'; MatTooltipModule, MatTooltipModule, MatTableModule, MatTableModule, MatTreeModule, MatTreeModule, MatDialogModule ], ], providers: [ providers: [ IsAllowedToPlay, IsAllowedToPlay, Loading
src/app/overview/overview.component.html +1 −0 Original line number Original line Diff line number Diff line Loading @@ -69,6 +69,7 @@ <mat-card-title *ngIf="!isActiveRound">{{nextTeam}} ist am Zug:</mat-card-title> <mat-card-title *ngIf="!isActiveRound">{{nextTeam}} ist am Zug:</mat-card-title> <br> <br> <button [disabled]="buttonNextRoundDisabled || gameStatus.activeExplainer == 1" mat-raised-button color="primary" (click)="nextRound()">Ich erkläre und los!</button> <button [disabled]="buttonNextRoundDisabled || gameStatus.activeExplainer == 1" mat-raised-button color="primary" (click)="nextRound()">Ich erkläre und los!</button> <button mat-button (click)="openDialog()">Launch dialog</button> </mat-card-actions> </mat-card-actions> </mat-card> </mat-card> </div> </div> Loading
src/app/overview/overview.component.ts +12 −1 Original line number Original line Diff line number Diff line Loading @@ -8,6 +8,7 @@ import {Subject} from 'rxjs'; import {takeUntil} from 'rxjs/operators'; import {takeUntil} from 'rxjs/operators'; import {ViewModus} from '../dao/viewModus'; import {ViewModus} from '../dao/viewModus'; import {Location} from '@angular/common'; import {Location} from '@angular/common'; import {MatDialog} from '@angular/material/dialog'; @Component({ @Component({ selector: 'app-overview', selector: 'app-overview', Loading Loading @@ -54,7 +55,8 @@ export class OverviewComponent implements OnInit, OnDestroy { private service: TabuMiddlewareService, private service: TabuMiddlewareService, private isAllowedToPlay: IsAllowedToPlay, private isAllowedToPlay: IsAllowedToPlay, private socketDataService: SocketDataService, private socketDataService: SocketDataService, private screen: ViewModus) { private screen: ViewModus, public dialog: MatDialog) { screen.$view.subscribe( screen.$view.subscribe( view => { view => { this.view = view; this.view = view; Loading Loading @@ -252,6 +254,10 @@ export class OverviewComponent implements OnInit, OnDestroy { } } } } openDialog() { this.dialog.open(TestDialogComponent); } @HostListener('window:scroll', ['$event']) @HostListener('window:scroll', ['$event']) onWindowScroll($event: any): void { onWindowScroll($event: any): void { const numb = window.scrollY; const numb = window.scrollY; Loading @@ -274,3 +280,8 @@ export class OverviewComponent implements OnInit, OnDestroy { this.ngUnsubscribe.complete(); this.ngUnsubscribe.complete(); } } } } @Component({ selector: 'testdialog', templateUrl: './testdialog.html', }) export class TestDialogComponent {} No newline at end of file
src/app/overview/testdialog.html 0 → 100644 +6 −0 Original line number Original line Diff line number Diff line <h1 mat-dialog-title>Ihr habt alle Begriffe durchgespielt!</h1> <div mat-dialog-content>Eröffnet einen neuen Raum oder setzt den Fortschritt sofort hier zurück:</div> <div mat-dialog-actions> <button mat-button mat-dialog-close>Zurücksetzen</button> <button mat-button >Schließen</button> </div>