Suppression du système de notifications

- Plus de cloche sur l'accueil ni de panneau de notifications.
- Plus de notifications push : réglage retiré, service worker sans push-sw.js,
  fonction send-push et script VAPID supprimés du dépôt.
- Réglages « Notifications » retirés (et notifPrefs des réglages synchronisés).
- Plus d'envoi des nouveaux épisodes au serveur pour les notifications.
- Au lancement, l'appli résilie l'ancien abonnement push de l'appareil s'il en reste un.
- Textes retirés des 18 langues ; politique de confidentialité mise à jour.
- Serveur : migration 20261122120000_remove_notifications.sql (déjà appliquée en ligne) :
  plus aucune notification créée ni envoyée, données vidées.
- Les demandes d'abonnement et invitations aux listes restent accessibles
  depuis le profil et les listes partagées.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
This commit is contained in:
Claude committed 2026-11-22 17:04:40 +00:00
1 parent 3eb8d4651c
commit dba91678bd
43 files changed
+62 -2298

No files matched your search

+2 -30
View File
@@ -1,6 +1,6 @@
import { useSocial } from '../components/social/SocialProvider'
import { t } from '../i18n'
import { Bell, CalendarDays, Dices, Plus } from 'lucide-react'
import { CalendarDays, Dices, Plus } from 'lucide-react'
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { TYPE_BY_VALUE } from '../lib/constants'
import Avatar from '../components/social/Avatar'
@@ -14,7 +14,6 @@ import { progressView } from '../lib/rewatch'
import type { Tab } from '../components/BottomNav'
import { EmptyState, LinkArrow, PageHeader, SectionTitle, StatTile } from '../components/ui'
import { CACHE_EVENT, isCaughtUp, loadAiring, needsCheck, refreshAiring, saveAiring, trackable } from '../lib/airing'
import { addEpisodeNotifications } from '../lib/cloud/notifications'
import { useOnResume } from '../lib/onResume'
import { calendarEvents } from '../lib/releases'
import { computeStats } from '../lib/stats'
@@ -80,21 +79,6 @@ export default function HomePage({ onOpen, onAdd, onNavigate, onRoulette, onCale
if (info.backdrop && !i.backdrop) patch.backdrop = info.backdrop
return Object.keys(patch).length ? [{ id: i.id, patch }] : []
})
// Notifications : on envoie le dernier épisode sorti de chaque série encore en diffusion ;
// le serveur retient le précédent et ne signale que ce qui est sorti depuis (le passé n'est pas « nouveau »).
if (social.enabled) {
const notices = trackable(items).flatMap((i) => {
const info = next[i.id]
if (!info || info.ended || info.aired < 1 || i.status === 'abandonne') return []
const kind = i.status === 'termine' ? ('new_season' as const) : ('new_episode' as const)
return [{ item_id: i.id, kind, episode: info.aired, count: Math.max(1, info.aired - i.episodesWatched) }]
})
void (async () => {
let created = 0
for (let k = 0; k < notices.length; k += 50) created += await addEpisodeNotifications(notices.slice(k, k + 50))
if (created > 0) void social.refresh()
})()
}
if (patches.length) return patchMany(patches)
})
.catch(() => {})
@@ -102,7 +86,7 @@ export default function HomePage({ onOpen, onAdd, onNavigate, onRoulette, onCale
airingRunning.current = false
setCheckingAiring(false)
})
}, [patchMany, social])
}, [patchMany])
useEffect(() => {
if (loading || airingStarted.current) return
airingStarted.current = true
@@ -171,18 +155,6 @@ export default function HomePage({ onOpen, onAdd, onNavigate, onRoulette, onCale
<span className="absolute -end-1 -top-1 grid min-w-5 place-items-center rounded-full bg-accent-fill px-1 text-[10px] font-bold text-on-accent">{soon}</span>
)}
</button>
{social.enabled && (
<button
onClick={social.openNotifications}
className="relative grid size-11 shrink-0 place-items-center rounded-full border border-line text-ink-2 transition-colors active:bg-surface-2"
aria-label={social.unread > 0 ? t('home.notificationsN', { count: social.unread }) : t('home.notifications')}
>
<Bell size={20} />
{social.unread > 0 && (
<span className="absolute -end-1 -top-1 grid min-w-5 place-items-center rounded-full bg-accent-fill px-1 text-[10px] font-bold text-on-accent">{social.unread}</span>
)}
</button>
)}
{social.enabled && (
<button onClick={() => (social.me ? social.openProfile(social.me.username) : social.openSearch())} className="relative shrink-0 rounded-full" aria-label={t('social.myProfile')}>
<Avatar url={social.me?.avatarUrl} name={social.me?.displayName ?? '?'} size={44} />