game selection added
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid black;
|
||||
border: 0.5px solid black;
|
||||
display: inline-block;
|
||||
padding: 6px 5px;
|
||||
}
|
||||
|
@@ -46,6 +46,9 @@ export class ValuesAlignPage {
|
||||
return;
|
||||
}
|
||||
|
||||
let addvalues = await this.alert.presentAlertConfirm("Missing values?", "Do you want to add values to the list?", "yes", "no");
|
||||
let nextGame = addvalues == "yes" ? "Add" : "Ranking";
|
||||
|
||||
this.alert.showLoader("Please wait");
|
||||
// remove all the cards with value false from array
|
||||
for(var i = 0; i < this.game.cardset.length; i++){
|
||||
@@ -57,8 +60,8 @@ export class ValuesAlignPage {
|
||||
}
|
||||
|
||||
// set storage and go to the next page
|
||||
await this.game.saveGameStorage("Values", "Ranking", this.game.cardset);
|
||||
await this.game.saveGameStorage("Values", nextGame, this.game.cardset);
|
||||
this.alert.hideLoader();
|
||||
this.router.navigateByUrl(`/valuesRanking`);
|
||||
this.router.navigateByUrl(`/values${nextGame}`);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user