diff --git a/AuthentesApp/src/app/services/game.service.ts b/AuthentesApp/src/app/services/game.service.ts index 7c42687..f5d99bf 100644 --- a/AuthentesApp/src/app/services/game.service.ts +++ b/AuthentesApp/src/app/services/game.service.ts @@ -31,6 +31,10 @@ export class GameService { await this.storage.remove(`${game.toUpperCase()}GAME_TOKEN`); } + public async saveGameStorage(game: string, status: string, type: string, value: any){ + await this.storage.set(`${game.toUpperCase()}GAME_TOKEN`, { status: status, type: value}); + } + // finish when backend is completed public async createGameStorage(game: string){ // return await this.http.post(`${config.endpoint}/...`, data).pipe( diff --git a/AuthentesApp/src/app/values/values.page.html b/AuthentesApp/src/app/values/values.page.html index 01af74f..9a0ccb6 100644 --- a/AuthentesApp/src/app/values/values.page.html +++ b/AuthentesApp/src/app/values/values.page.html @@ -39,7 +39,6 @@ [ngStyle]="{ zIndex: this.game.cardset.length - i, transform: 'scale(' + (20 - i) / 20 + ') translateY(-' + 20 * i + 'px)' }">

{{ card.title }}

-

{{ card.description }}

diff --git a/AuthentesApp/src/app/values/values.page.ts b/AuthentesApp/src/app/values/values.page.ts index 98ab609..5f11720 100644 --- a/AuthentesApp/src/app/values/values.page.ts +++ b/AuthentesApp/src/app/values/values.page.ts @@ -178,10 +178,9 @@ export class ValuesPage { this.game.cardset.shift(); } - console.log(this.game.cardset.length); // go to rearrange page if(this.game.cardset.length <= 5){ - console.log("may remove"); + await this.game.saveGameStorage("Values", "Alligning", "cards", this.game.cardset); await this.alertService.presentAlert("Cards selected","INSTRUCTIONS WILL COME HERE"); console.log("SYNC TO NEXT PAGE"); }