Reapply "Display OFM25 ad in WinModal (#1281)"

This reverts commit b05881fad0.
This commit is contained in:
Scott Anderson
2025-08-11 16:15:26 -04:00
parent cf662bc1bc
commit c7fb579025
3 changed files with 35 additions and 2 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

+35 -2
View File
@@ -1,5 +1,6 @@
import { LitElement, css, html } from "lit";
import { customElement, state } from "lit/decorators.js";
import logo from "../../../../resources/images/ofm/logo_MASTER_2025.png";
import { translateText } from "../../../client/Utils";
import { EventBus } from "../../../core/EventBus";
import { GameUpdateType } from "../../../core/game/GameUpdates";
@@ -21,6 +22,9 @@ export class WinModal extends LitElement implements Layer {
@state()
showButtons = false;
@state()
private showSteamContent = Math.random() > 0.5;
private _title: string;
// Override to prevent shadow DOM creation
@@ -138,7 +142,9 @@ export class WinModal extends LitElement implements Layer {
return html`
<div class="win-modal ${this.isVisible ? "visible" : ""}">
<h2>${this._title || ""}</h2>
${this.innerHtml()}
${this.showSteamContent
? this.steamWishlist()
: this.openfrontMasters()}
<div
class="button-container ${this.showButtons ? "visible" : "hidden"}"
>
@@ -153,7 +159,7 @@ export class WinModal extends LitElement implements Layer {
`;
}
innerHtml() {
steamWishlist() {
return html`<p>
<a
href="https://store.steampowered.com/app/3560670"
@@ -174,6 +180,33 @@ export class WinModal extends LitElement implements Layer {
</p>`;
}
openfrontMasters() {
return html`<p>
<img
src="${logo}"
alt="OpenFront Masters"
style="max-width: 100%; height: auto; margin-bottom: 16px;"
/>
<a
href="https://discord.gg/gStsGh5vWR"
target="_blank"
rel="noopener noreferrer"
style="
color: #4a9eff;
text-decoration: underline;
font-weight: 500;
transition: color 0.2s ease;
font-size: 24px;
"
onmouseover="this.style.color='#6db3ff'"
onmouseout="this.style.color='#4a9eff'"
>
Watch the best compete in the
<span style="font-weight: bold;">OpenFront Masters</span>
</a>
</p>`;
}
show() {
this.eventBus.emit(new GutterAdModalEvent(true));
setTimeout(() => {