diff --git a/resources/lang/en.json b/resources/lang/en.json index 46048063f..a984f9a57 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -537,7 +537,8 @@ "yes": "Yes", "no": "No", "none": "None", - "alliances": "Alliances" + "alliances": "Alliances", + "flag": "Flag" }, "replay_panel": { "replay_speed": "Replay speed", diff --git a/src/client/graphics/layers/PlayerPanel.ts b/src/client/graphics/layers/PlayerPanel.ts index 78ded064b..a2c18ef5a 100644 --- a/src/client/graphics/layers/PlayerPanel.ts +++ b/src/client/graphics/layers/PlayerPanel.ts @@ -14,6 +14,7 @@ import { import { customElement, state } from "lit/decorators.js"; import { renderNumber, renderTroops } from "../../Utils"; import { ChatModal } from "./ChatModal"; +import Countries from "../../data/countries.json"; import { EmojiTable } from "./EmojiTable"; import { EventBus } from "../../../core/EventBus"; import { Layer } from "./Layer"; @@ -243,6 +244,11 @@ export class PlayerPanel extends LitElement implements Layer { const canTarget = this.actions?.interaction?.canTarget; const canEmbargo = this.actions?.interaction?.canEmbargo; + //flag icon in the playerPanel + const flagCode = other.cosmetics.flag; + const country = typeof flagCode === "string" ? Countries.find((c) => c.code === flagCode) : undefined; + const flagName = country?.name; + return html`
- + + ${country + ? html` +
+
+ ${translateText("player_panel.flag")} +
+
+ ${flagName} +
+
+ ` + : ""}