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"], "deadline": state["deadline"],
"duration_ms": DURATION_MS, "duration_ms": DURATION_MS,
"ended": state["ended"], "ended": state["ended"],
"total_players": len(state["players"]),
"total_presses": len(state["presses"]),
"zones": ZONES, "zones": ZONES,
}) })
if path == "/api/me": if path == "/api/me":
+2 -2
View File
@@ -145,6 +145,8 @@ async function refreshState() {
const first = !game; const first = !game;
clockOffset = s.now - (t0 + Date.now()) / 2; clockOffset = s.now - (t0 + Date.now()) / 2;
game = s; 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 (first) buildStaticUi();
if (game.ended && !statsLoaded) loadStats(); if (game.ended && !statsLoaded) loadStats();
updateButton(); updateButton();
@@ -181,8 +183,6 @@ async function loadMe() {
$("my-name").textContent = me.name; $("my-name").textContent = me.name;
$("my-points").textContent = me.total_points.toLocaleString(); $("my-points").textContent = me.total_points.toLocaleString();
$("my-presses").textContent = me.press_count; $("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; subscribed = me.subscribed;
updateButton(); updateButton();
fillTable($("my-zones"), ["Zone", "Points each", "Your presses"], zoneRows(me.zone_counts)); 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="countdown" class="zone-green">--:--:--.--</div>
<div id="zone-label"></div> <div id="zone-label"></div>
<div id="zone-bar"><div id="zone-marker"></div></div> <div id="zone-bar"><div id="zone-marker"></div></div>
<p id="history-global-summary" aria-live="polite"></p>
</section> </section>
<section id="button-section"> <section id="button-section">
@@ -63,7 +64,6 @@
<details> <details>
<summary>Your press history</summary> <summary>Your press history</summary>
<table id="my-history"></table> <table id="my-history"></table>
<p id="history-global-summary" aria-live="polite"></p>
</details> </details>
</section> </section>