mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-25 18:44:37 +00:00
Merge branch 'main' into evan-nations
This commit is contained in:
@@ -249,6 +249,7 @@
|
||||
},
|
||||
"game_starting_modal": {
|
||||
"title": "Game is Starting...",
|
||||
"code_license": "Code licensed under AGPL-3.0",
|
||||
"desc": "Preparing for the lobby to start. Please wait."
|
||||
},
|
||||
"difficulty": {
|
||||
@@ -496,6 +497,7 @@
|
||||
"other_won": "{player} has won!",
|
||||
"exit": "Exit Game",
|
||||
"keep": "Keep Playing",
|
||||
"spectate": "Spectate",
|
||||
"wishlist": "Wishlist on Steam!"
|
||||
},
|
||||
"leaderboard": {
|
||||
|
||||
@@ -84,13 +84,20 @@ export class GameStartingModal extends LitElement {
|
||||
.modal button:active {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
|
||||
.copyright {
|
||||
font-size: 32px;
|
||||
margin-top: 20px;
|
||||
opacity: 1;
|
||||
}
|
||||
`;
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<div class="modal ${this.isVisible ? "visible" : ""}">
|
||||
<h2>${translateText("game_starting_modal.title")}</h2>
|
||||
<p>${translateText("game_starting_modal.desc")}</p>
|
||||
<div class="copyright">© OpenFront</div>
|
||||
<h5>${translateText("game_starting_modal.code_license")}</h5>
|
||||
<p>${translateText("game_starting_modal.title")}</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,9 @@ export class WinModal extends LitElement implements Layer {
|
||||
@state()
|
||||
showButtons = false;
|
||||
|
||||
@state()
|
||||
private isWin = false;
|
||||
|
||||
@state()
|
||||
private patternContent: TemplateResult | null = null;
|
||||
|
||||
@@ -68,7 +71,9 @@ export class WinModal extends LitElement implements Layer {
|
||||
@click=${this.hide}
|
||||
class="flex-1 px-3 py-3 text-base cursor-pointer bg-blue-500/60 text-white border-0 rounded transition-all duration-200 hover:bg-blue-500/80 hover:-translate-y-px active:translate-y-px"
|
||||
>
|
||||
${translateText("win_modal.keep")}
|
||||
${this.isWin
|
||||
? translateText("win_modal.keep")
|
||||
: translateText("win_modal.spectate")}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -230,10 +235,12 @@ export class WinModal extends LitElement implements Layer {
|
||||
this.eventBus.emit(new SendWinnerEvent(wu.winner, wu.allPlayersStats));
|
||||
if (wu.winner[1] === this.game.myPlayer()?.team()) {
|
||||
this._title = translateText("win_modal.your_team");
|
||||
this.isWin = true;
|
||||
} else {
|
||||
this._title = translateText("win_modal.other_team", {
|
||||
team: wu.winner[1],
|
||||
});
|
||||
this.isWin = false;
|
||||
}
|
||||
this.show();
|
||||
} else {
|
||||
@@ -250,10 +257,12 @@ export class WinModal extends LitElement implements Layer {
|
||||
winnerClient === this.game.myPlayer()?.clientID()
|
||||
) {
|
||||
this._title = translateText("win_modal.you_won");
|
||||
this.isWin = true;
|
||||
} else {
|
||||
this._title = translateText("win_modal.other_won", {
|
||||
player: winner.name(),
|
||||
});
|
||||
this.isWin = false;
|
||||
}
|
||||
this.show();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user