feat(news-button): highlight button when new version is available (#1385)

Introduced a visual indicator for the NewsButton component to notify
users about new content upon version update. This change adds an
`isActive` state to the NewsButton that checks against the version
stored in localStorage. If a new version is detected, the button is
highlighted with specific styling defined in styles.css, including a
pulsing notification effect to draw user attention. The state resets to
inactive upon button click. This enhancement improves user engagement by
ensuring they are aware of new updates.

Fixes #1369 

## Description:

![CleanShot Google Chrome 2025-07-09 at 15 38
19@2x](https://github.com/user-attachments/assets/68928e61-6ec5-472a-9933-0732e88788b5)
![CleanShot Google Chrome 2025-07-09 at 15 38
50](https://github.com/user-attachments/assets/bec96517-e4a3-4dce-a8fa-3d405ce62337)


## 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:
floriankilian
2025-07-09 20:29:29 +02:00
committed by GitHub
parent d8d5220948
commit be8b7a5cb4
2 changed files with 64 additions and 4 deletions
+34
View File
@@ -624,3 +624,37 @@ label.option-card:hover {
color: #fff;
border: 1px solid rgba(255, 255, 255, 0.2);
}
/* News Button Notification */
.news-button .active button {
position: relative;
border-color: #2563eb !important;
border-width: 2px !important;
box-shadow:
0 0 0 1px rgba(37, 99, 235, 0.5),
0 0 8px rgba(37, 99, 235, 0.4);
}
news-button .active button::after {
content: "";
position: absolute;
top: -2px;
right: -2px;
width: 12px;
height: 12px;
background: #f59e0b;
border: 2px solid white;
border-radius: 50%;
animation: newsPulse 1.5s ease-in-out infinite;
}
@keyframes newsPulse {
0%,
100% {
transform: scale(1);
}
50% {
transform: scale(1.4);
}
}