From c052ab04e0f0043579346d66c3542794af5b5e72 Mon Sep 17 00:00:00 2001 From: evanpelle Date: Tue, 17 Jun 2025 19:18:30 -0700 Subject: [PATCH] Fix gutter ads, move in-game add to bottom right corner. (#1214) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description: Move the in-game add to underneath the control panel, ensure both are 320px. Remove black squares on home page when user has ad blocker ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: openfront Screenshot 2025-06-17 at 7 13 51 PM --- src/client/GutterAdModal.ts | 22 ++++++---------------- src/client/graphics/layers/ControlPanel.ts | 2 +- src/client/graphics/layers/LeftInGameAd.ts | 2 +- src/client/index.html | 10 ++++++---- 4 files changed, 14 insertions(+), 22 deletions(-) diff --git a/src/client/GutterAdModal.ts b/src/client/GutterAdModal.ts index bbeedaf5f..2fcaf0c9b 100644 --- a/src/client/GutterAdModal.ts +++ b/src/client/GutterAdModal.ts @@ -57,6 +57,7 @@ export class GutterAdModal extends LitElement { if (!window.ramp) { console.warn("Playwire RAMP not available"); + this.hide(); return; } @@ -82,6 +83,7 @@ export class GutterAdModal extends LitElement { }); } catch (error) { console.error("Failed to load Playwire ads:", error); + this.hide(); } } @@ -109,36 +111,24 @@ export class GutterAdModal extends LitElement { return html` `; } diff --git a/src/client/graphics/layers/ControlPanel.ts b/src/client/graphics/layers/ControlPanel.ts index 512df847c..cff9ac873 100644 --- a/src/client/graphics/layers/ControlPanel.ts +++ b/src/client/graphics/layers/ControlPanel.ts @@ -204,7 +204,7 @@ export class ControlPanel extends LitElement implements Layer {
e.preventDefault()} > diff --git a/src/client/graphics/layers/LeftInGameAd.ts b/src/client/graphics/layers/LeftInGameAd.ts index 07db7657a..2e370d8cc 100644 --- a/src/client/graphics/layers/LeftInGameAd.ts +++ b/src/client/graphics/layers/LeftInGameAd.ts @@ -117,7 +117,7 @@ export class LeftInGameAd extends LitElement implements Layer { return html`
-
- +
+
@@ -364,7 +367,6 @@ -