From 1b3bcf32c1c810f3e68ef72a2d1ed04a71e50f8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Mart=C3=ADnek?= <96337712+Michal-Martinek@users.noreply.github.com> Date: Thu, 23 Oct 2025 04:07:40 +0200 Subject: [PATCH] Made leaderboard entries bold for teammates (#2221) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description: Closes #2185. Made leaderboard entries **bold** all your for **teamates**. Before it was only bold for your player. _Your player should still be bold even when is undefined._ Didn't add any tests - not sure if there is any testing for these type of things. ### collapsed leaderboard list Snímek obrazovky 2025-10-22 182432 ### expanded leaderboard Snímek obrazovky 2025-10-22 182539 ### player not yet spawned Snímek obrazovky 2025-10-22 183858 ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [ ] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: michal7952 --- src/client/graphics/layers/Leaderboard.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/graphics/layers/Leaderboard.ts b/src/client/graphics/layers/Leaderboard.ts index 30e0539d5..8d6a32d6e 100644 --- a/src/client/graphics/layers/Leaderboard.ts +++ b/src/client/graphics/layers/Leaderboard.ts @@ -14,6 +14,7 @@ interface Entry { gold: string; troops: string; isMyPlayer: boolean; + isOnSameTeam: boolean; player: PlayerView; } @@ -115,6 +116,7 @@ export class Leaderboard extends LitElement implements Layer { gold: renderNumber(player.gold()), troops: renderNumber(troops), isMyPlayer: player === myPlayer, + isOnSameTeam: player === myPlayer || player.isOnSameTeam(myPlayer!), player: player, }; }); @@ -143,6 +145,7 @@ export class Leaderboard extends LitElement implements Layer { gold: renderNumber(myPlayer.gold()), troops: renderNumber(myPlayerTroops), isMyPlayer: true, + isOnSameTeam: true, player: myPlayer, }); } @@ -225,7 +228,7 @@ export class Leaderboard extends LitElement implements Layer { (p) => p.player.id(), (player) => html`
this.handleRowClickPlayer(player.player)}