From 72804dfe40d11630197e3323a122a374bd73b860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A8=D1=82=D0=B5=D0=BD=D0=B3=D0=B0=D1=83=D1=8D=D1=80=20?= =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=94=D0=BC=D0=B8=D1=82?= =?UTF-8?q?=D1=80=D0=B8=D0=B5=D0=B2=D0=B8=D1=87?= Date: Sun, 29 Oct 2023 23:42:35 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=87=D0=BA=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MyOwnGame.Frontend/pages/lobby/lobby.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/MyOwnGame.Frontend/pages/lobby/lobby.js b/MyOwnGame.Frontend/pages/lobby/lobby.js index b035ca0..e19014b 100644 --- a/MyOwnGame.Frontend/pages/lobby/lobby.js +++ b/MyOwnGame.Frontend/pages/lobby/lobby.js @@ -191,6 +191,14 @@ function getCachedPlayer(player){ function updatePlayers() { requestUpdateSession().then(() => { session.players.forEach(player => { + let profilePane = document.querySelector(`#player-${player.id}`); + const imageUrl = `${address}/avatars/${player.avatarImage}`; + if(profilePane){ + profilePane.querySelector(".player-image").style.backgroundImage = `url('${imageUrl}')`; + profilePane.querySelector(".player-name").innerHTML = player.name; + profilePane.querySelector(".player-score").innerHTML = player.score; + } + if(session.respondingPlayer && player.id == session.respondingPlayer.id) setPlayerStatus(player.id, "отвечает", "rgba(240, 240, 100, 1)", "rgba(120, 120, 0, 1)"); @@ -276,7 +284,7 @@ function showContent(content, callback) { if(content.type == 1){ textQuestion.querySelector(`#text-content`).textContent = content.text; setTimeout(() => callback(), content.text.length * 200); - setAnswerText(null); + } if(content.type == 2){ audio = new Audio(`${address}/content/${session.id}/${content.url}`);