updates frontend to use DB api
This commit is contained in:
@@ -82,8 +82,7 @@
|
||||
},
|
||||
computed: {
|
||||
player () {
|
||||
const id = this.state.player_id;
|
||||
const idx = this.state.player_list.findIndex(p => p.id == id);
|
||||
const idx = this.state.player_id;
|
||||
return this.state.player_list[idx];
|
||||
},
|
||||
wealth () {
|
||||
@@ -104,10 +103,9 @@
|
||||
}
|
||||
},
|
||||
setActivePlayer (playerIdx) {
|
||||
const newId = this.state.player_list[playerIdx].id;
|
||||
AppStorage.setActivePlayer(newId);
|
||||
if (newId == 0) { this.hidePlayerChest() }
|
||||
this.player.name = this.state.player_list[playerIdx].name
|
||||
var playerIdx = Number(playerIdx);
|
||||
AppStorage.setActivePlayer(playerIdx);
|
||||
if (playerIdx == 0) { this.hidePlayerChest() }
|
||||
},
|
||||
closeDropdown () {
|
||||
this.show_dropdown = false
|
||||
|
||||
Reference in New Issue
Block a user