Compare commits
No commits in common. "8d6129590a5db04bfe9f2b9827bb0ce18ed240a1" and "5f256e1983fdd4c668c0959a2a1de34bc874c94f" have entirely different histories.
8d6129590a
...
5f256e1983
|
@ -61,9 +61,9 @@
|
|||
<p id="foxes-warn" *ngIf="!checkTotalFoxPoints()">Please check the number of caught foxes!</p>
|
||||
<button (click)="switchToNextPage()" [disabled]="!checkAllExtraPoints()">Next</button>
|
||||
</div>
|
||||
<div id="summary" class="visible-{{this.currentPage === 6}}">
|
||||
<div id="summary" class="visible-{{this.currentPage === 5}}">
|
||||
<p>Game Summary</p>
|
||||
<button (click)="saveGame()">Save Game</button>
|
||||
<button>Save Game</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="scores">
|
||||
|
|
|
@ -702,22 +702,4 @@ export class AddGameComponent implements OnInit {
|
|||
checkAllExtraPoints(): boolean {
|
||||
return this.checkTotalFoxPoints();
|
||||
}
|
||||
|
||||
/**
|
||||
* _____
|
||||
* / ___/__ ______ ___ ____ ___ ____ ________ __
|
||||
* \__ \/ / / / __ `__ \/ __ `__ \/ __ `/ ___/ / / /
|
||||
* ___/ / /_/ / / / / / / / / / / / /_/ / / / /_/ /
|
||||
* /____/\__,_/_/ /_/ /_/_/ /_/ /_/\__,_/_/ \__, /
|
||||
* /____/
|
||||
*/
|
||||
|
||||
/**
|
||||
* Sends the game stats to the API to be saved
|
||||
*/
|
||||
saveGame(): void {
|
||||
//TODO implement
|
||||
// call api method, then return to gameNight page / close modal or sth like that
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,20 +17,8 @@ export class HomeComponent implements OnInit {
|
|||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
if(!HomeComponent.sessionDataAvailable()) {
|
||||
this.authenticateUser();
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if there is session data saved in the local storage
|
||||
* @return If there is session data available
|
||||
*/
|
||||
private static sessionDataAvailable(): boolean {
|
||||
let user = StorageService.getUserInfo();
|
||||
|
||||
return user !== undefined;
|
||||
// TODO: First try to read existing session data
|
||||
this.authenticateUser();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -47,10 +35,6 @@ export class HomeComponent implements OnInit {
|
|||
sessionKey: ''
|
||||
};
|
||||
|
||||
if(user.firebonkId === undefined || user.firstName === undefined || user.token === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
let authenticatedUser = ApiService.performAuthentication(user);
|
||||
StorageService.setUserInfo(authenticatedUser);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user