From 7065e87c0218a6fe3a23f515fe26ce2e61fb0dbf 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 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 - [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 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 | 11 +++++++---- 4 files changed, 15 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 e3aafaa0b..142b358d0 100644 --- a/src/client/graphics/layers/ControlPanel.ts +++ b/src/client/graphics/layers/ControlPanel.ts @@ -206,7 +206,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 2231c8941..75822ae0b 100644 --- a/src/client/graphics/layers/LeftInGameAd.ts +++ b/src/client/graphics/layers/LeftInGameAd.ts @@ -118,7 +118,7 @@ export class LeftInGameAd extends LitElement implements Layer { return html`
-
- +
+
@@ -354,7 +357,7 @@ - +