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:
43 files changed
+62
-2298
No files matched your search
@@ -3,7 +3,6 @@ import { LanguageSelect } from '../i18n/react'
|
||||
import { Check, Download, ExternalLink, Eye, EyeOff, HardDrive, Import, ShieldCheck, Smartphone, Trash2, Upload, UserX } from 'lucide-react'
|
||||
import { useEffect, useRef, useState, type ReactNode } from 'react'
|
||||
import AccountSection from '../components/AccountSection'
|
||||
import PushToggle from '../components/PushToggle'
|
||||
import ConfirmDialog from '../components/ConfirmDialog'
|
||||
import ImportWizard from '../components/ImportWizard'
|
||||
import { PageHeader, SectionTitle } from '../components/ui'
|
||||
@@ -14,7 +13,6 @@ import { ALL_TOP_CATEGORIES, TOP_CATEGORIES } from '../lib/constants'
|
||||
import { isHexColor, THEME_MODES, THEME_PRESETS } from '../lib/theme'
|
||||
import { detectPlatform, useInstallPrompt } from '../lib/pwa'
|
||||
import { isAdmin } from '../lib/cloud/admin'
|
||||
import type { NotifPrefs } from '../types'
|
||||
import { cx } from '../lib/utils'
|
||||
import { useEscape } from '../lib/escape'
|
||||
import { useBackToClose } from '../lib/backNav'
|
||||
@@ -25,15 +23,6 @@ import { alertsSummary, useAdminAlerts } from '../components/moderation/useAdmin
|
||||
|
||||
type Message = { kind: 'ok' | 'error'; text: string }
|
||||
|
||||
const NOTIF_PREFS: { key: keyof NotifPrefs; readonly label: () => string }[] = [
|
||||
{ key: 'episodes', label: () => t('settings.notifEpisodes') },
|
||||
{ key: 'follows', label: () => t('settings.notifFollows') },
|
||||
{ key: 'accepted', label: () => t('settings.notifAccepted') },
|
||||
{ key: 'reactions', label: () => t('settings.notifReactions') },
|
||||
{ key: 'comments', label: () => t('settings.notifComments') },
|
||||
{ key: 'lists', label: () => t('settings.notifLists') },
|
||||
]
|
||||
|
||||
function Row({ icon, title, hint, onClick, danger }: { icon: ReactNode; title: string; hint?: string; onClick: () => void; danger?: boolean }) {
|
||||
return (
|
||||
<button onClick={onClick} className={cx('flex w-full items-center gap-3.5 px-4 py-4 text-start transition-colors active:bg-surface-2', danger && 'text-accent')}>
|
||||
@@ -324,33 +313,6 @@ export default function SettingsPage({ onOpenAdmin }: { onOpenAdmin: () => void
|
||||
</div>
|
||||
)}
|
||||
|
||||
{account && (
|
||||
<>
|
||||
<SectionTitle>{t('settings.notifs')}</SectionTitle>
|
||||
<p className="mb-3 text-xs text-ink-3">{t('settings.notifsHint')}</p>
|
||||
<PushToggle />
|
||||
<div className="card divide-y divide-line overflow-hidden">
|
||||
{NOTIF_PREFS.map(({ key, label }) => {
|
||||
const on = settings.notifPrefs?.[key] !== false
|
||||
return (
|
||||
<button
|
||||
key={key}
|
||||
type="button"
|
||||
role="switch"
|
||||
aria-checked={on}
|
||||
onClick={() => updateSettings({ notifPrefs: { ...settings.notifPrefs, [key]: !on } })}
|
||||
className="flex w-full items-center gap-3.5 px-4 py-3.5 text-start"
|
||||
>
|
||||
<span className="flex-1 text-sm font-medium">{label()}</span>
|
||||
<span className={cx('relative h-6 w-11 shrink-0 rounded-full transition-colors', on ? 'bg-accent-fill' : 'border border-line-strong bg-surface-2')}>
|
||||
<span className={cx('absolute top-0.5 size-5 rounded-full bg-ink transition-all', on ? 'start-[22px] bg-on-accent' : 'start-0.5')} />
|
||||
</span>
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
<SectionTitle>{t('settings.databases')}</SectionTitle>
|
||||
<div className="card space-y-4 p-4">
|
||||
|
||||
Reference in new issue
Block a user