mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-25 14:04:36 +00:00
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 <img width="808" height="845" alt="Screenshot 2025-07-14 205018" src="https://github.com/user-attachments/assets/8c26c36c-ee2e-4a53-af61-f371eefd102a" /> ## 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
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user