adds actions button, adds comments about testing

This commit is contained in:
2019-06-13 14:46:48 +02:00
parent 3232710a4c
commit 2efed539fb
2 changed files with 50 additions and 3 deletions

View File

@@ -3,13 +3,36 @@
<p class="notification is-paddingless is-info" v-show="canAdd">Peut ajouter</p> <p class="notification is-paddingless is-info" v-show="canAdd">Peut ajouter</p>
<p class="notification is-paddingless is-warning" v-show="canSell">Peut vendre</p> <p class="notification is-paddingless is-warning" v-show="canSell">Peut vendre</p>
<p class="notification is-paddingless is-primary" v-show="canGrab">Peut prendre</p> <p class="notification is-paddingless is-primary" v-show="canGrab">Peut prendre</p>
<table class="table is-fullwidth is-striped"> <table class="table is-fullwidth is-striped" >
<thead> <thead>
<tr><th>Objets de {{ player }}</th></tr> <tr>
<th>Objets de {{ player }}</th>
<th v-if="canGrab"></th>
<th v-if="canSell">
<button class="button is-warning is-medium">
<span class="icon">
<i class="fas fa-coins"></i>
</span>
<small>Vendre</small>
</button>
</th>
</tr>
</thead> </thead>
<tbody> <tbody>
<template v-for="(item, idx) in content"> <template v-for="(item, idx) in content">
<tr :key="idx"><td>{{item.name}}</td></tr> <tr :key="`row-${idx}`">
<td>{{item.name}}</td>
<td v-if="canGrab">
<button class="button is-primary is-medium" disabled>
<span class="icon">
<i class="fas fa-praying-hands"></i>
</span>
<small>Request pending...</small>
</button>
</td>
<td v-if="canSell">
</td>
</tr>
</template> </template>
</tbody> </tbody>
</table> </table>
@@ -18,6 +41,13 @@
<script> <script>
import { store } from '../App.vue' import { store } from '../App.vue'
/*
The chest displays the collection of items owned by a player
TO TEST :
- Possible interactions depends on player_id and current chest
- Objects are displayed as a table
*/
export default { export default {
props: { props: {
player: { player: {
@@ -52,3 +82,7 @@
}, },
} }
</script> </script>
<style scoped>
.table td, .table th { vertical-align: middle; }
</style>

View File

@@ -55,6 +55,19 @@
import Wealth from './Wealth.vue' import Wealth from './Wealth.vue'
/* /*
The Player control board. The Player control board.
To test :
- Player name is displayed
- Player's wealth is displayed -> Inside Wealth component
- Dropdown:
- The first item is the group
- Opened by activator
- Closed when clicked outside
- Click on item does switch active player
- Switch player :
- Name is updated when player_id is updated
- Wealth is updated -> Inside Wealth component
- Chest button controls Chest visibility
*/ */
let handleOutsideClick; let handleOutsideClick;
export default { export default {