add mask as read context menu to noti center bell icon

This commit is contained in:
pa
2026-03-08 00:06:35 +09:00
parent 4b74e9df5a
commit 2a861cb9b6
2 changed files with 47 additions and 14 deletions
+16 -1
View File
@@ -478,6 +478,20 @@ export const useNotificationStore = defineStore('Notification', () => {
processSeeQueue();
}
/**
*
*/
function markAllAsSeen() {
const unseenIds = [...unseenNotifications.value];
for (const id of unseenIds) {
const ref = notificationTable.value.data.find((n) => n.id === id);
const version = ref?.version || 1;
queueMarkAsSeen(id, version);
}
unseenNotifications.value = [];
uiStore.removeNotify('notification');
}
/**
*
* @param args
@@ -1459,6 +1473,7 @@ export const useNotificationStore = defineStore('Notification', () => {
getNotificationCategory,
isNotificationExpired,
openNotificationLink,
queueMarkAsSeen
queueMarkAsSeen,
markAllAsSeen
};
});