adds actions button, adds comments about testing
This commit is contained in:
@@ -5,11 +5,34 @@
|
|||||||
<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>
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user