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",
"version": "0.0.0",
"name": "tabooh",
"version": "2.2.5",
"scripts": {
"ng": "ng",
"start": "ng serve",
......@@ -12,19 +12,21 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~11.0.5",
"@angular/animations": "~11.2.13",
"@angular/cdk": "^11.0.3",
"@angular/common": "~11.0.5",
"@angular/compiler": "~11.0.5",
"@angular/core": "~11.0.5",
"@angular/common": "~11.2.13",
"@angular/compiler": "~11.2.13",
"@angular/core": "~11.2.13",
"@angular/flex-layout": "^11.0.0-beta.33",
"@angular/forms": "~11.0.5",
"@angular/forms": "~11.2.13",
"@angular/material": "^11.0.3",
"@angular/platform-browser": "~11.0.5",
"@angular/platform-browser-dynamic": "~11.0.5",
"@angular/router": "~11.0.5",
"@angular/platform-browser": "~11.2.13",
"@angular/platform-browser-dynamic": "~11.2.13",
"@angular/router": "~11.2.13",
"@types/aos": "^3.0.3",
"aos": "^2.3.4",
"jquery": "^3.6.0",
"postscribe": "^2.0.8",
"rxjs": "~6.6.0",
"socket.io": "^3.0.4",
"socket.io-client": "latest",
......@@ -32,15 +34,15 @@
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1100.5",
"@angular/cli": "^11.2.9",
"@angular/compiler-cli": "~11.0.5",
"@angular-devkit/build-angular": "~0.1102.12",
"@angular/cli": "~11.2.12",
"@angular/compiler-cli": "~11.2.13",
"@types/jasmine": "~3.6.0",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.1.0",
"karma": "~6.3.2",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
......
......@@ -16,6 +16,21 @@ import {MatDialog} from '@angular/material/dialog';
styleUrls: ['./overview.component.scss']
})
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';
private ngUnsubscribe = new Subject();
subNewGame: any;
......@@ -49,19 +64,11 @@ export class OverviewComponent implements OnInit, OnDestroy {
scrolled = 0;
scrollLimit = 290;
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();
});
static playAudio(audioPath: string): void {
const audio = new Audio();
audio.src = audioPath;
audio.load();
audio.play();
}
ngOnInit(): void {
......@@ -167,18 +174,13 @@ export class OverviewComponent implements OnInit, OnDestroy {
const status = JSON.parse(value.status);
if (status) {
this.getGameStatus();
const audio = "../../../assets/sounds/ui_refresh-feed.ogg";
this.playAudio(audio);
}
}).catch(reason => console.log(reason));
const audio = '../../../assets/sounds/ui_refresh-feed.ogg';
OverviewComponent.playAudio(audio);
}
}).catch(reason => {
console.log(reason);
});
}
playAudio(audioPath: string): void {
const audio = new Audio();
audio.src = audioPath;
audio.load();
audio.play();
}
nextRound(): void {
......@@ -190,8 +192,11 @@ export class OverviewComponent implements OnInit, OnDestroy {
this.router.navigate([this.sessionName + '/' + this.team + '/explainer', ]);
this.wantToBeExplainer = true;
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 {
this.unsubscribeAll();
this.getSocketData();
const audio = "../../../assets/sounds/ui_unlock.ogg";
this.playAudio(audio);
OverviewComponent.playAudio(audio);
}
getGameStatus(): void {
......@@ -254,7 +259,7 @@ export class OverviewComponent implements OnInit, OnDestroy {
}
}
openDialog() {
openDialog(): void {
this.dialog.open(TestDialogComponent);
}
......
......@@ -6,7 +6,7 @@
<script type="text/javascript" src="//go.ezoic.net/ezoic/ezoic.js"></script-->
<!-- Ezoic Code -->
<!-- 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 -->
<meta charset="utf-8">
<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