mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 12:00:44 +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:
@@ -145,7 +145,8 @@
|
||||
},
|
||||
"public_lobby": {
|
||||
"join": "Join next Game",
|
||||
"waiting": "players waiting"
|
||||
"waiting": "players waiting",
|
||||
"teams": "Team count:"
|
||||
},
|
||||
"username": {
|
||||
"enter_username": "Enter your username",
|
||||
|
||||
@@ -137,7 +137,8 @@
|
||||
},
|
||||
"public_lobby": {
|
||||
"join": "次のゲームに参加",
|
||||
"waiting": "人が参加しています..."
|
||||
"waiting": "人が参加しています...",
|
||||
"teams": "チームの数:"
|
||||
},
|
||||
"username": {
|
||||
"enter_username": "ユーザー名を入力",
|
||||
|
||||
@@ -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