mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-25 06:34:36 +00:00
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:   ## 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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user