From d84eeaae9c631bb81fec60c57b6ceb980bc00f3e Mon Sep 17 00:00:00 2001 From: Melroy van den Berg Date: Thu, 7 May 2026 15:43:14 +0200 Subject: [PATCH] Feat: Add clear notification feature --- .../notifications/Notifications.vue | 19 +++++++++-- frontend/src/i18n/lang/en.json | 4 ++- frontend/src/services/notification.ts | 5 +++ pkg/notifications/database.go | 7 ++++ pkg/routes/api/v1/notifications.go | 34 +++++++++++++++++++ pkg/routes/routes.go | 1 + 6 files changed, 67 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/notifications/Notifications.vue b/frontend/src/components/notifications/Notifications.vue index cec662781..704680257 100644 --- a/frontend/src/components/notifications/Notifications.vue +++ b/frontend/src/components/notifications/Notifications.vue @@ -74,11 +74,19 @@ {{ $t('notification.markAllRead') }} + + {{ $t('notification.clearAll') }} +

n.readAt = new Date()) } + +async function clearAll() { + const notificationService = new NotificationService() + await notificationService.clearAll() + success({message: t('notification.clearAllSuccess')}) + allNotifications.value = [] +}