diff --git a/src/client/components/LobbyPlayerView.ts b/src/client/components/LobbyPlayerView.ts index aeaff00b3..94652ba50 100644 --- a/src/client/components/LobbyPlayerView.ts +++ b/src/client/components/LobbyPlayerView.ts @@ -124,7 +124,10 @@ export class LobbyTeamView extends LitElement { (client) => { const displayName = this.getClientDisplayName(client); return html`
${displayName}
`; @@ -168,7 +171,11 @@ export class LobbyTeamView extends LitElement { (c) => c.clientID ?? c.username, (client) => { const displayName = this.getClientDisplayName(client); - return html` + return html` ${displayName} ${client.clientID === this.lobbyCreatorClientID ? html` +
@@ -228,7 +240,10 @@ export class LobbyTeamView extends LitElement { (p) => { const displayName = this.getClientDisplayName(p); return html`
${displayName} ${p.clientID === this.lobbyCreatorClientID @@ -365,6 +380,14 @@ export class LobbyTeamView extends LitElement { })); } + private isCurrentPlayer(client: ClientInfo): boolean { + return !!this.currentClientID && client.clientID === this.currentClientID; + } + + private teamContainsCurrentPlayer(preview: TeamPreviewData): boolean { + return preview.players.some((p) => this.isCurrentPlayer(p)); + } + private getClientDisplayName(client: ClientInfo): string { const full = formatPlayerDisplayName(client.username, client.clanTag); if (!this.userSettings.anonymousNames()) { diff --git a/src/client/styles.css b/src/client/styles.css index dd73aa6ac..255fed924 100644 --- a/src/client/styles.css +++ b/src/client/styles.css @@ -295,6 +295,7 @@ label.option-card:hover { align-items: center; gap: 8px; background: #2a2a2a; + border: 1px solid transparent; color: #fff; padding: 8px 12px; margin: 4px; @@ -302,6 +303,11 @@ label.option-card:hover { font-size: 14px; } +.player-tag.current-player { + background: rgba(14, 165, 233, 0.15); + border: 1px solid rgba(14, 165, 233, 0.4); +} + #bots-count, #private-lobby-bots-count { width: 80%;