Commit 63fcd89b authored by redisa's avatar redisa

Dialog geht nicht zu

parent c03bc8ec
Pipeline #402 passed with stage
in 5 minutes and 11 seconds
...@@ -31,6 +31,7 @@ import { RoundHistoryComponent } from './round-history/round-history.component'; ...@@ -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: [
...@@ -64,6 +65,7 @@ import {ViewModus} from './dao/viewModus'; ...@@ -64,6 +65,7 @@ import {ViewModus} from './dao/viewModus';
MatTooltipModule, MatTooltipModule,
MatTableModule, MatTableModule,
MatTreeModule, MatTreeModule,
MatDialogModule
], ],
providers: [ providers: [
IsAllowedToPlay, IsAllowedToPlay,
......
...@@ -69,6 +69,7 @@ ...@@ -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>
......
...@@ -8,6 +8,7 @@ import {Subject} from 'rxjs'; ...@@ -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',
...@@ -54,7 +55,8 @@ export class OverviewComponent implements OnInit, OnDestroy { ...@@ -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;
...@@ -252,6 +254,10 @@ export class OverviewComponent implements OnInit, OnDestroy { ...@@ -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;
...@@ -274,3 +280,8 @@ export class OverviewComponent implements OnInit, OnDestroy { ...@@ -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
<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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment