diff --git a/README.md b/README.md index 367dcdb..58fc943 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Higher-value zones are shorter, so scoring big is risky. | Black | 16 | 46m | | White | 32 | 23m | -Every press records the zone, the points, and the exact remaining time in milliseconds. Players can view their own score, presses per zone, and press history at any time. Global stats (leaderboard, presses per zone, closest call, full press log) stay hidden until the game ends. +Every press records the zone, the points, and the exact remaining time in milliseconds. Players can view their own score, presses per zone, and press history at any time. A public live leaderboard shows all players ranked by total points, with press counts; ties are sorted alphabetically. Scores refresh every five seconds and immediately after you press or join. Detailed global stats (presses per zone, closest call, full press log) stay hidden until the game ends. Logged-in players can also join the mailing list. @@ -89,6 +89,7 @@ Tip: `BUTTON_DURATION_SECONDS=60` makes for quick testing. | POST | `/api/logout` | ✓ | Revoke the current session token | | POST | `/api/press` | ✓ | Press the button | | GET | `/api/me` | ✓ | Your score, zone counts, and press history | +| GET | `/api/leaderboard` | | Public player names, total points, and press counts | | GET | `/api/stats` | | Global stats (403 until the game ends) | | POST | `/api/subscribe` | ✓ | `{first_name, email, last_name?, phone?}` | diff --git a/static/app.js b/static/app.js index 1cabb61..68ced97 100644 --- a/static/app.js +++ b/static/app.js @@ -17,7 +17,6 @@ function renderSections() { "leaderboard-section": true, "stats-section": statsLoaded, rules: true, - "mailing-list": !!token && !subscribed, "share-controls": !!currentShareText, more: true, donate: true, @@ -32,6 +31,7 @@ function renderSections() { document.querySelectorAll("[data-panel]").forEach((panel) => { panel.hidden = panel.id !== selectedSection; }); + $("mailing-list").hidden = !token || subscribed; $("section-hint").hidden = selectedSection !== null; } diff --git a/static/index.html b/static/index.html index 3599865..1a49c4f 100644 --- a/static/index.html +++ b/static/index.html @@ -38,7 +38,6 @@ - @@ -124,10 +123,9 @@ -