@@ -512,6 +526,28 @@ export class PlayerPanel extends LitElement implements Layer {
`;
}
+ private renderRocketDirectionToggle() {
+ return html`
+
+
+ `;
+ }
+
private renderStats(other: PlayerView, my: PlayerView) {
return html`
@@ -696,53 +732,53 @@ export class PlayerPanel extends LitElement implements Layer {
: ""}
-
-
- ${other !== my
- ? canEmbargo
- ? actionButton({
- onClick: (e: MouseEvent) =>
- this.handleEmbargoClick(e, my, other),
- icon: stopTradingIcon,
- iconAlt: "Stop Trading",
- title: translateText("player_panel.stop_trade"),
- label: translateText("player_panel.stop_trade"),
- type: "yellow",
- })
- : actionButton({
- onClick: (e: MouseEvent) =>
- this.handleStopEmbargoClick(e, my, other),
- icon: startTradingIcon,
- iconAlt: "Start Trading",
- title: translateText("player_panel.start_trade"),
- label: translateText("player_panel.start_trade"),
- type: "green",
- })
- : ""}
- ${canBreakAlliance
- ? actionButton({
- onClick: (e: MouseEvent) =>
- this.handleBreakAllianceClick(e, my, other),
- icon: breakAllianceIcon,
- iconAlt: "Break Alliance",
- title: translateText("player_panel.break_alliance"),
- label: translateText("player_panel.break_alliance"),
- type: "red",
- })
- : ""}
- ${canSendAllianceRequest
- ? actionButton({
- onClick: (e: MouseEvent) =>
- this.handleAllianceClick(e, my, other),
- icon: allianceIcon,
- iconAlt: "Alliance",
- title: translateText("player_panel.send_alliance"),
- label: translateText("player_panel.send_alliance"),
- type: "indigo",
- })
- : ""}
-
-
+ ${other === my
+ ? html``
+ : html`
+
+ ${canEmbargo
+ ? actionButton({
+ onClick: (e: MouseEvent) =>
+ this.handleEmbargoClick(e, my, other),
+ icon: stopTradingIcon,
+ iconAlt: "Stop Trading",
+ title: translateText("player_panel.stop_trade"),
+ label: translateText("player_panel.stop_trade"),
+ type: "yellow",
+ })
+ : actionButton({
+ onClick: (e: MouseEvent) =>
+ this.handleStopEmbargoClick(e, my, other),
+ icon: startTradingIcon,
+ iconAlt: "Start Trading",
+ title: translateText("player_panel.start_trade"),
+ label: translateText("player_panel.start_trade"),
+ type: "green",
+ })}
+ ${canBreakAlliance
+ ? actionButton({
+ onClick: (e: MouseEvent) =>
+ this.handleBreakAllianceClick(e, my, other),
+ icon: breakAllianceIcon,
+ iconAlt: "Break Alliance",
+ title: translateText("player_panel.break_alliance"),
+ label: translateText("player_panel.break_alliance"),
+ type: "red",
+ })
+ : ""}
+ ${canSendAllianceRequest
+ ? actionButton({
+ onClick: (e: MouseEvent) =>
+ this.handleAllianceClick(e, my, other),
+ icon: allianceIcon,
+ iconAlt: "Alliance",
+ title: translateText("player_panel.send_alliance"),
+ label: translateText("player_panel.send_alliance"),
+ type: "indigo",
+ })
+ : ""}
+
+ `}
${other === my
? html`
${actionButton({
@@ -845,16 +881,14 @@ export class PlayerPanel extends LitElement implements Layer {
-
-
-
+
${this.renderResources(other)}
+
+ ${other === my ? this.renderRocketDirectionToggle() : ""}
+
@@ -902,7 +939,7 @@ export class PlayerPanel extends LitElement implements Layer {
${this.renderAllianceExpiry()}
-
+
${this.renderActions(my, other)}