mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-28 23:14:33 +00:00
kick confirmation with translation key
This commit is contained in:
@@ -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}",
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user