mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-02 19:55:18 +02:00
feat(announcements): enhance AnnouncementCard and add spotlight feature
- Added image support to the AnnouncementCard component for improved visual presentation of announcements. - Introduced a spotlight feature in the announcement types to allow critical announcements to be displayed in a blocking dialog until acknowledged. - Updated AnnouncementToastProvider to skip spotlight announcements to prevent duplicate notifications. - Included a new AI automation announcement with an image in the announcements data for demonstration purposes.
This commit is contained in:
parent
0ae30839aa
commit
ec0342faa2
7 changed files with 154 additions and 2 deletions
|
|
@ -70,8 +70,10 @@ export function AnnouncementToastProvider() {
|
|||
const outerTimer = setTimeout(() => {
|
||||
const authed = isAuthenticated();
|
||||
const active = getActiveAnnouncements(announcements, authed);
|
||||
// Spotlight announcements are handled by the blocking spotlight dialog,
|
||||
// so skip them here to avoid double-notifying the user.
|
||||
const importantUntoasted = active.filter(
|
||||
(a) => a.isImportant && !isAnnouncementToasted(a.id)
|
||||
(a) => a.isImportant && !a.spotlight && !isAnnouncementToasted(a.id)
|
||||
);
|
||||
|
||||
for (let i = 0; i < importantUntoasted.length; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue