Commit 4adf6c12 authored by Dennis Willers's avatar Dennis Willers 🏀

- Testscripte eingebunden, falls mal Javascript verwendet werden soll.

- Werbung entfernt
- Cookie-Meldung hinzugefügt
parent 4e5b2dbc
Pipeline #423 passed with stage
in 6 minutes and 4 seconds
This diff is collapsed.
{ {
"name": "tabu", "name": "tabooh",
"version": "0.0.0", "version": "2.2.5",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
...@@ -12,19 +12,21 @@ ...@@ -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",
...@@ -32,15 +34,15 @@ ...@@ -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.2.9", "@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",
......
...@@ -16,6 +16,21 @@ import {MatDialog} from '@angular/material/dialog'; ...@@ -16,6 +16,21 @@ import {MatDialog} from '@angular/material/dialog';
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;
...@@ -49,19 +64,11 @@ export class OverviewComponent implements OnInit, OnDestroy { ...@@ -49,19 +64,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,
public dialog: MatDialog) {
screen.$view.subscribe(
view => {
this.view = view;
this.setScrollLimit();
});
} }
ngOnInit(): void { ngOnInit(): void {
...@@ -167,18 +174,13 @@ export class OverviewComponent implements OnInit, OnDestroy { ...@@ -167,18 +174,13 @@ export class OverviewComponent implements OnInit, OnDestroy {
const status = JSON.parse(value.status); const status = JSON.parse(value.status);
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 {
...@@ -190,8 +192,11 @@ export class OverviewComponent implements OnInit, OnDestroy { ...@@ -190,8 +192,11 @@ export class OverviewComponent implements OnInit, OnDestroy {
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();
}); });
} }
...@@ -204,7 +209,7 @@ export class OverviewComponent implements OnInit, OnDestroy { ...@@ -204,7 +209,7 @@ export class OverviewComponent implements OnInit, OnDestroy {
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);
} }
getGameStatus(): void { getGameStatus(): void {
...@@ -254,7 +259,7 @@ export class OverviewComponent implements OnInit, OnDestroy { ...@@ -254,7 +259,7 @@ export class OverviewComponent implements OnInit, OnDestroy {
} }
} }
openDialog() { openDialog(): void {
this.dialog.open(TestDialogComponent); this.dialog.open(TestDialogComponent);
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<script type="text/javascript" src="//go.ezoic.net/ezoic/ezoic.js"></script--> <script type="text/javascript" src="//go.ezoic.net/ezoic/ezoic.js"></script-->
<!-- Ezoic Code --> <!-- Ezoic Code -->
<!-- Google AdSense --> <!-- Google AdSense -->
<script data-ad-client="ca-pub-5661681898041390" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!--script data-ad-client="ca-pub-5661681898041390" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script-->
<!-- Google AdSense --> <!-- Google AdSense -->
<meta charset="utf-8"> <meta charset="utf-8">
<title>Tabooh</title> <title>Tabooh</title>
......
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