feat(notifications): add dedicated page and localized rendering

This commit is contained in:
2026-04-29 01:31:15 +03:30
parent 05f2b4a4bb
commit b2101a2e22
8 changed files with 416 additions and 169 deletions

View File

@@ -22,6 +22,7 @@ import {
type NotificationLevel,
} from "../api/notifications"
import { useTranslation } from "../hooks/useTranslation"
import { presentNotification } from "../lib/notificationPresenter"
import {
getAccessToken,
SESSION_CHANGED_EVENT,
@@ -153,8 +154,9 @@ export function NotificationsProvider({ children }: { children: ReactNode }) {
toastedNotificationIdsRef.current.add(notification.id)
const notify = getToastMethod(notification.level)
notify(notification.title || (t.notifications?.newTitle || "New notification"), {
description: notification.message || undefined,
const presented = presentNotification(notification, t)
notify(presented.title || (t.notifications?.newTitle || "New notification"), {
description: presented.message || undefined,
action: notification.action_url
? {
label: t.notifications?.openAction || "Open",