From 57b6c0e234de3c7b11209e6801a89d751ff977c3 Mon Sep 17 00:00:00 2001 From: "tom.hempel" Date: Thu, 2 Oct 2025 13:59:44 +0200 Subject: [PATCH] redesigned player-display to match style --- experiment-scripts/player-display.html | 180 ++++++++++++++----------- 1 file changed, 101 insertions(+), 79 deletions(-) diff --git a/experiment-scripts/player-display.html b/experiment-scripts/player-display.html index ad9181c..85e31d4 100644 --- a/experiment-scripts/player-display.html +++ b/experiment-scripts/player-display.html @@ -4,6 +4,7 @@ Charades Player Display + -
- Waiting for game to start... -
-
Connected
+
+
Waiting for game to start...
+
+
@@ -240,23 +261,24 @@ const seconds = Math.max(0, timeRemaining); timerEl.textContent = seconds.toFixed(1) + 's'; - // Add warning class when time is low - if (seconds <= 10) { + // Update timer color based on remaining time + timerEl.className = 'timer'; + if (seconds <= 5) { + timerEl.classList.add('danger'); + } else if (seconds <= 10) { timerEl.classList.add('warning'); - } else { - timerEl.classList.remove('warning'); } } function showLastWordStatus(status) { if (status === 1) { - lastWordStatusEl.textContent = '✅ Previous word: CORRECT!'; + lastWordStatusEl.textContent = 'Previous word: CORRECT'; lastWordStatusEl.className = 'last-word-status status-correct'; setTimeout(() => { lastWordStatusEl.className = 'last-word-status status-hidden'; }, 3000); } else if (status === 0) { - lastWordStatusEl.textContent = '❌ Previous word: Time up!'; + lastWordStatusEl.textContent = 'Previous word: Time Up'; lastWordStatusEl.className = 'last-word-status status-incorrect'; setTimeout(() => { lastWordStatusEl.className = 'last-word-status status-hidden'; @@ -299,4 +321,4 @@ }); - \ No newline at end of file +