Loading package.json +15 −13 Original line number Original line Diff line number Diff line { { "name": "tabooh", "name": "tabooh", "version": "2.2.2", "version": "2.2.5", "scripts": { "scripts": { "ng": "ng", "ng": "ng", "start": "ng serve", "start": "ng serve", Loading @@ -12,19 +12,21 @@ }, }, "private": true, "private": true, "dependencies": { "dependencies": { "@angular/animations": "~11.0.5", "@angular/animations": "~11.2.13", "@angular/cdk": "^11.0.3", "@angular/cdk": "^11.0.3", "@angular/common": "~11.0.5", "@angular/common": "~11.2.13", "@angular/compiler": "~11.0.5", "@angular/compiler": "~11.2.13", "@angular/core": "~11.0.5", "@angular/core": "~11.2.13", "@angular/flex-layout": "^11.0.0-beta.33", "@angular/flex-layout": "^11.0.0-beta.33", "@angular/forms": "~11.0.5", "@angular/forms": "~11.2.13", "@angular/material": "^11.0.3", "@angular/material": "^11.0.3", "@angular/platform-browser": "~11.0.5", "@angular/platform-browser": "~11.2.13", "@angular/platform-browser-dynamic": "~11.0.5", "@angular/platform-browser-dynamic": "~11.2.13", "@angular/router": "~11.0.5", "@angular/router": "~11.2.13", "@types/aos": "^3.0.3", "@types/aos": "^3.0.3", "aos": "^2.3.4", "aos": "^2.3.4", "jquery": "^3.6.0", "postscribe": "^2.0.8", "rxjs": "~6.6.0", "rxjs": "~6.6.0", "socket.io": "^3.0.4", "socket.io": "^3.0.4", "socket.io-client": "latest", "socket.io-client": "latest", Loading @@ -32,15 +34,15 @@ "zone.js": "~0.10.2" "zone.js": "~0.10.2" }, }, "devDependencies": { "devDependencies": { "@angular-devkit/build-angular": "~0.1100.5", "@angular-devkit/build-angular": "~0.1102.12", "@angular/cli": "~11.0.5", "@angular/cli": "~11.2.12", "@angular/compiler-cli": "~11.0.5", "@angular/compiler-cli": "~11.2.13", "@types/jasmine": "~3.6.0", "@types/jasmine": "~3.6.0", "@types/node": "^12.11.1", "@types/node": "^12.11.1", "codelyzer": "^6.0.0", "codelyzer": "^6.0.0", "jasmine-core": "~3.6.0", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.1.0", "karma": "~6.3.2", "karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.0.3", "karma-coverage": "~2.0.3", "karma-jasmine": "~4.0.0", "karma-jasmine": "~4.0.0", Loading src/app/app.module.ts +5 −1 Original line number Original line Diff line number Diff line Loading @@ -14,7 +14,7 @@ import {MatButtonModule} from '@angular/material/button'; import {MatFormFieldModule} from '@angular/material/form-field'; import {MatFormFieldModule} from '@angular/material/form-field'; import {MatInputModule} from '@angular/material/input'; import {MatInputModule} from '@angular/material/input'; import {MatCardModule} from '@angular/material/card'; import {MatCardModule} from '@angular/material/card'; import { OverviewComponent } from './overview/overview.component'; import {OverviewComponent, TestDialogComponent} from './overview/overview.component'; import { ErrorComponent } from './error/error.component'; import { ErrorComponent } from './error/error.component'; import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms'; Loading @@ -32,6 +32,7 @@ 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 {MatBadgeModule} from '@angular/material/badge'; import {MatBadgeModule} from '@angular/material/badge'; import {MAT_DIALOG_DEFAULT_OPTIONS, MatDialogModule} from '@angular/material/dialog'; @NgModule({ @NgModule({ declarations: [ declarations: [ Loading @@ -46,6 +47,7 @@ import {MatBadgeModule} from '@angular/material/badge'; ImpressumComponent, ImpressumComponent, RulesComponent, RulesComponent, RoundHistoryComponent, RoundHistoryComponent, TestDialogComponent ], ], imports: [ imports: [ HttpClientModule, HttpClientModule, Loading @@ -66,8 +68,10 @@ import {MatBadgeModule} from '@angular/material/badge'; MatTableModule, MatTableModule, MatTreeModule, MatTreeModule, MatBadgeModule MatBadgeModule MatDialogModule ], ], providers: [ providers: [ {provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: {hasBackdrop: false}}, IsAllowedToPlay, IsAllowedToPlay, SocketDataService, SocketDataService, ViewModus ViewModus Loading src/app/overview/overview.component.html +1 −0 Original line number Original line Diff line number Diff line Loading @@ -71,6 +71,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 +41 −25 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 @@ -15,6 +16,21 @@ import {Location} from '@angular/common'; styleUrls: ['./overview.component.scss'] styleUrls: ['./overview.component.scss'] }) }) export class OverviewComponent implements OnInit, OnDestroy { export class OverviewComponent implements OnInit, OnDestroy { constructor(private router: Router, private location: Location, private activatedRoute: ActivatedRoute, private service: TabuMiddlewareService, private isAllowedToPlay: IsAllowedToPlay, private socketDataService: SocketDataService, private screen: ViewModus, public dialog: MatDialog) { screen.$view.subscribe( view => { this.view = view; this.setScrollLimit(); }); } view = 'desktopView'; view = 'desktopView'; private ngUnsubscribe = new Subject(); private ngUnsubscribe = new Subject(); subNewGame: any; subNewGame: any; Loading Loading @@ -54,18 +70,11 @@ export class OverviewComponent implements OnInit, OnDestroy { scrolled = 0; scrolled = 0; scrollLimit = 290; scrollLimit = 290; constructor(private router: Router, static playAudio(audioPath: string): void { private location: Location, const audio = new Audio(); private activatedRoute: ActivatedRoute, audio.src = audioPath; private service: TabuMiddlewareService, audio.load(); private isAllowedToPlay: IsAllowedToPlay, audio.play(); private socketDataService: SocketDataService, private screen: ViewModus) { screen.$view.subscribe( view => { this.view = view; this.setScrollLimit(); }); } } ngOnInit(): void { ngOnInit(): void { Loading Loading @@ -183,17 +192,12 @@ export class OverviewComponent implements OnInit, OnDestroy { if (status) { if (status) { this.getGameStatus(); this.getGameStatus(); const audio = '../../../assets/sounds/ui_refresh-feed.ogg'; const audio = '../../../assets/sounds/ui_refresh-feed.ogg'; this.playAudio(audio); OverviewComponent.playAudio(audio); } }).catch(reason => console.log(reason)); } } }).catch(reason => { console.log(reason); }); } } playAudio(audioPath: string): void { const audio = new Audio(); audio.src = audioPath; audio.load(); audio.play(); } } nextRound(): void { nextRound(): void { Loading @@ -204,9 +208,12 @@ export class OverviewComponent implements OnInit, OnDestroy { this.isAllowedToPlay.role = 'explainer'; this.isAllowedToPlay.role = 'explainer'; this.router.navigate([this.sessionName + '/' + this.team + '/explainer', ]); this.router.navigate([this.sessionName + '/' + this.team + '/explainer', ]); this.wantToBeExplainer = true; this.wantToBeExplainer = true; const audio = '../../../assets/sounds/state-change_confirm-up.ogg'; const audio = "../../../assets/sounds/state-change_confirm-up.ogg"; this.playAudio(audio); OverviewComponent.playAudio(audio); }); }); }).catch(reason => { console.log(reason); this.openDialog(); }); }); } } Loading @@ -219,8 +226,8 @@ export class OverviewComponent implements OnInit, OnDestroy { this.canStartGame(); this.canStartGame(); this.unsubscribeAll(); this.unsubscribeAll(); this.getSocketData(); this.getSocketData(); const audio = '../../../assets/sounds/ui_unlock.ogg'; const audio = "../../../assets/sounds/ui_unlock.ogg"; this.playAudio(audio); OverviewComponent.playAudio(audio); } } teamToTeamNumber(team: string): void { teamToTeamNumber(team: string): void { Loading Loading @@ -282,6 +289,10 @@ export class OverviewComponent implements OnInit, OnDestroy { } } } } openDialog(): void { 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 @@ -304,3 +315,8 @@ export class OverviewComponent implements OnInit, OnDestroy { this.ngUnsubscribe.complete(); this.ngUnsubscribe.complete(); } } } } @Component({ selector: 'app-testdialog', templateUrl: './testdialog.html', }) export class TestDialogComponent {} 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-raised-button>Zurücksetzen</button> <button mat-raised-button color="primary" mat-dialog-close>Schließen</button> </div> Loading
package.json +15 −13 Original line number Original line Diff line number Diff line { { "name": "tabooh", "name": "tabooh", "version": "2.2.2", "version": "2.2.5", "scripts": { "scripts": { "ng": "ng", "ng": "ng", "start": "ng serve", "start": "ng serve", Loading @@ -12,19 +12,21 @@ }, }, "private": true, "private": true, "dependencies": { "dependencies": { "@angular/animations": "~11.0.5", "@angular/animations": "~11.2.13", "@angular/cdk": "^11.0.3", "@angular/cdk": "^11.0.3", "@angular/common": "~11.0.5", "@angular/common": "~11.2.13", "@angular/compiler": "~11.0.5", "@angular/compiler": "~11.2.13", "@angular/core": "~11.0.5", "@angular/core": "~11.2.13", "@angular/flex-layout": "^11.0.0-beta.33", "@angular/flex-layout": "^11.0.0-beta.33", "@angular/forms": "~11.0.5", "@angular/forms": "~11.2.13", "@angular/material": "^11.0.3", "@angular/material": "^11.0.3", "@angular/platform-browser": "~11.0.5", "@angular/platform-browser": "~11.2.13", "@angular/platform-browser-dynamic": "~11.0.5", "@angular/platform-browser-dynamic": "~11.2.13", "@angular/router": "~11.0.5", "@angular/router": "~11.2.13", "@types/aos": "^3.0.3", "@types/aos": "^3.0.3", "aos": "^2.3.4", "aos": "^2.3.4", "jquery": "^3.6.0", "postscribe": "^2.0.8", "rxjs": "~6.6.0", "rxjs": "~6.6.0", "socket.io": "^3.0.4", "socket.io": "^3.0.4", "socket.io-client": "latest", "socket.io-client": "latest", Loading @@ -32,15 +34,15 @@ "zone.js": "~0.10.2" "zone.js": "~0.10.2" }, }, "devDependencies": { "devDependencies": { "@angular-devkit/build-angular": "~0.1100.5", "@angular-devkit/build-angular": "~0.1102.12", "@angular/cli": "~11.0.5", "@angular/cli": "~11.2.12", "@angular/compiler-cli": "~11.0.5", "@angular/compiler-cli": "~11.2.13", "@types/jasmine": "~3.6.0", "@types/jasmine": "~3.6.0", "@types/node": "^12.11.1", "@types/node": "^12.11.1", "codelyzer": "^6.0.0", "codelyzer": "^6.0.0", "jasmine-core": "~3.6.0", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.1.0", "karma": "~6.3.2", "karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.0.3", "karma-coverage": "~2.0.3", "karma-jasmine": "~4.0.0", "karma-jasmine": "~4.0.0", Loading
src/app/app.module.ts +5 −1 Original line number Original line Diff line number Diff line Loading @@ -14,7 +14,7 @@ import {MatButtonModule} from '@angular/material/button'; import {MatFormFieldModule} from '@angular/material/form-field'; import {MatFormFieldModule} from '@angular/material/form-field'; import {MatInputModule} from '@angular/material/input'; import {MatInputModule} from '@angular/material/input'; import {MatCardModule} from '@angular/material/card'; import {MatCardModule} from '@angular/material/card'; import { OverviewComponent } from './overview/overview.component'; import {OverviewComponent, TestDialogComponent} from './overview/overview.component'; import { ErrorComponent } from './error/error.component'; import { ErrorComponent } from './error/error.component'; import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms'; Loading @@ -32,6 +32,7 @@ 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 {MatBadgeModule} from '@angular/material/badge'; import {MatBadgeModule} from '@angular/material/badge'; import {MAT_DIALOG_DEFAULT_OPTIONS, MatDialogModule} from '@angular/material/dialog'; @NgModule({ @NgModule({ declarations: [ declarations: [ Loading @@ -46,6 +47,7 @@ import {MatBadgeModule} from '@angular/material/badge'; ImpressumComponent, ImpressumComponent, RulesComponent, RulesComponent, RoundHistoryComponent, RoundHistoryComponent, TestDialogComponent ], ], imports: [ imports: [ HttpClientModule, HttpClientModule, Loading @@ -66,8 +68,10 @@ import {MatBadgeModule} from '@angular/material/badge'; MatTableModule, MatTableModule, MatTreeModule, MatTreeModule, MatBadgeModule MatBadgeModule MatDialogModule ], ], providers: [ providers: [ {provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: {hasBackdrop: false}}, IsAllowedToPlay, IsAllowedToPlay, SocketDataService, SocketDataService, ViewModus ViewModus Loading
src/app/overview/overview.component.html +1 −0 Original line number Original line Diff line number Diff line Loading @@ -71,6 +71,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 +41 −25 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 @@ -15,6 +16,21 @@ import {Location} from '@angular/common'; styleUrls: ['./overview.component.scss'] styleUrls: ['./overview.component.scss'] }) }) export class OverviewComponent implements OnInit, OnDestroy { export class OverviewComponent implements OnInit, OnDestroy { constructor(private router: Router, private location: Location, private activatedRoute: ActivatedRoute, private service: TabuMiddlewareService, private isAllowedToPlay: IsAllowedToPlay, private socketDataService: SocketDataService, private screen: ViewModus, public dialog: MatDialog) { screen.$view.subscribe( view => { this.view = view; this.setScrollLimit(); }); } view = 'desktopView'; view = 'desktopView'; private ngUnsubscribe = new Subject(); private ngUnsubscribe = new Subject(); subNewGame: any; subNewGame: any; Loading Loading @@ -54,18 +70,11 @@ export class OverviewComponent implements OnInit, OnDestroy { scrolled = 0; scrolled = 0; scrollLimit = 290; scrollLimit = 290; constructor(private router: Router, static playAudio(audioPath: string): void { private location: Location, const audio = new Audio(); private activatedRoute: ActivatedRoute, audio.src = audioPath; private service: TabuMiddlewareService, audio.load(); private isAllowedToPlay: IsAllowedToPlay, audio.play(); private socketDataService: SocketDataService, private screen: ViewModus) { screen.$view.subscribe( view => { this.view = view; this.setScrollLimit(); }); } } ngOnInit(): void { ngOnInit(): void { Loading Loading @@ -183,17 +192,12 @@ export class OverviewComponent implements OnInit, OnDestroy { if (status) { if (status) { this.getGameStatus(); this.getGameStatus(); const audio = '../../../assets/sounds/ui_refresh-feed.ogg'; const audio = '../../../assets/sounds/ui_refresh-feed.ogg'; this.playAudio(audio); OverviewComponent.playAudio(audio); } }).catch(reason => console.log(reason)); } } }).catch(reason => { console.log(reason); }); } } playAudio(audioPath: string): void { const audio = new Audio(); audio.src = audioPath; audio.load(); audio.play(); } } nextRound(): void { nextRound(): void { Loading @@ -204,9 +208,12 @@ export class OverviewComponent implements OnInit, OnDestroy { this.isAllowedToPlay.role = 'explainer'; this.isAllowedToPlay.role = 'explainer'; this.router.navigate([this.sessionName + '/' + this.team + '/explainer', ]); this.router.navigate([this.sessionName + '/' + this.team + '/explainer', ]); this.wantToBeExplainer = true; this.wantToBeExplainer = true; const audio = '../../../assets/sounds/state-change_confirm-up.ogg'; const audio = "../../../assets/sounds/state-change_confirm-up.ogg"; this.playAudio(audio); OverviewComponent.playAudio(audio); }); }); }).catch(reason => { console.log(reason); this.openDialog(); }); }); } } Loading @@ -219,8 +226,8 @@ export class OverviewComponent implements OnInit, OnDestroy { this.canStartGame(); this.canStartGame(); this.unsubscribeAll(); this.unsubscribeAll(); this.getSocketData(); this.getSocketData(); const audio = '../../../assets/sounds/ui_unlock.ogg'; const audio = "../../../assets/sounds/ui_unlock.ogg"; this.playAudio(audio); OverviewComponent.playAudio(audio); } } teamToTeamNumber(team: string): void { teamToTeamNumber(team: string): void { Loading Loading @@ -282,6 +289,10 @@ export class OverviewComponent implements OnInit, OnDestroy { } } } } openDialog(): void { 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 @@ -304,3 +315,8 @@ export class OverviewComponent implements OnInit, OnDestroy { this.ngUnsubscribe.complete(); this.ngUnsubscribe.complete(); } } } } @Component({ selector: 'app-testdialog', templateUrl: './testdialog.html', }) export class TestDialogComponent {}
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-raised-button>Zurücksetzen</button> <button mat-raised-button color="primary" mat-dialog-close>Schließen</button> </div>