✨ feat: Enhance announcements UX with unread badge, tabbed NoticeModal, and shine animation
• HeaderBar - Added dynamic unread badge; click now opens NoticeModal on “System Announcements” tab - Passes `defaultTab` and `unreadKeys` props to NoticeModal for contextual behaviour • NoticeModal - Introduced Tabs inside the modal title with Lucide icons (Bell, Megaphone) - Displays in-app notice (markdown) and system announcements separately - Highlights unread announcements with “shine” text animation - Accepts new props `defaultTab`, `unreadKeys` to control initial tab and highlight logic • CSS (index.css) - Implemented `sweep-shine` keyframes and `.shine-text` utility for left-to-right glow - Added dark-mode variant for better contrast - Ensured cross-browser support with standard `background-clip` Overall, users now see an unread counter, are directed to new announcements automatically, and benefit from an eye-catching glow effect that works in both light and dark themes.
This commit is contained in:
@@ -500,4 +500,32 @@ code {
|
||||
|
||||
.components-transfer-selected-item .semi-icon-close:hover {
|
||||
color: var(--semi-color-text-0);
|
||||
}
|
||||
|
||||
/* ==================== 未读通知闪光效果 ==================== */
|
||||
@keyframes sweep-shine {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
|
||||
.shine-text {
|
||||
background: linear-gradient(90deg, currentColor 0%, currentColor 40%, rgba(255, 255, 255, 0.9) 50%, currentColor 60%, currentColor 100%);
|
||||
background-size: 200% 100%;
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
animation: sweep-shine 4s linear infinite;
|
||||
}
|
||||
|
||||
.dark .shine-text {
|
||||
background: linear-gradient(90deg, currentColor 0%, currentColor 40%, #facc15 50%, currentColor 60%, currentColor 100%);
|
||||
background-size: 200% 100%;
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
Reference in New Issue
Block a user