Commit 4b47beb7 authored by Dennis Willers's avatar Dennis Willers
Browse files

Merge branch 'Dennis'

# Conflicts:
#	src/app/app.module.ts
#	src/app/overview/overview.component.ts
parents 47df0850 a1243b75
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -36,7 +36,9 @@
              "src/styles.scss"
              "src/styles.scss"
            ],
            ],
            "scripts": [
            "scripts": [
              "node_modules/aos/dist/aos.js"
              "node_modules/aos/dist/aos.js",
              "node_modules/postscribe/dist/postscribe.max.js",
              "node_modules/jquery/dist/jquery.slim.js"
            ]
            ]
          },
          },
          "configurations": {
          "configurations": {
+19 −1
Original line number Original line Diff line number Diff line
{
{
  "name": "tabooh",
  "name": "tabooh",
  "version": "2.2.1",
  "version": "2.2.5",
  "lockfileVersion": 1,
  "lockfileVersion": 1,
  "requires": true,
  "requires": true,
  "dependencies": {
  "dependencies": {
@@ -6612,6 +6612,11 @@
        }
        }
      }
      }
    },
    },
    "jquery": {
      "version": "3.6.0",
      "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
      "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
    },
    "js-tokens": {
    "js-tokens": {
      "version": "4.0.0",
      "version": "4.0.0",
      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -9564,6 +9569,19 @@
      "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==",
      "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==",
      "dev": true
      "dev": true
    },
    },
    "postscribe": {
      "version": "2.0.8",
      "resolved": "https://registry.npmjs.org/postscribe/-/postscribe-2.0.8.tgz",
      "integrity": "sha1-W3pTqtS2kLbC91gY/O/nRJD0ENU=",
      "requires": {
        "prescribe": ">=1.1.2"
      }
    },
    "prescribe": {
      "version": "1.1.3",
      "resolved": "https://registry.npmjs.org/prescribe/-/prescribe-1.1.3.tgz",
      "integrity": "sha1-jTEiRF8/uvTExYF+pSehf8gTnuY="
    },
    "process": {
    "process": {
      "version": "0.11.10",
      "version": "0.11.10",
      "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
      "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+26 −0
Original line number Original line Diff line number Diff line
@@ -10,10 +10,36 @@ import * as AOS from 'aos';
export class AppComponent implements OnInit {
export class AppComponent implements OnInit {
  view = 'desktopView';
  view = 'desktopView';


  cookieMessage = 'Es gibt leider ein paar Menschen, die das Internet nicht bedienen können. Darum auch hier die nervige Meldung, dass wir Cookies verwenden. Klick es einfach weg.';
  cookieDismiss = 'Ok';
  cookieLinkText = 'Mehr Informationen über Cookies findest du hier';

  ngOnInit(): void {
  ngOnInit(): void {
    AOS.init();
    AOS.init();
    const width = window.innerWidth;
    const width = window.innerWidth;
    this.setView(width);
    this.setView(width);

    const cc = window as any;
    cc.cookieconsent.initialise({
      palette: {
        popup: {
          background: '#5e27b7'
        },
        button: {
          background: '#ffd740',
          text: '#000000'
        }
      },
      theme: 'edgeless',
      content: {
        message: this.cookieMessage,
        dismiss: this.cookieDismiss,
        link: this.cookieLinkText,
        href: './#/impressum'
      },
      position: 'top',
      static: true
    });
  }
  }


  constructor(private screen: ViewModus){}
  constructor(private screen: ViewModus){}
+3 −1
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@ 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';
import {MAT_DIALOG_DEFAULT_OPTIONS, MatDialogModule} from '@angular/material/dialog';
import {ScriptService} from './services/script.service';


@NgModule({
@NgModule({
  declarations: [
  declarations: [
@@ -74,7 +75,8 @@ import {MAT_DIALOG_DEFAULT_OPTIONS, MatDialogModule} from '@angular/material/dia
    {provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: {hasBackdrop: false}},
    {provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: {hasBackdrop: false}},
    IsAllowedToPlay,
    IsAllowedToPlay,
    SocketDataService,
    SocketDataService,
    ViewModus
    ViewModus,
    ScriptService
  ],
  ],
  bootstrap: [AppComponent]
  bootstrap: [AppComponent]
})
})
+11 −1
Original line number Original line Diff line number Diff line
@@ -8,6 +8,7 @@ import {SocketDataService} from '../dao/socketDataService';
import {Subject} from 'rxjs';
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 {HttpErrorResponse} from '@angular/common/http';


@Component({
@Component({
  selector: 'app-game',
  selector: 'app-game',
@@ -102,10 +103,14 @@ export class GameComponent implements OnInit, OnDestroy {
    this.subNewCard = this.socketDataService.getNewCard(this.sessionName)
    this.subNewCard = this.socketDataService.getNewCard(this.sessionName)
      .pipe(takeUntil(this.ngUnsubscribe))
      .pipe(takeUntil(this.ngUnsubscribe))
      .subscribe(data => {
      .subscribe(data => {
        if (data === -1) {
          console.log('Öffne POP UP');
        } else {
          this.service.getCard({cardID: data}).then(value => {
          this.service.getCard({cardID: data}).then(value => {
            this.fillNewCard(value);
            this.fillNewCard(value);
            this.fillGamestatus();
            this.fillGamestatus();
          });
          });
        }
      });
      });
    this.subEndRound = this.socketDataService.getNewRound(this.sessionName)
    this.subEndRound = this.socketDataService.getNewRound(this.sessionName)
      .pipe(takeUntil(this.ngUnsubscribe))
      .pipe(takeUntil(this.ngUnsubscribe))
@@ -232,7 +237,12 @@ export class GameComponent implements OnInit, OnDestroy {
      if (status) {
      if (status) {
        this.fillNewCard(value);
        this.fillNewCard(value);
      }
      }
    }).catch(reason => console.log(reason));
    }).catch((err: HttpErrorResponse) => {
      console.log(err);
      if (err.status === 502) {
        console.log('Keine neuen Karten mehr');
      }
    });
  }
  }


  fillNewCard(value: any): void {
  fillNewCard(value: any): void {
Loading