mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-17 00:40:13 +00:00
display team count (#648)
## Description: I added a display for the number of teams in public lobbies.  ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: aotumuri
This commit is contained in:
@@ -94,6 +94,11 @@ export class PublicLobby extends LitElement {
|
||||
const playersRemainingBeforeMax =
|
||||
lobby.gameConfig.maxPlayers - lobby.numClients;
|
||||
|
||||
const teamCount =
|
||||
lobby.gameConfig.gameMode === GameMode.Team
|
||||
? lobby.gameConfig.playerTeams || 0
|
||||
: null;
|
||||
|
||||
return html`
|
||||
<button
|
||||
@click=${() => this.lobbyClicked(lobby)}
|
||||
@@ -130,6 +135,13 @@ export class PublicLobby extends LitElement {
|
||||
? translateText("game_mode.teams")
|
||||
: translateText("game_mode.ffa")}
|
||||
</div>
|
||||
${teamCount !== null
|
||||
? html`
|
||||
<div class="text-md font-medium text-blue-100">
|
||||
${translateText("public_lobby.teams")} ${teamCount}
|
||||
</div>
|
||||
`
|
||||
: null}
|
||||
</div>
|
||||
<div class="flex flex-col items-center">
|
||||
<div class="text-md font-medium text-blue-100 mb-2">
|
||||
|
||||
Reference in New Issue
Block a user