From 211c2ff49db4c21f5d4a1dd0c27f3c45c6d00945 Mon Sep 17 00:00:00 2001 From: floriankilian <34104015+floriankilian@users.noreply.github.com> Date: Mon, 14 Jul 2025 21:12:12 +0200 Subject: [PATCH] Followup: news-button: blue-glow; simpler localStorage (#1431) ## Description: Changed the localStorage key from "news-button-last-seen-version" to a simpler "version" in the NewsButton component. And reverting a coderabbit recommendation in the css file, that eliminated the blue glow effect. Follow-up to #1385 Screenshot 2025-07-14 205018 ## 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: [UN]nvm --- src/client/components/NewsButton.ts | 6 ++---- src/client/styles.css | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/client/components/NewsButton.ts b/src/client/components/NewsButton.ts index ba7411a34..86fb28a86 100644 --- a/src/client/components/NewsButton.ts +++ b/src/client/components/NewsButton.ts @@ -17,9 +17,7 @@ export class NewsButton extends LitElement { private checkForNewVersion() { try { - const lastSeenVersion = localStorage.getItem( - "news-button-last-seen-version", - ); + const lastSeenVersion = localStorage.getItem("version"); this.isActive = lastSeenVersion !== version; } catch (error) { // Fallback to NOT showing notification if localStorage fails @@ -28,7 +26,7 @@ export class NewsButton extends LitElement { } private handleClick() { - localStorage.setItem("news-button-last-seen-version", version); + localStorage.setItem("version", version); this.isActive = false; const newsModal = document.querySelector("news-modal") as NewsModal; diff --git a/src/client/styles.css b/src/client/styles.css index 8ad456066..99c751a6b 100644 --- a/src/client/styles.css +++ b/src/client/styles.css @@ -631,7 +631,7 @@ label.option-card:hover { } /* News Button Notification */ -.news-button .active button { +news-button .active button { position: relative; border-color: #2563eb !important; border-width: 2px !important;