diff --git a/server/database/db.js b/server/database/db.js index 30b63c67..3db5e4e1 100644 --- a/server/database/db.js +++ b/server/database/db.js @@ -381,7 +381,7 @@ const credentialsDb = { const DEFAULT_NOTIFICATION_PREFERENCES = { channels: { inApp: false, - webPush: true + webPush: false }, events: { actionRequired: true, @@ -396,7 +396,7 @@ const normalizeNotificationPreferences = (value) => { return { channels: { inApp: source.channels?.inApp === true, - webPush: source.channels?.webPush !== false + webPush: source.channels?.webPush === true }, events: { actionRequired: source.events?.actionRequired !== false, diff --git a/src/components/settings/view/tabs/NotificationsSettingsTab.tsx b/src/components/settings/view/tabs/NotificationsSettingsTab.tsx index 4187d524..a9607407 100644 --- a/src/components/settings/view/tabs/NotificationsSettingsTab.tsx +++ b/src/components/settings/view/tabs/NotificationsSettingsTab.tsx @@ -1,4 +1,4 @@ -import { Bell } from 'lucide-react'; +import { Bell, BellOff, BellRing, Loader2 } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import type { NotificationPreferencesState } from '../../types/types'; @@ -43,26 +43,42 @@ export default function NotificationsSettingsTab({ ) : pushDenied ? (

{t('notifications.webPush.denied')}

) : ( -