mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-09 17:58:05 +00:00
update win modal to link to patreon, create game mode rotation
This commit is contained in:
@@ -149,7 +149,7 @@ export class WinModal extends LitElement implements Layer {
|
||||
return html`
|
||||
<div class="win-modal ${this.isVisible ? "visible" : ""}">
|
||||
<h2>${this._title || ""}</h2>
|
||||
${this.supportHTML()}
|
||||
${this.innerHtml()}
|
||||
<div class="button-container">
|
||||
<button @click=${this._handleExit}>Exit Game</button>
|
||||
<button @click=${this.hide}>Keep Playing</button>
|
||||
@@ -158,34 +158,31 @@ export class WinModal extends LitElement implements Layer {
|
||||
`;
|
||||
}
|
||||
|
||||
updated(changedProperties) {
|
||||
super.updated(changedProperties);
|
||||
// Initialize ads if modal is visible and showing ads
|
||||
if (changedProperties.has("isVisible") && this.isVisible && !this.won) {
|
||||
try {
|
||||
setTimeout(() => {
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
}, 0);
|
||||
} catch (error) {
|
||||
console.error("Error initializing ad:", error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
supportHTML() {
|
||||
innerHtml() {
|
||||
return html`
|
||||
<div style="text-align: center; margin: 15px 0;">
|
||||
<div style="text-align: center; margin: 15px 0; line-height: 1.5;">
|
||||
<p>
|
||||
Like the game? Help make this my full-time project!
|
||||
<a
|
||||
href="https://discord.gg/k22YrnAzGp"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
style="color: #0096ff; text-decoration: underline; display: block; margin-top: 5px;"
|
||||
>
|
||||
Support the game!
|
||||
</a>
|
||||
<span style="color: red;">Time's running out!</span> <br />
|
||||
I need your support to continue working on OpenFront full-time. Please
|
||||
donate now to keep the updates, new features, and improvements coming.
|
||||
</p>
|
||||
<a
|
||||
href="https://patreon.com/OpenFront"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
style="
|
||||
display: inline-block;
|
||||
padding: 10px 20px;
|
||||
background-color: #FF424D;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
border-radius: 5px;
|
||||
font-weight: bold;
|
||||
transition: background-color 0.2s;
|
||||
"
|
||||
>
|
||||
Support on Patreon
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
<div class="l-header__highlightText">v21.0</div>
|
||||
<div class="l-header__highlightText">v21.1</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="bg-image"></div>
|
||||
|
||||
Reference in New Issue
Block a user