diff --git a/server.py b/server.py index e7baaa1..878ec9a 100644 --- a/server.py +++ b/server.py @@ -182,6 +182,8 @@ def player_summary(pid): return { "name": state["players"][pid]["name"], "subscribed": state["players"][pid].get("subscribed", False), + "total_players": len(state["players"]), + "total_presses": len(state["presses"]), "total_points": sum(p["points"] for p in presses), "press_count": len(presses), "zone_counts": counts, diff --git a/static/app.js b/static/app.js index 6e83f37..1052121 100644 --- a/static/app.js +++ b/static/app.js @@ -181,6 +181,8 @@ 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 by ${me.total_players.toLocaleString()} players.`; subscribed = me.subscribed; updateButton(); fillTable($("my-zones"), ["Zone", "Points each", "Your presses"], zoneRows(me.zone_counts)); diff --git a/static/index.html b/static/index.html index 610de40..fd07a76 100644 --- a/static/index.html +++ b/static/index.html @@ -63,6 +63,7 @@
Your press history
+

diff --git a/static/style.css b/static/style.css index 94a86a0..d1f6bb4 100644 --- a/static/style.css +++ b/static/style.css @@ -40,7 +40,7 @@ main { h1 { letter-spacing: 0.3em; } -a { color --sapphire; } +a { color: var(--sapphire); } section { margin: 1.5rem 0; }