From 4463236e8bec1c268dec6c77f881212044f1df07 Mon Sep 17 00:00:00 2001
From: Abdallah Bahrawi <140177728+abdallahbahrawi1@users.noreply.github.com>
Date: Thu, 20 Nov 2025 05:27:41 +0200
Subject: [PATCH] Lobby Team Preview UI (#2444)
Resolves #1092
## Description:
Added a team preview to the Host Lobby: players listed on the left,
teams on the right in two scrollable columns with color dots matching
in-game colors. Implemented accurate server-parity team assignment
(including clan grouping).
Screenshots:
## 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
- [x] 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:
abodcraft1
---------
Co-authored-by: Evan
---
resources/lang/en.json | 6 +-
src/client/HostLobbyModal.ts | 29 +--
src/client/components/LobbyTeamView.ts | 288 +++++++++++++++++++++++++
src/core/configuration/PastelTheme.ts | 3 -
4 files changed, 301 insertions(+), 25 deletions(-)
create mode 100644 src/client/components/LobbyTeamView.ts
diff --git a/resources/lang/en.json b/resources/lang/en.json
index 77e6b24b5..0897c7718 100644
--- a/resources/lang/en.json
+++ b/resources/lang/en.json
@@ -277,7 +277,11 @@
"waiting": "Waiting for players...",
"random_spawn": "Random spawn",
"start": "Start Game",
- "host_badge": "Host"
+ "host_badge": "Host",
+ "assigned_teams": "Assigned Teams",
+ "empty_teams": "Empty Teams",
+ "empty_team": "Empty",
+ "remove_player": "Remove {{username}}"
},
"team_colors": {
"red": "Red",
diff --git a/src/client/HostLobbyModal.ts b/src/client/HostLobbyModal.ts
index ccb01843c..9ace197cf 100644
--- a/src/client/HostLobbyModal.ts
+++ b/src/client/HostLobbyModal.ts
@@ -25,6 +25,7 @@ import {
import { generateID } from "../core/Util";
import "./components/baseComponents/Modal";
import "./components/Difficulties";
+import "./components/LobbyTeamView";
import "./components/Maps";
import { JoinLobbyEvent } from "./Main";
import { renderUnitTypeOptions } from "./utilities/RenderUnitTypeOptions";
@@ -554,27 +555,13 @@ export class HostLobbyModal extends LitElement {
}
-