adds actions button, adds comments about testing
This commit is contained in:
@@ -3,13 +3,36 @@
|
||||
<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-primary" v-show="canGrab">Peut prendre</p>
|
||||
<table class="table is-fullwidth is-striped">
|
||||
<table class="table is-fullwidth is-striped" >
|
||||
<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>
|
||||
<tbody>
|
||||
<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>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -18,6 +41,13 @@
|
||||
|
||||
<script>
|
||||
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 {
|
||||
props: {
|
||||
player: {
|
||||
@@ -52,3 +82,7 @@
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.table td, .table th { vertical-align: middle; }
|
||||
</style>
|
||||
|
||||
@@ -55,6 +55,19 @@
|
||||
import Wealth from './Wealth.vue'
|
||||
/*
|
||||
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;
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user