diff --git a/resources/lang/en.json b/resources/lang/en.json index e1bebea9e..4a3629e06 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -694,7 +694,8 @@ "send_troops": "Send Troops", "send_gold": "Send Gold", "emotes": "Emojis", - "kick": "Kick Player" + "kick": "Kick Player", + "kick_confirm": "Are you sure you want to kick {name}?" }, "send_troops_modal": { "title_with_name": "Send Troops to {name}", diff --git a/src/client/graphics/layers/PlayerPanel.ts b/src/client/graphics/layers/PlayerPanel.ts index ab95ac44d..bad07c19a 100644 --- a/src/client/graphics/layers/PlayerPanel.ts +++ b/src/client/graphics/layers/PlayerPanel.ts @@ -278,6 +278,13 @@ export class PlayerPanel extends LitElement implements Layer { private handleKickClick(e: Event, other: PlayerView) { e.stopPropagation(); + if ( + !window.confirm( + translateText("player_panel.kick_confirm", { name: other.name() }), + ) + ) { + return; + } const targetClientID = other.clientID(); if (!targetClientID) { console.warn("Cannot kick player without clientID");