mirror of
https://github.com/kmitresse/Cards-Rush.git
synced 2026-05-13 17:11:49 +00:00
draft: devWeb - Add informations of connected users to invite them
This commit is contained in:
@@ -27,6 +27,6 @@ public class GameStatistics extends HttpServlet {
|
||||
request.getRequestDispatcher("/WEB-INF/pages/game-statistics.jsp").forward(request, response);
|
||||
} catch (Exception e) {
|
||||
request.getRequestDispatcher("/WEB-INF/pages/profile.jsp").forward(request, response);
|
||||
} ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,10 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Utilisateur</th>
|
||||
<th>Nombre de parties jouées</th>
|
||||
<th>Nombre de victoires</th>
|
||||
<th>Clics corrects</th>
|
||||
<th>Clics rapides</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -120,6 +124,10 @@
|
||||
users.forEach(user => {
|
||||
const $tr = document.createElement('tr');
|
||||
const $tdUsername = document.createElement('td');
|
||||
const $tdNbPlayedGame = document.createElement('td');
|
||||
const $tdNbWins = document.createElement('td');
|
||||
const $tdRightClick = document.createElement('td');
|
||||
const $tdRapidClick = document.createElement('td');
|
||||
const $tdAction = document.createElement('td');
|
||||
const $button = document.createElement('button');
|
||||
|
||||
@@ -144,9 +152,17 @@
|
||||
|
||||
|
||||
$tdUsername.textContent = user.username;
|
||||
$tdNbPlayedGame.textContent = user.nbPlayedGame;
|
||||
$tdNbWins.textContent = user.nbWin;
|
||||
$tdRightClick.textContent = user.rigthClickPercentRate + "%";
|
||||
$tdRapidClick.textContent = user.rapidClickPercentRate + "%";
|
||||
$tdAction.appendChild($button);
|
||||
|
||||
$tr.appendChild($tdUsername);
|
||||
$tr.appendChild($tdNbPlayedGame);
|
||||
$tr.appendChild($tdNbWins);
|
||||
$tr.appendChild($tdRightClick);
|
||||
$tr.appendChild($tdRapidClick);
|
||||
$tr.appendChild($tdAction);
|
||||
|
||||
$tbody.appendChild($tr);
|
||||
|
||||
Reference in New Issue
Block a user