mirror of
https://github.com/kmitresse/Cards-Rush.git
synced 2026-07-09 13:27:45 +00:00
feat: devWeb - add detail on connected users
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
<!-- Liste des utilisateurs dans le lobby -->
|
||||
<div id="user-list-modal" class="modal">
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-card">
|
||||
<div class="modal-card modal-">
|
||||
<header class="modal-card-head">
|
||||
<p class="modal-card-title">Liste des utilisateurs connectés</p>
|
||||
<button class="delete" aria-label="close"></button>
|
||||
@@ -80,6 +80,7 @@
|
||||
<th>Utilisateur</th>
|
||||
<th>Nombre de parties jouées</th>
|
||||
<th>Nombre de victoires</th>
|
||||
<th>Score moyen</th>
|
||||
<th>Clics corrects</th>
|
||||
<th>Clics rapides</th>
|
||||
<th>Action</th>
|
||||
@@ -91,7 +92,7 @@
|
||||
</table>
|
||||
</section>
|
||||
<footer class="modal-card-foot">
|
||||
<button class="button is-primary is-light">Fermer</button>
|
||||
<button class="button is-light">Fermer</button>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
@@ -136,6 +137,7 @@
|
||||
const $tdUsername = document.createElement('td');
|
||||
const $tdNbPlayedGame = document.createElement('td');
|
||||
const $tdNbWins = document.createElement('td');
|
||||
const $tdScore = document.createElement('td');
|
||||
const $tdRightClick = document.createElement('td');
|
||||
const $tdRapidClick = document.createElement('td');
|
||||
const $tdAction = document.createElement('td');
|
||||
@@ -164,6 +166,7 @@
|
||||
$tdUsername.textContent = user.username;
|
||||
$tdNbPlayedGame.textContent = user.nbPlayedGames;
|
||||
$tdNbWins.textContent = user.nbWin;
|
||||
$tdScore.textContent = user.scoreRate + "%";
|
||||
$tdRightClick.textContent = user.rigthClickPercentRate + "%";
|
||||
$tdRapidClick.textContent = user.rapidClickPercentRate + "%";
|
||||
$tdAction.appendChild($button);
|
||||
@@ -171,6 +174,7 @@
|
||||
$tr.appendChild($tdUsername);
|
||||
$tr.appendChild($tdNbPlayedGame);
|
||||
$tr.appendChild($tdNbWins);
|
||||
$tr.appendChild($tdScore);
|
||||
$tr.appendChild($tdRightClick);
|
||||
$tr.appendChild($tdRapidClick);
|
||||
$tr.appendChild($tdAction);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<th>Nom d'utilisateur</th>
|
||||
<th>Nombre de parties jouées</th>
|
||||
<th>Nombre de victoires</th>
|
||||
<th>Score moyen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
@@ -37,12 +38,16 @@
|
||||
tdNbGames.textContent = user.nbPlayedGames;
|
||||
const tdNbWin = document.createElement('td');
|
||||
tdNbWin.dataset.id = user.id;
|
||||
tdNbWin.textContent = user.nbWin;
|
||||
tdNbWin.textContent = user.nbWin + " (" + user.winRate + "%)";
|
||||
const tdScoreRate = document.createElement('td');
|
||||
tdScoreRate.dataset.id = user.id;
|
||||
tdScoreRate.textContent = user.scoreRate + "%";
|
||||
|
||||
|
||||
tr.appendChild(tdUsername);
|
||||
tr.appendChild(tdNbGames);
|
||||
tr.appendChild(tdNbWin);
|
||||
tr.appendChild(tdScoreRate);
|
||||
table.appendChild(tr);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user