Loading angular.json +1 −3 Original line number Diff line number Diff line Loading @@ -34,9 +34,7 @@ "./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css", "src/styles.scss" ], "scripts": [ "./src/assets/JavaScript/Timer.js" ] "scripts": [] }, "configurations": { "production": { Loading src/app/dao/TabuMiddlewareService.ts +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ export class TabuMiddlewareService { } addPoint(req: any): Promise<any> { console.log(req); console.log('TestAddPoint: ', req); return this.request('POST', `${environment.tabuMiddlewareURL}addPoint`, req); } Loading src/app/game/game.component.ts +16 −3 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ export class GameComponent implements OnInit { ngOnInit(): void { this.activatedRoute.paramMap.subscribe(params => { this.sessionName = String(params.get('sessionName')); this.service.getGamestatus({'spielname': this.sessionName}).then(value => { this.service.getGamestatus({spielname: this.sessionName}).then(value => { const status = JSON.parse(value.status); if (status) { this.gameStatus.sessionID = JSON.parse(value.sessionID); Loading @@ -61,12 +61,25 @@ export class GameComponent implements OnInit { rightAnswer(): void{ this.newCard(); this.service.addPoint({spielname: this.sessionName, team: this.team}); this.service.addPoint ({ spielname: this.sessionName, team: this.team, red: this.gameStatus.red, blue: this.gameStatus.blue}).then(value => { this.gameStatus.red = JSON.parse(value.red); this.gameStatus.blue = JSON.parse(value.blue); }); console.log(this.gameStatus); } wrongAnswer(): void{ this.newCard(); this.service.removePoint({spielname: this.sessionName, team: this.team}); this.service.removePoint ({ spielname: this.sessionName, team: this.team, red: this.gameStatus.red, blue: this.gameStatus.blue }).then(value => { this.gameStatus.red = JSON.parse(value.red); this.gameStatus.blue = JSON.parse(value.blue); }); console.log(this.gameStatus); } newCard(): void{ Loading src/app/guesser/guesser.component.html +4 −3 Original line number Diff line number Diff line <div style="text-align: center; margin-left: 15em; margin-right: 15em; margin-top: 5em;"> <mat-card class="transparent"> <mat-card-title> Du musst raten! <br> <br> <br> Spielstand</mat-card-title> <mat-card-content> <br> Loading @@ -17,10 +19,9 @@ </table> </mat-card-content> <br> <mat-progress-spinner color="primary" mode="determinate" value="value"> <mat-progress-spinner class = "center" color="primary" mode="determinate" value={{timeLeft}}> </mat-progress-spinner> </mat-card> </div> <div id="app"></div> src/app/guesser/guesser.component.scss +7 −50 Original line number Diff line number Diff line Loading @@ -2,56 +2,13 @@ opacity: 0.9; } .base-timer { position: relative; width: 300px; height: 300px; table{ width: 50%; margin-left: auto; margin-right: auto; } .base-timer__svg { transform: scaleX(-1); .center{ margin-left: auto; margin-right: auto; } .base-timer__circle { fill: none; stroke: none; } .base-timer__path-elapsed { stroke-width: 7px; stroke: grey; } .base-timer__path-remaining { stroke-width: 7px; stroke-linecap: round; transform: rotate(90deg); transform-origin: center; transition: 1s linear all; fill-rule: nonzero; stroke: currentColor; } .base-timer__path-remaining.green { color: rgb(65, 184, 131); } .base-timer__path-remaining.orange { color: orange; } .base-timer__path-remaining.red { color: red; } .base-timer__label { position: absolute; width: 300px; height: 300px; top: 0; display: flex; align-items: center; justify-content: center; font-size: 48px; } Loading
angular.json +1 −3 Original line number Diff line number Diff line Loading @@ -34,9 +34,7 @@ "./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css", "src/styles.scss" ], "scripts": [ "./src/assets/JavaScript/Timer.js" ] "scripts": [] }, "configurations": { "production": { Loading
src/app/dao/TabuMiddlewareService.ts +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ export class TabuMiddlewareService { } addPoint(req: any): Promise<any> { console.log(req); console.log('TestAddPoint: ', req); return this.request('POST', `${environment.tabuMiddlewareURL}addPoint`, req); } Loading
src/app/game/game.component.ts +16 −3 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ export class GameComponent implements OnInit { ngOnInit(): void { this.activatedRoute.paramMap.subscribe(params => { this.sessionName = String(params.get('sessionName')); this.service.getGamestatus({'spielname': this.sessionName}).then(value => { this.service.getGamestatus({spielname: this.sessionName}).then(value => { const status = JSON.parse(value.status); if (status) { this.gameStatus.sessionID = JSON.parse(value.sessionID); Loading @@ -61,12 +61,25 @@ export class GameComponent implements OnInit { rightAnswer(): void{ this.newCard(); this.service.addPoint({spielname: this.sessionName, team: this.team}); this.service.addPoint ({ spielname: this.sessionName, team: this.team, red: this.gameStatus.red, blue: this.gameStatus.blue}).then(value => { this.gameStatus.red = JSON.parse(value.red); this.gameStatus.blue = JSON.parse(value.blue); }); console.log(this.gameStatus); } wrongAnswer(): void{ this.newCard(); this.service.removePoint({spielname: this.sessionName, team: this.team}); this.service.removePoint ({ spielname: this.sessionName, team: this.team, red: this.gameStatus.red, blue: this.gameStatus.blue }).then(value => { this.gameStatus.red = JSON.parse(value.red); this.gameStatus.blue = JSON.parse(value.blue); }); console.log(this.gameStatus); } newCard(): void{ Loading
src/app/guesser/guesser.component.html +4 −3 Original line number Diff line number Diff line <div style="text-align: center; margin-left: 15em; margin-right: 15em; margin-top: 5em;"> <mat-card class="transparent"> <mat-card-title> Du musst raten! <br> <br> <br> Spielstand</mat-card-title> <mat-card-content> <br> Loading @@ -17,10 +19,9 @@ </table> </mat-card-content> <br> <mat-progress-spinner color="primary" mode="determinate" value="value"> <mat-progress-spinner class = "center" color="primary" mode="determinate" value={{timeLeft}}> </mat-progress-spinner> </mat-card> </div> <div id="app"></div>
src/app/guesser/guesser.component.scss +7 −50 Original line number Diff line number Diff line Loading @@ -2,56 +2,13 @@ opacity: 0.9; } .base-timer { position: relative; width: 300px; height: 300px; table{ width: 50%; margin-left: auto; margin-right: auto; } .base-timer__svg { transform: scaleX(-1); .center{ margin-left: auto; margin-right: auto; } .base-timer__circle { fill: none; stroke: none; } .base-timer__path-elapsed { stroke-width: 7px; stroke: grey; } .base-timer__path-remaining { stroke-width: 7px; stroke-linecap: round; transform: rotate(90deg); transform-origin: center; transition: 1s linear all; fill-rule: nonzero; stroke: currentColor; } .base-timer__path-remaining.green { color: rgb(65, 184, 131); } .base-timer__path-remaining.orange { color: orange; } .base-timer__path-remaining.red { color: red; } .base-timer__label { position: absolute; width: 300px; height: 300px; top: 0; display: flex; align-items: center; justify-content: center; font-size: 48px; }