Vitron-Front/app
Arda Samadi fef53fd003 feat(notifications): web push opt-in + unread nav badges
Surfaces three events without a full notification center:
- service worker (public/sw.js) gains push + notificationclick handlers
  (RTL, focuses an existing tab or opens the target URL).
- usePushNotifications hook: permission + VAPID subscribe/unsubscribe
  against the backend push endpoints.
- opt-in UI both ways: a one-time dismissible post-login banner
  (PushPermissionBanner, rendered in MyLayout) and a permanent toggle
  (PushSettingToggle) on buyer profile settings and seller store settings.
- useBadgeCounts polls /api/notif/v1/badges/; small red badges on the
  bottom-nav profile icon (chat + order updates), the profile sidebar
  (پیام‌ها / سفارش‌ها) and the seller dashboard sidebar. Visiting orders
  clears its badge.

Degrades gracefully: if the backend endpoints are absent the counts fall
back to zero and nothing throws.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 14:02:56 +03:30
..
assets first 2026-04-29 01:44:16 +03:30
components feat(notifications): web push opt-in + unread nav badges 2026-06-17 14:02:56 +03:30
data first 2026-04-29 01:44:16 +03:30
hooks feat(notifications): web push opt-in + unread nav badges 2026-06-17 14:02:56 +03:30
lib first 2026-04-29 01:44:16 +03:30
requestHandler first 2026-04-29 01:44:16 +03:30
routes feat(notifications): web push opt-in + unread nav badges 2026-06-17 14:02:56 +03:30
styles first 2026-04-29 01:44:16 +03:30
types first 2026-04-29 01:44:16 +03:30
utils first 2026-04-29 01:44:16 +03:30
auth.server.ts first 2026-04-29 01:44:16 +03:30
cookie.ts first 2026-04-29 01:44:16 +03:30
entry.client.tsx first 2026-04-29 01:44:16 +03:30
entry.server.tsx first 2026-04-29 01:44:16 +03:30
i18n.ts first 2026-04-29 01:44:16 +03:30
root.tsx first 2026-04-29 01:44:16 +03:30
sessions.server.ts Security fixes: session hardening, open redirect, SSR path injection 2026-06-14 19:02:11 +03:30
tailwind.css first 2026-04-29 01:44:16 +03:30