global
This commit is contained in:
parent
50cea236b7
commit
eeb172fe73
@@ -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,
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
<details>
|
||||
<summary>Your press history</summary>
|
||||
<table id="my-history"></table>
|
||||
<p id="history-global-summary" aria-live="polite"></p>
|
||||
</details>
|
||||
</section>
|
||||
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ main {
|
||||
|
||||
h1 { letter-spacing: 0.3em; }
|
||||
|
||||
a { color --sapphire; }
|
||||
a { color: var(--sapphire); }
|
||||
|
||||
section { margin: 1.5rem 0; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user