From 988617289bfd3fd194197db01e04006772589b89 Mon Sep 17 00:00:00 2001 From: jwinterm Date: Sun, 31 May 2026 15:08:54 -0400 Subject: [PATCH] feat: free-play + dual-leaderboard frontend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Leaderboard panel: two boards via tabs — 🏅 Hall of Champions (paid) and 🪙 Pleb (free) — default Champions; passes board= to /api/leaderboard and retitles per board. - PaymentUI: the Free button now shows whenever free play is offered (instance free-only OR free-as-a-choice via freePlayEnabled), labelled "Play Free / no payout / Pleb leaderboard" on paid instances, and emits the play_free event (records game_mode=FREE). Replaces an emit of the dead 'enter_game' event. - Server game_mode_info payload now includes freePlayEnabled so the client can show the choice. Full suite: 22 suites / 158 tests. --- html/js/ui/leaderboard.js | 23 +++++++++++++++++++++-- html/js/ui/paymentUI.js | 16 +++++++++++----- src/game/gameModeManager.js | 1 + 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/html/js/ui/leaderboard.js b/html/js/ui/leaderboard.js index 7423205..f621823 100644 --- a/html/js/ui/leaderboard.js +++ b/html/js/ui/leaderboard.js @@ -5,6 +5,7 @@ const Leaderboard = { _isLoading: false, _currentPeriod: 'all', + _currentBoard: 'champions', // 'champions' (paid) | 'pleb' (free) init: function() { $('#leaderboardButton').on('click', function() { @@ -34,9 +35,13 @@ const Leaderboard = { var panel = $( '