basic impl of players list and loot api in frontend

This commit is contained in:
2019-07-03 16:07:56 +02:00
parent b8968aebbd
commit 4e28eb4159
4 changed files with 46 additions and 29 deletions

View File

@@ -2,7 +2,7 @@
<div class="column is-one-third-desktop">
<div id="sidebar" class="card">
<header id="sidebar-heading" class="card-header">
<p class="card-header-title">{{ name }}</p>
<p class="card-header-title">{{ player.name }}</p>
<div class="dropdown is-right"
:class="{ 'is-active': show_dropdown }">
<div class="dropdown-trigger" ref="dropdown_btn">
@@ -26,7 +26,7 @@
</div>
</header>
<div class="card-content">
<Wealth :wealth="player.wealth"
<Wealth :wealth="wealth"
:edit="edit_wealth"
@updated="edit_wealth = !edit_wealth">
</Wealth>
@@ -86,8 +86,8 @@
const idx = this.state.player_list.findIndex(p => p.id == id);
return this.state.player_list[idx];
},
name () {
return this.player.name;
wealth () {
return [this.player.cp, this.player.sp, this.player.gp, this.player.pp];
},
// Check if the active player is the special 'Group' player
playerIsGroup () {