This commit is contained in:
Eric Meehan -X (ermeehan - ACTALENT SERVICES LLC at Cisco)
2026-10-18 18:55:25 -04:00
parent 574bd8e605
commit ae25323478
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -287,6 +287,8 @@ class Handler(BaseHTTPRequestHandler):
"deadline": state["deadline"],
"duration_ms": DURATION_MS,
"ended": state["ended"],
"total_players": len(state["players"]),
"total_presses": len(state["presses"]),
"zones": ZONES,
})
if path == "/api/me":
+2 -2
View File
@@ -145,6 +145,8 @@ async function refreshState() {
const first = !game;
clockOffset = s.now - (t0 + Date.now()) / 2;
game = s;
$("history-global-summary").textContent =
`There have been ${s.total_presses.toLocaleString()} total presses and there are ${s.total_players.toLocaleString()} total players.`;
if (first) buildStaticUi();
if (game.ended && !statsLoaded) loadStats();
updateButton();
@@ -181,8 +183,6 @@ async function loadMe() {
$("my-name").textContent = me.name;
$("my-points").textContent = me.total_points.toLocaleString();
$("my-presses").textContent = me.press_count;
$("history-global-summary").textContent =
`There have been ${me.total_presses.toLocaleString()} total presses and there are ${me.total_players.toLocaleString()} total players.`;
subscribed = me.subscribed;
updateButton();
fillTable($("my-zones"), ["Zone", "Points each", "Your presses"], zoneRows(me.zone_counts));
+1 -1
View File
@@ -22,6 +22,7 @@
<div id="countdown" class="zone-green">--:--:--.--</div>
<div id="zone-label"></div>
<div id="zone-bar"><div id="zone-marker"></div></div>
<p id="history-global-summary" aria-live="polite"></p>
</section>
<section id="button-section">
@@ -63,7 +64,6 @@
<details>
<summary>Your press history</summary>
<table id="my-history"></table>
<p id="history-global-summary" aria-live="polite"></p>
</details>
</section>