Notifications d'abonnement (et rien d'autre)
- Cloche sur l'accueil (avec le nombre non lu) : qui s'abonne, demande à s'abonner, se désabonne, ou accepte ma demande ; accepter/refuser une demande directement depuis la liste - Serveur (migration 20261127120000, déjà appliquée) : déclencheur sur follows, une ligne par personne et par sens, 200 max par compte ; rien entre comptes bloqués ou suspendus ; retirer un abonné, bloquer ou supprimer un compte ne notifie pas - Fonctions get_notifications / unread_notifications / mark_notifications_read (comptes connectés seulement) - Textes dans les 18 langues Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
This commit is contained in:
23 files changed
+444
-3
No files matched your search
+13
-1
@@ -1,6 +1,6 @@
|
||||
import { useSocial } from '../components/social/SocialProvider'
|
||||
import { t } from '../i18n'
|
||||
import { CalendarDays, Dices, Plus } from 'lucide-react'
|
||||
import { Bell, 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'
|
||||
@@ -169,6 +169,18 @@ export default function HomePage({ onOpen, onAdd, onNavigate, onRoulette, onCale
|
||||
subtitle={t('home.subtitle')}
|
||||
action={
|
||||
<span className="flex shrink-0 items-center gap-2">
|
||||
{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 ? t('notif.unread', { count: social.unread }) : t('notif.title')}
|
||||
>
|
||||
<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 > 99 ? '99+' : social.unread}</span>
|
||||
)}
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
onClick={onCalendar}
|
||||
className="relative grid size-11 shrink-0 place-items-center rounded-full border border-line text-ink-2 transition-colors active:bg-surface-2"
|
||||
|
||||
Reference in new issue
Block a user