style(client): Cols UI

parent c33c76b4
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
<b-row id="players"> <b-row id="players">
<b-col id="players-ingame"> <b-col id="players-ingame">
<p>{{ gamers.length }} en jeu</p> <p>{{ gamers.length }} en jeu</p>
<Player <Player
v-for="player in gamers" v-bind:key="player.name" v-for="player in gamers" v-bind:key="player.name"
:name="player.name" :nb-cards="player.nbCards" :is-playing="player.isPlaying" :name="player.name" :nb-cards="player.nbCards" :is-playing="player.isPlaying"
/> />
</b-col> </b-col>
<b-col id="players-online"> <b-col id="players-online">
<p>{{ players.length }} en ligne</p> <p>{{ players.length }} en ligne</p>
...@@ -26,17 +26,21 @@ ...@@ -26,17 +26,21 @@
</div> </div>
</b-col> </b-col>
</b-row> </b-row>
<div id="game"> <b-row id="game">
<label for="messages"> Choisis un message :</label> <b-col>
<select v-model="message" name="message" id="messages"> <Hand :cards="currentCards()" />
<option value="WAITING">J'attends</option> </b-col>
<option value="READY">Prêt à jouer !</option> <b-col>
<option value="BET">Pari plus haut</option> <label for="messages"> Choisis un message :</label>
<option value="MENTEUR">Menteur !</option> <select v-model="message" name="message" id="messages">
</select> <option value="WAITING">J'attends</option>
<button v-on:click="sendMessage(message)">Envoyer</button> <option value="READY">Prêt à jouer !</option>
<Hand :cards="currentCards()" /> <option value="BET">Pari plus haut</option>
</div> <option value="MENTEUR">Menteur !</option>
</select>
<button v-on:click="sendMessage(message)">Envoyer</button>
</b-col>
</b-row>
</b-container> </b-container>
</template> </template>
......
<template> <template>
<div> <div>
<b-row id="sockets-buttons" class="m-3"> <b-row id="sockets-buttons" class="m-3">
<b-col> <b-col>
<b-button-group class="mt-lg-3"> <b-button-group class="mt-lg-3">
<b-button @click="pingServer()" variant="warning" size="sm">Ping Server</b-button> <b-button @click="pingServer()" variant="warning" size="sm">Ping Server</b-button>
...@@ -14,28 +14,25 @@ ...@@ -14,28 +14,25 @@
<p v-if="isConnected">Connecté au serveur</p> <p v-if="isConnected">Connecté au serveur</p>
<p v-if="!isConnected">Déconnecté</p> <p v-if="!isConnected">Déconnecté</p>
</b-col> </b-col>
</b-row>
<b-row id="sockets-messages">
<b-col> <b-col>
<p> <p>
<b-icon-inbox-fill /> <b-icon-inbox-fill />
Messages du serveur: <b v-if="socketMessages.length === 0">Aucun :'(</b> Messages du serveur:
</p> </p>
<b-card class="text-center" v-if="socketMessages.length === 0">
<b-card-text>Pas de message :'(</b-card-text>
</b-card>
</b-col>
<b-col
v-for="m in socketMessages.slice(-8)" :key="JSON.stringify(m)">
<b-card class="text-center"
header-tag="header"
v-bind:header="m.data.state"
v-bind:sub-title="m.data != null ? m.data.extras != null ? JSON.stringify(m.data.extras) : '' : ''"
/>
</b-col> </b-col>
<b-row id="sockets-messages">
<b-card-group deck>
<b-col
v-for="m in socketMessages.slice(-8)" :key="JSON.stringify(m)"
>
<b-card class="text-center"
header-tag="header"
v-bind:header="m.data.state"
v-bind:sub-title="m.data != null ? m.data.extras != null ? JSON.stringify(m.data.extras) : '' : ''"
>
</b-card>
</b-col>
</b-card-group>
</b-row>
<ul id="messages">
</ul>
</b-row> </b-row>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment