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
+5
-2
@@ -15,12 +15,12 @@ import StatsPage from './pages/StatsPage'
|
||||
import SettingsPage from './pages/SettingsPage'
|
||||
import AdminPage from './pages/AdminPage'
|
||||
import NotFoundPage from './pages/NotFoundPage'
|
||||
import PushBridge from './components/PushBridge'
|
||||
import SyncIndicator from './components/SyncIndicator'
|
||||
import { useMedia } from './store'
|
||||
import type { SearchResult } from './lib/catalogApi'
|
||||
import type { MediaItem } from './types'
|
||||
import type { Completion } from './lib/seasons'
|
||||
import { dropPushSubscription } from './lib/push'
|
||||
|
||||
const TABS: Tab[] = ['home', 'catalog', 'stats', 'settings']
|
||||
// L'administration a sa propre route (#/admin), hors de la navigation principale
|
||||
@@ -57,6 +57,10 @@ export default function App() {
|
||||
const [roulette, setRoulette] = useState(false)
|
||||
const [calendar, setCalendar] = useState(false)
|
||||
|
||||
// Notifications retirées : on résilie l'ancien abonnement push de cet appareil, s'il en reste un
|
||||
useEffect(() => {
|
||||
void dropPushSubscription()
|
||||
}, [])
|
||||
useEffect(() => {
|
||||
const onHash = () => setRoute(routeFromHash())
|
||||
window.addEventListener('hashchange', onHash)
|
||||
@@ -100,7 +104,6 @@ export default function App() {
|
||||
|
||||
<BottomNav current={navTab} onChange={go} onAdd={openNew} />
|
||||
<SyncIndicator />
|
||||
<PushBridge />
|
||||
|
||||
{roulette && <Roulette onClose={() => setRoulette(false)} onOpen={openItem} />}
|
||||
{calendar && <CalendarView onClose={() => setCalendar(false)} onOpen={openItem} />}
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { keepPushFresh } from '../lib/push'
|
||||
import { useMedia } from '../store'
|
||||
import { useSocial } from './social/SocialProvider'
|
||||
|
||||
/** Écrans qu'une notification push peut ouvrir (« /?open=… », voir public/push-sw.js). */
|
||||
const OPEN_RE = /^(notifications|item:[A-Za-z0-9_-]{1,64}|u:[a-z0-9_]{3,20})$/
|
||||
|
||||
/** Lit (et retire de l'adresse) l'écran demandé par une notification au lancement de l'app. */
|
||||
function takeOpenParam(): string | null {
|
||||
try {
|
||||
const params = new URLSearchParams(location.search)
|
||||
const open = params.get('open')
|
||||
if (open === null) return null
|
||||
params.delete('open')
|
||||
const q = params.toString()
|
||||
history.replaceState(history.state, '', `${location.pathname}${q ? `?${q}` : ''}${location.hash}`)
|
||||
return OPEN_RE.test(open) ? open : null
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lien entre les notifications push et l'app : ouvre le bon écran au clic sur une notification
|
||||
* (app lancée, ou déjà ouverte : message du service worker), met à jour la cloche quand
|
||||
* une notification arrive, et garde l'abonnement de l'appareil à jour côté serveur.
|
||||
*/
|
||||
export default function PushBridge() {
|
||||
const { account, items, loading } = useMedia()
|
||||
const social = useSocial()
|
||||
const [target, setTarget] = useState<string | null>(takeOpenParam)
|
||||
const socialRef = useRef(social)
|
||||
socialRef.current = social
|
||||
|
||||
// Messages du service worker
|
||||
useEffect(() => {
|
||||
if (!('serviceWorker' in navigator)) return
|
||||
const onMessage = (e: MessageEvent) => {
|
||||
const data = e.data as { type?: unknown; open?: unknown } | null
|
||||
if (!data || typeof data !== 'object') return
|
||||
if (data.type === 'azuu:open' && typeof data.open === 'string' && OPEN_RE.test(data.open)) setTarget(data.open)
|
||||
else if (data.type === 'azuu:push') void socialRef.current.refresh()
|
||||
}
|
||||
navigator.serviceWorker.addEventListener('message', onMessage)
|
||||
return () => navigator.serviceWorker.removeEventListener('message', onMessage)
|
||||
}, [])
|
||||
|
||||
// Ouvre l'écran demandé une fois le compte et la bibliothèque chargés
|
||||
useEffect(() => {
|
||||
if (!target) return
|
||||
if (!account) {
|
||||
// Pas (ou plus) connecté : rien à ouvrir
|
||||
if (!loading) setTarget(null)
|
||||
return
|
||||
}
|
||||
if (!social.enabled || loading) return
|
||||
setTarget(null)
|
||||
if (target === 'notifications') social.openNotifications()
|
||||
else if (target.startsWith('u:')) social.openProfile(target.slice(2))
|
||||
else {
|
||||
const item = items.find((i) => i.id === target.slice(5))
|
||||
if (item) social.openItem(item)
|
||||
else social.openNotifications()
|
||||
}
|
||||
}, [target, account, social, loading, items])
|
||||
|
||||
// Abonnement push renouvelé par le navigateur, langue changée… : on le signale au serveur
|
||||
const accountOn = !!account
|
||||
useEffect(() => {
|
||||
if (accountOn) void keepPushFresh()
|
||||
}, [accountOn])
|
||||
|
||||
return null
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
import { BellRing, Loader2 } from 'lucide-react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { t } from '../i18n'
|
||||
import { enablePush, disablePush, getPushState, PushError, type PushState } from '../lib/push'
|
||||
import { cx } from '../lib/utils'
|
||||
|
||||
/** Réglages → Notifications : « Notifications sur cet appareil » (Web Push, même app fermée). */
|
||||
export default function PushToggle() {
|
||||
const [state, setState] = useState<PushState | null>(null)
|
||||
const [busy, setBusy] = useState(false)
|
||||
const [error, setError] = useState<string | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
let alive = true
|
||||
void getPushState().then((s) => alive && setState(s))
|
||||
return () => {
|
||||
alive = false
|
||||
}
|
||||
}, [])
|
||||
|
||||
if (state === null) return null
|
||||
const on = state === 'on'
|
||||
const available = state === 'on' || state === 'off'
|
||||
|
||||
const toggle = async () => {
|
||||
if (busy || !available) return
|
||||
setBusy(true)
|
||||
setError(null)
|
||||
try {
|
||||
if (on) {
|
||||
await disablePush()
|
||||
setState('off')
|
||||
} else {
|
||||
// La permission n'est demandée qu'ici, au clic
|
||||
setState(await enablePush())
|
||||
}
|
||||
} catch (e) {
|
||||
const code = e instanceof PushError ? e.code : 'failed'
|
||||
if (code === 'denied') setState('denied')
|
||||
else setError(code === 'not-ready' ? t('push.notReady') : t('push.error'))
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
const hint =
|
||||
state === 'needs-install'
|
||||
? t('push.iosInstall')
|
||||
: state === 'unsupported'
|
||||
? t('push.unsupported')
|
||||
: state === 'denied'
|
||||
? t('push.denied')
|
||||
: t('push.deviceHint')
|
||||
|
||||
return (
|
||||
<div className="card mb-3 overflow-hidden">
|
||||
<button
|
||||
type="button"
|
||||
role="switch"
|
||||
aria-checked={on}
|
||||
aria-disabled={!available || busy}
|
||||
onClick={() => void toggle()}
|
||||
className={cx('flex w-full items-center gap-3.5 px-4 py-3.5 text-start', !available && 'cursor-default')}
|
||||
>
|
||||
<span className={cx('grid size-10 shrink-0 place-items-center rounded-full bg-surface-2', on ? 'text-accent' : 'text-ink-2')}>
|
||||
{busy ? <Loader2 size={18} className="animate-spin" /> : <BellRing size={18} />}
|
||||
</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block text-sm font-medium">{t('push.device')}</span>
|
||||
<span className={cx('mt-0.5 block text-xs', state === 'denied' ? 'text-accent' : 'text-ink-3')}>{hint}</span>
|
||||
</span>
|
||||
{available && (
|
||||
<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>
|
||||
{error && (
|
||||
<p role="alert" className="border-t border-line px-4 py-2.5 text-xs text-accent">
|
||||
{error}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1,289 +0,0 @@
|
||||
import { Check, Loader2, MessageCircle, Tv, Users } from 'lucide-react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { listNotifications, markNotificationsRead, type AppNotification, type NotificationKind } from '../../lib/cloud/notifications'
|
||||
import { cx, formatDate } from '../../lib/utils'
|
||||
import { EmptyState } from '../ui'
|
||||
import Avatar from './Avatar'
|
||||
import { respondToInvite } from '../../lib/cloud/sharedLists'
|
||||
import { useSocial } from './SocialProvider'
|
||||
import Sheet from './Sheet'
|
||||
|
||||
const PAGE = 30
|
||||
const FOLLOW_KINDS: NotificationKind[] = ['follow_request', 'follow_accepted', 'new_follower']
|
||||
const EPISODE_KINDS: NotificationKind[] = ['new_episode', 'new_season']
|
||||
|
||||
const VERB: Record<NotificationKind, () => string> = {
|
||||
follow_request: () => t('notif.follow_request'),
|
||||
follow_accepted: () => t('notif.follow_accepted'),
|
||||
new_follower: () => t('notif.new_follower'),
|
||||
reaction: () => t('notif.reaction'),
|
||||
new_episode: () => '',
|
||||
new_season: () => '',
|
||||
review_comment: () => t('notif.review_comment'),
|
||||
shared_list_invite: () => t('notif.shared_list_invite'),
|
||||
}
|
||||
|
||||
/** Liste des notifications (abonnements, réactions, nouveaux épisodes). Marque comme lues à l'ouverture. */
|
||||
export default function Notifications({
|
||||
onClose,
|
||||
onOpenProfile,
|
||||
onOpenItem,
|
||||
onOpenComments,
|
||||
onOpenSharedList,
|
||||
}: {
|
||||
onClose: () => void
|
||||
onOpenProfile: (username: string) => void
|
||||
onOpenItem: (itemId: string) => void
|
||||
onOpenComments?: (itemId: string, title: string) => void
|
||||
onOpenSharedList?: (listId: string) => void
|
||||
}) {
|
||||
const [items, setItems] = useState<AppNotification[] | undefined>(undefined)
|
||||
const [done, setDone] = useState(false)
|
||||
const [loadingMore, setLoadingMore] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
let alive = true
|
||||
void (async () => {
|
||||
try {
|
||||
const page = await listNotifications(0)
|
||||
if (!alive) return
|
||||
setItems(page)
|
||||
setDone(page.length < PAGE)
|
||||
} catch {
|
||||
if (alive) {
|
||||
setItems([])
|
||||
setDone(true)
|
||||
}
|
||||
}
|
||||
markNotificationsRead().catch(() => {})
|
||||
})()
|
||||
return () => {
|
||||
alive = false
|
||||
}
|
||||
}, [])
|
||||
|
||||
const loadMore = async () => {
|
||||
if (!items || loadingMore) return
|
||||
setLoadingMore(true)
|
||||
try {
|
||||
const page = await listNotifications(items.length)
|
||||
setItems((prev) => [...(prev ?? []), ...page])
|
||||
setDone(page.length < PAGE)
|
||||
} catch {
|
||||
setDone(true)
|
||||
} finally {
|
||||
setLoadingMore(false)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Sheet title={t('notif.title')} label={t('notif.title')} onClose={onClose} elevated>
|
||||
{items === undefined ? (
|
||||
<p className="flex items-center justify-center py-16 text-ink-3">
|
||||
<Loader2 size={20} className="animate-spin" />
|
||||
</p>
|
||||
) : items.length === 0 ? (
|
||||
<div className="px-4">
|
||||
<EmptyState title={t('notif.empty')} />
|
||||
</div>
|
||||
) : (
|
||||
<ul>
|
||||
{items.map((n) => (
|
||||
<Row key={n.id} n={n} onOpenProfile={onOpenProfile} onOpenItem={onOpenItem} onOpenComments={onOpenComments} onOpenSharedList={onOpenSharedList} />
|
||||
))}
|
||||
{!done && (
|
||||
<li className="p-4">
|
||||
<button onClick={loadMore} disabled={loadingMore} className="btn btn-ghost w-full">
|
||||
{loadingMore ? <Loader2 size={15} className="animate-spin" /> : t('social.loadMore')}
|
||||
</button>
|
||||
</li>
|
||||
)}
|
||||
</ul>
|
||||
)}
|
||||
</Sheet>
|
||||
)
|
||||
}
|
||||
|
||||
function Row({
|
||||
n,
|
||||
onOpenProfile,
|
||||
onOpenItem,
|
||||
onOpenComments,
|
||||
onOpenSharedList,
|
||||
}: {
|
||||
n: AppNotification
|
||||
onOpenProfile: (username: string) => void
|
||||
onOpenItem: (itemId: string) => void
|
||||
onOpenComments?: (itemId: string, title: string) => void
|
||||
onOpenSharedList?: (listId: string) => void
|
||||
}) {
|
||||
const unread = n.read_at === null
|
||||
const isEpisode = EPISODE_KINDS.includes(n.kind)
|
||||
const base = cx('flex items-center gap-3 border-b border-line px-4 py-3 text-start', unread && 'bg-surface-2')
|
||||
|
||||
// ── Nouvel épisode / nouvelle saison ──
|
||||
if (isEpisode) {
|
||||
const title = n.title ?? '—'
|
||||
const inner = (
|
||||
<>
|
||||
{unread && <span className="size-2 shrink-0 rounded-full bg-accent-fill" aria-hidden="true" />}
|
||||
<span className="grid size-[38px] shrink-0 place-items-center rounded-full bg-surface-2 text-accent">
|
||||
<Tv size={18} />
|
||||
</span>
|
||||
<span className="min-w-0 flex-1 text-sm leading-snug text-ink-2">
|
||||
<b className="text-ink">{t(n.kind === 'new_season' ? 'notif.new_season' : 'notif.new_episode', { title })}</b>
|
||||
{n.episode != null && <span className="text-ink-3"> · {t('episodes.short', { n: n.episode })}</span>}
|
||||
</span>
|
||||
<span className="shrink-0 text-xs text-ink-3">{formatDate(n.created_at)}</span>
|
||||
</>
|
||||
)
|
||||
return (
|
||||
<li>
|
||||
{n.item_id ? (
|
||||
<button onClick={() => onOpenItem(n.item_id!)} className={cx(base, 'w-full')}>
|
||||
{inner}
|
||||
</button>
|
||||
) : (
|
||||
<div className={base}>{inner}</div>
|
||||
)}
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
||||
// ── Commentaire sur mon avis / invitation à une liste partagée ──
|
||||
if (n.kind === 'review_comment' || n.kind === 'shared_list_invite') {
|
||||
return <SocialRow n={n} base={base} unread={unread} onOpenProfile={onOpenProfile} onOpenComments={onOpenComments} onOpenSharedList={onOpenSharedList} />
|
||||
}
|
||||
|
||||
// ── Abonnements / réactions ──
|
||||
const actor = n.actor
|
||||
const actorName = actor?.display_name ?? t('notif.someone')
|
||||
const username = actor?.username
|
||||
const target = username != null && FOLLOW_KINDS.includes(n.kind) ? username : null
|
||||
|
||||
const inner = (
|
||||
<>
|
||||
{unread && <span className="size-2 shrink-0 rounded-full bg-accent-fill" aria-hidden="true" />}
|
||||
<Avatar url={actor?.avatar_url ?? undefined} name={actorName} size={38} />
|
||||
<span className="min-w-0 flex-1 text-sm leading-snug text-ink-2">
|
||||
<b className="text-ink">{actorName}</b> {VERB[n.kind]()}
|
||||
{n.kind === 'reaction' && (
|
||||
<>
|
||||
{n.emoji ? ` ${n.emoji}` : ''}
|
||||
{n.title ? ` ${t('notif.on', { title: n.title })}` : ''}
|
||||
</>
|
||||
)}
|
||||
</span>
|
||||
<span className="shrink-0 text-xs text-ink-3">{formatDate(n.created_at)}</span>
|
||||
</>
|
||||
)
|
||||
|
||||
return (
|
||||
<li>
|
||||
{target != null ? (
|
||||
<button onClick={() => onOpenProfile(target)} className={cx(base, 'w-full')}>
|
||||
{inner}
|
||||
</button>
|
||||
) : (
|
||||
<div className={base}>{inner}</div>
|
||||
)}
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
||||
function SocialRow({
|
||||
n,
|
||||
base,
|
||||
unread,
|
||||
onOpenProfile,
|
||||
onOpenComments,
|
||||
onOpenSharedList,
|
||||
}: {
|
||||
n: AppNotification
|
||||
base: string
|
||||
unread: boolean
|
||||
onOpenProfile: (username: string) => void
|
||||
onOpenComments?: (itemId: string, title: string) => void
|
||||
onOpenSharedList?: (listId: string) => void
|
||||
}) {
|
||||
const social = useSocial()
|
||||
const [status, setStatus] = useState(n.invite_status)
|
||||
const [busy, setBusy] = useState(false)
|
||||
const actor = n.actor
|
||||
const actorName = actor?.display_name ?? t('notif.someone')
|
||||
const isInvite = n.kind === 'shared_list_invite'
|
||||
|
||||
const respond = async (accept: boolean) => {
|
||||
if (!n.item_id) return
|
||||
setBusy(true)
|
||||
try {
|
||||
await respondToInvite(n.item_id, accept)
|
||||
setStatus(accept ? 'accepted' : null)
|
||||
social.bumpShared()
|
||||
if (accept) onOpenSharedList?.(n.item_id)
|
||||
} catch {
|
||||
/* invitation expirée ou réseau : rien ne change */
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
// Où mène un tap sur la ligne
|
||||
const open =
|
||||
!isInvite && n.item_id && onOpenComments
|
||||
? () => onOpenComments(n.item_id!, n.title ?? '')
|
||||
: isInvite && status === 'accepted' && n.item_id && onOpenSharedList
|
||||
? () => onOpenSharedList(n.item_id!)
|
||||
: null
|
||||
|
||||
const text = (
|
||||
<span className="min-w-0 flex-1 text-sm leading-snug text-ink-2">
|
||||
<b className="text-ink">{actorName}</b> {VERB[n.kind]()}
|
||||
{isInvite ? (
|
||||
n.title ? (
|
||||
<>
|
||||
{' '}
|
||||
<b className="text-ink">{n.title}</b>
|
||||
</>
|
||||
) : (
|
||||
` (${t('shared.expired')})`
|
||||
)
|
||||
) : n.title ? (
|
||||
` ${t('notif.on', { title: n.title })}`
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</span>
|
||||
)
|
||||
|
||||
return (
|
||||
<li>
|
||||
<div className={cx(base, 'flex-wrap')}>
|
||||
{unread && <span className="size-2 shrink-0 rounded-full bg-accent-fill" aria-hidden="true" />}
|
||||
<button type="button" onClick={() => actor && onOpenProfile(actor.username)} className="shrink-0" aria-label={actorName} disabled={!actor}>
|
||||
<Avatar url={actor?.avatar_url ?? undefined} name={actorName} size={38} />
|
||||
</button>
|
||||
{open ? (
|
||||
<button type="button" onClick={open} className="flex min-w-0 flex-1 items-center gap-2 text-start">
|
||||
{isInvite ? <Users size={14} className="shrink-0 text-accent" aria-hidden="true" /> : <MessageCircle size={14} className="shrink-0 text-accent" aria-hidden="true" />}
|
||||
{text}
|
||||
</button>
|
||||
) : (
|
||||
text
|
||||
)}
|
||||
<span className="shrink-0 text-xs text-ink-3">{formatDate(n.created_at)}</span>
|
||||
{isInvite && status === 'pending' && n.title && (
|
||||
<div className="flex w-full justify-end gap-2 ps-[3.25rem]">
|
||||
<button type="button" onClick={() => void respond(false)} disabled={busy} className="btn btn-ghost px-3.5 py-1.5 text-sm">
|
||||
{t('shared.decline')}
|
||||
</button>
|
||||
<button type="button" onClick={() => void respond(true)} disabled={busy} className="btn btn-primary px-3.5 py-1.5 text-sm">
|
||||
{busy ? <Loader2 size={14} className="animate-spin" /> : <Check size={14} />} {t('shared.accept')}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import { createContext, useCallback, useContext, useEffect, useMemo, useState, type ReactNode } from 'react'
|
||||
import { getFollowRequests, getMyProfile, type Profile, type ProfileCard } from '../../lib/cloud/social'
|
||||
import { unreadCount } from '../../lib/cloud/notifications'
|
||||
import { useMedia } from '../../store'
|
||||
import type { MediaItem } from '../../types'
|
||||
import EditProfile from './EditProfile'
|
||||
@@ -9,7 +8,6 @@ import ItemPeek, { type PeekOwner } from './ItemPeek'
|
||||
import PeopleSearch from './PeopleSearch'
|
||||
import ProfileView from './ProfileView'
|
||||
import TitleReviews from './TitleReviews'
|
||||
import Notifications from './Notifications'
|
||||
import { useOnResume } from '../../lib/onResume'
|
||||
import WelcomeProfile, { RANDOM_USERNAME } from './WelcomeProfile'
|
||||
import CommentsSheet from './CommentsSheet'
|
||||
@@ -30,10 +28,6 @@ interface SocialApi {
|
||||
openFollowList: (profile: Profile, kind: 'followers' | 'following') => void
|
||||
/** Tous les avis sur un titre (amis / autres) */
|
||||
openReviews: (externalId: string, title: string) => void
|
||||
/** Panneau des notifications */
|
||||
openNotifications: () => void
|
||||
/** Notifications non lues */
|
||||
unread: number
|
||||
peek: (item: MediaItem, owner?: PeekOwner) => void
|
||||
/** Ouvre la fiche si elle est à moi, sinon l'aperçu */
|
||||
openItem: (item: MediaItem, owner?: PeekOwner) => void
|
||||
@@ -60,8 +54,6 @@ const SocialContext = createContext<SocialApi>({
|
||||
openEdit: () => {},
|
||||
openFollowList: () => {},
|
||||
openReviews: () => {},
|
||||
openNotifications: () => {},
|
||||
unread: 0,
|
||||
peek: () => {},
|
||||
openItem: () => {},
|
||||
openComments: () => {},
|
||||
@@ -80,7 +72,6 @@ type Overlay =
|
||||
| { kind: 'edit' }
|
||||
| { kind: 'follows'; profile: Profile; list: 'followers' | 'following' }
|
||||
| { kind: 'reviews'; externalId: string; title: string }
|
||||
| { kind: 'notifications' }
|
||||
| { kind: 'comments'; authorId: string; itemId: string; title: string }
|
||||
| { kind: 'sharedList'; id: string }
|
||||
| { kind: 'invite'; listId: string; listName: string }
|
||||
@@ -100,7 +91,6 @@ export function SocialProvider({
|
||||
const enabled = !!account
|
||||
const [me, setMe] = useState<Profile | null>(null)
|
||||
const [requests, setRequests] = useState<ProfileCard[]>([])
|
||||
const [unread, setUnread] = useState(0)
|
||||
const [stack, setStack] = useState<Overlay[]>([])
|
||||
const [peeked, setPeeked] = useState<{ item: MediaItem; owner?: PeekOwner }>()
|
||||
const [sharedTick, setSharedTick] = useState(0)
|
||||
@@ -125,10 +115,9 @@ export function SocialProvider({
|
||||
const refresh = useCallback(async () => {
|
||||
if (!enabled || !navigator.onLine) return
|
||||
try {
|
||||
const [p, r, u] = await Promise.all([getMyProfile(), getFollowRequests(), unreadCount()])
|
||||
const [p, r] = await Promise.all([getMyProfile(), getFollowRequests()])
|
||||
setMe(p)
|
||||
setRequests(r)
|
||||
setUnread(u)
|
||||
} catch {
|
||||
/* hors-ligne / serveur pas encore à jour : le reste de l'app fonctionne */
|
||||
}
|
||||
@@ -202,12 +191,6 @@ export function SocialProvider({
|
||||
openEdit: () => push({ kind: 'edit' }),
|
||||
openFollowList: (profile, list) => push({ kind: 'follows', profile, list }),
|
||||
openReviews: (externalId, title) => push({ kind: 'reviews', externalId, title }),
|
||||
openNotifications: () => {
|
||||
// La liste se marque lue elle-même, après chargement (sinon les « non lu » n'étaient jamais visibles)
|
||||
setUnread(0)
|
||||
push({ kind: 'notifications' })
|
||||
},
|
||||
unread,
|
||||
peek: (item, owner) => setPeeked({ item, owner }),
|
||||
openItem,
|
||||
openComments: (authorId, itemId, title) => push({ kind: 'comments', authorId, itemId, title }),
|
||||
@@ -217,7 +200,7 @@ export function SocialProvider({
|
||||
sharedTick,
|
||||
bumpShared,
|
||||
}),
|
||||
[enabled, me, requests, unread, refresh, push, openItem, openTitle, sharedTick, bumpShared],
|
||||
[enabled, me, requests, refresh, push, openItem, openTitle, sharedTick, bumpShared],
|
||||
)
|
||||
|
||||
return (
|
||||
@@ -239,30 +222,8 @@ export function SocialProvider({
|
||||
<CommentsSheet key={k} authorId={o.authorId} itemId={o.itemId} title={o.title} onClose={pop} />
|
||||
) : o.kind === 'sharedList' ? (
|
||||
<SharedListSheet key={k} id={o.id} onClose={pop} />
|
||||
) : o.kind === 'invite' ? (
|
||||
<InvitePeople key={k} listId={o.listId} listName={o.listName} onClose={pop} />
|
||||
) : (
|
||||
<Notifications
|
||||
key={k}
|
||||
onClose={pop}
|
||||
onOpenProfile={(u) => push({ kind: 'profile', username: u })}
|
||||
onOpenItem={(id) => {
|
||||
const it = items.find((i) => i.id === id)
|
||||
if (it) {
|
||||
pop()
|
||||
onOpenOwnItem(it)
|
||||
}
|
||||
}}
|
||||
onOpenComments={(itemId, title) => {
|
||||
if (!me) return
|
||||
pop()
|
||||
push({ kind: 'comments', authorId: me.id, itemId, title })
|
||||
}}
|
||||
onOpenSharedList={(id) => {
|
||||
pop()
|
||||
push({ kind: 'sharedList', id })
|
||||
}}
|
||||
/>
|
||||
<InvitePeople key={k} listId={o.listId} listName={o.listName} onClose={pop} />
|
||||
),
|
||||
)}
|
||||
{children}
|
||||
|
||||
@@ -245,14 +245,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'تثبيت التطبيق',
|
||||
'settings.installHint': 'أضِف Kino إلى شاشتك الرئيسية أو سطح المكتب.',
|
||||
'settings.installed': 'تم تثبيت التطبيق',
|
||||
'settings.notifs': 'الإشعارات',
|
||||
'settings.notifsHint': 'اختر ما يُفعّل الجرس.',
|
||||
'settings.notifEpisodes': 'حلقات جديدة',
|
||||
'settings.notifFollows': 'متابعون جدد',
|
||||
'settings.notifAccepted': 'طلبات مقبولة',
|
||||
'settings.notifReactions': 'تفاعلات على تقييماتي',
|
||||
'notif.new_episode': 'حلقة جديدة من {title}',
|
||||
'notif.new_season': 'موسم جديد من {title}',
|
||||
'reviews.title': 'التقييمات',
|
||||
'reviews.friends': 'أصدقاؤك',
|
||||
'reviews.others': 'أعضاء آخرون',
|
||||
@@ -261,16 +253,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'لا توجد تقييمات بعد',
|
||||
'reviews.seeAll': 'عرض كل التقييمات',
|
||||
'reviews.react': 'تفاعل',
|
||||
'notif.title': 'الإشعارات',
|
||||
'notif.empty': 'لا إشعارات',
|
||||
'notif.someone': 'شخص ما',
|
||||
'notif.follow_request': 'يريد متابعتك',
|
||||
'notif.follow_accepted': 'قبل طلبك',
|
||||
'notif.new_follower': 'بدأ بمتابعتك',
|
||||
'notif.reaction': 'تفاعل مع تقييمك',
|
||||
'notif.on': 'على {title}',
|
||||
'home.notifications': 'الإشعارات',
|
||||
'home.notificationsN': '{count} إشعارات',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1290,13 +1273,6 @@ const dict: Translations = {
|
||||
'challenges.more_many': "+ {count} تحديًا آخر",
|
||||
'challenges.more_other': "+ {count} تحدٍّ آخر",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "الإشعارات على هذا الجهاز",
|
||||
'push.deviceHint': "حتى عندما يكون التطبيق مغلقًا. تنطبق الخيارات أدناه أيضًا.",
|
||||
'push.iosInstall': "على iPhone وiPad، أضف Kino أولًا إلى الشاشة الرئيسية (iOS 16.4 أو أحدث)، ثم افتح التطبيق من أيقونته لتفعيل الإشعارات.",
|
||||
'push.unsupported': "هذا المتصفح لا يدعم الإشعارات الفورية.",
|
||||
'push.denied': "الإشعارات محظورة لهذا الموقع. اسمح بها من إعدادات المتصفح ثم حاول مجددًا.",
|
||||
'push.notReady': "الإشعارات الفورية غير متاحة على الخادم بعد.",
|
||||
'push.error': "تعذّر تفعيل الإشعارات. تحقق من اتصالك وحاول مجددًا.",
|
||||
'netPill.offlineSync': "غير متصل — ستتم مزامنة تعديلاتك",
|
||||
'netPill.offlineLocal': "غير متصل — كل شيء محفوظ على هذا الجهاز",
|
||||
'netPill.synced': "تمت المزامنة",
|
||||
@@ -1436,10 +1412,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "تعلّق بسرعة كبيرة، حاول مجددًا بعد دقيقة.",
|
||||
'comments.err.gone': "لم يعد هذا التقييم متاحًا.",
|
||||
'comments.err.invalid': "التعليق فارغ أو طويل جدًا (500 حرف كحد أقصى).",
|
||||
'notif.review_comment': "علّق على تقييمك",
|
||||
'notif.shared_list_invite': "دعاك إلى القائمة المشتركة",
|
||||
'settings.notifComments': "التعليقات على تقييماتي",
|
||||
'settings.notifLists': "دعوات القوائم المشتركة",
|
||||
'shared.title': "القوائم المشتركة",
|
||||
'shared.hint': "قوائم جماعية: يمكن لكل عضو إضافة العناوين أو إزالتها.",
|
||||
'shared.new': "قائمة مشتركة جديدة",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'App installieren',
|
||||
'settings.installHint': 'Füge Kino zum Startbildschirm oder Desktop hinzu.',
|
||||
'settings.installed': 'App installiert',
|
||||
'settings.notifs': 'Mitteilungen',
|
||||
'settings.notifsHint': 'Lege fest, was die Glocke auslöst.',
|
||||
'settings.notifEpisodes': 'Neue Folgen',
|
||||
'settings.notifFollows': 'Neue Follower',
|
||||
'settings.notifAccepted': 'Angenommene Anfragen',
|
||||
'settings.notifReactions': 'Reaktionen auf meine Rezensionen',
|
||||
'notif.new_episode': 'Neue Folge von {title}',
|
||||
'notif.new_season': 'Neue Staffel von {title}',
|
||||
'reviews.title': 'Rezensionen',
|
||||
'reviews.friends': 'Deine Freunde',
|
||||
'reviews.others': 'Andere Mitglieder',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'Noch keine Rezensionen',
|
||||
'reviews.seeAll': 'Alle Rezensionen ansehen',
|
||||
'reviews.react': 'Reagieren',
|
||||
'notif.title': 'Mitteilungen',
|
||||
'notif.empty': 'Keine Mitteilungen',
|
||||
'notif.someone': 'Jemand',
|
||||
'notif.follow_request': 'möchte dir folgen',
|
||||
'notif.follow_accepted': 'hat deine Anfrage angenommen',
|
||||
'notif.new_follower': 'folgt dir jetzt',
|
||||
'notif.reaction': 'hat auf deine Rezension reagiert',
|
||||
'notif.on': 'zu {title}',
|
||||
'home.notifications': 'Mitteilungen',
|
||||
'home.notificationsN': '{count} Mitteilungen',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "+ {count} weitere Challenge",
|
||||
'challenges.more_other': "+ {count} weitere Challenges",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Benachrichtigungen auf diesem Gerät",
|
||||
'push.deviceHint': "Auch wenn die App geschlossen ist. Die Auswahl unten gilt ebenfalls.",
|
||||
'push.iosInstall': "Auf iPhone und iPad füge Kino zuerst zum Home-Bildschirm hinzu (iOS 16.4 oder neuer) und öffne die App dann über ihr Symbol, um Benachrichtigungen zu aktivieren.",
|
||||
'push.unsupported': "Dieser Browser unterstützt keine Push-Benachrichtigungen.",
|
||||
'push.denied': "Benachrichtigungen sind für diese Seite blockiert. Erlaube sie in den Browser-Einstellungen und versuche es erneut.",
|
||||
'push.notReady': "Push-Benachrichtigungen sind auf dem Server noch nicht verfügbar.",
|
||||
'push.error': "Benachrichtigungen konnten nicht aktiviert werden. Prüfe deine Verbindung und versuche es erneut.",
|
||||
'netPill.offlineSync': "Offline — deine Änderungen werden synchronisiert",
|
||||
'netPill.offlineLocal': "Offline — alles bleibt auf diesem Gerät gespeichert",
|
||||
'netPill.synced': "Synchronisiert",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "Du kommentierst zu schnell – versuch es in einer Minute erneut.",
|
||||
'comments.err.gone': "Diese Kritik ist nicht mehr verfügbar.",
|
||||
'comments.err.invalid': "Kommentar leer oder zu lang (max. 500 Zeichen).",
|
||||
'notif.review_comment': "hat deine Kritik kommentiert",
|
||||
'notif.shared_list_invite': "hat dich in die geteilte Liste eingeladen",
|
||||
'settings.notifComments': "Kommentare zu meinen Kritiken",
|
||||
'settings.notifLists': "Einladungen zu geteilten Listen",
|
||||
'shared.title': "Geteilte Listen",
|
||||
'shared.hint': "Listen für mehrere: Jedes Mitglied kann Titel hinzufügen oder entfernen.",
|
||||
'shared.new': "Neue geteilte Liste",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Install the app',
|
||||
'settings.installHint': 'Add Kino to your home screen or desktop.',
|
||||
'settings.installed': 'App installed',
|
||||
'settings.notifs': 'Notifications',
|
||||
'settings.notifsHint': 'Choose what triggers the bell.',
|
||||
'settings.notifEpisodes': 'New episodes',
|
||||
'settings.notifFollows': 'New followers',
|
||||
'settings.notifAccepted': 'Accepted requests',
|
||||
'settings.notifReactions': 'Reactions to my reviews',
|
||||
'notif.new_episode': 'New episode of {title}',
|
||||
'notif.new_season': 'New season of {title}',
|
||||
'reviews.title': 'Reviews',
|
||||
'reviews.friends': 'Your friends',
|
||||
'reviews.others': 'Other members',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'No reviews yet',
|
||||
'reviews.seeAll': 'See all reviews',
|
||||
'reviews.react': 'React',
|
||||
'notif.title': 'Notifications',
|
||||
'notif.empty': 'No notifications',
|
||||
'notif.someone': 'Someone',
|
||||
'notif.follow_request': 'wants to follow you',
|
||||
'notif.follow_accepted': 'accepted your request',
|
||||
'notif.new_follower': 'started following you',
|
||||
'notif.reaction': 'reacted to your review',
|
||||
'notif.on': 'on {title}',
|
||||
'home.notifications': 'Notifications',
|
||||
'home.notificationsN': '{count} notifications',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "+ {count} more challenge",
|
||||
'challenges.more_other': "+ {count} more challenges",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Notifications on this device",
|
||||
'push.deviceHint': "Even when the app is closed. The choices below apply too.",
|
||||
'push.iosInstall': "On iPhone and iPad, first add Kino to your Home Screen (iOS 16.4 or later), then open the app from its icon to turn on notifications.",
|
||||
'push.unsupported': "This browser doesn’t support push notifications.",
|
||||
'push.denied': "Notifications are blocked for this site. Allow them in your browser settings, then try again.",
|
||||
'push.notReady': "Push notifications aren’t available on the server yet.",
|
||||
'push.error': "Couldn’t turn on notifications. Check your connection and try again.",
|
||||
'netPill.offlineSync': "Offline — your changes will sync",
|
||||
'netPill.offlineLocal': "Offline — everything stays saved on this device",
|
||||
'netPill.synced': "Synced",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "You’re commenting too fast — try again in a minute.",
|
||||
'comments.err.gone': "This review is no longer available.",
|
||||
'comments.err.invalid': "Comment is empty or too long (500 characters max).",
|
||||
'notif.review_comment': "commented on your review",
|
||||
'notif.shared_list_invite': "invited you to the shared list",
|
||||
'settings.notifComments': "Comments on my reviews",
|
||||
'settings.notifLists': "Shared list invitations",
|
||||
'shared.title': "Shared lists",
|
||||
'shared.hint': "Lists you build together: every member can add or remove titles.",
|
||||
'shared.new': "New shared list",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Instalar la aplicación',
|
||||
'settings.installHint': 'Añade Kino a tu pantalla de inicio o escritorio.',
|
||||
'settings.installed': 'Aplicación instalada',
|
||||
'settings.notifs': 'Notificaciones',
|
||||
'settings.notifsHint': 'Elige qué activa la campana.',
|
||||
'settings.notifEpisodes': 'Nuevos episodios',
|
||||
'settings.notifFollows': 'Nuevos seguidores',
|
||||
'settings.notifAccepted': 'Solicitudes aceptadas',
|
||||
'settings.notifReactions': 'Reacciones a mis opiniones',
|
||||
'notif.new_episode': 'Nuevo episodio de {title}',
|
||||
'notif.new_season': 'Nueva temporada de {title}',
|
||||
'reviews.title': 'Opiniones',
|
||||
'reviews.friends': 'Tus amigos',
|
||||
'reviews.others': 'Otros miembros',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'Aún no hay opiniones',
|
||||
'reviews.seeAll': 'Ver todas las opiniones',
|
||||
'reviews.react': 'Reaccionar',
|
||||
'notif.title': 'Notificaciones',
|
||||
'notif.empty': 'Sin notificaciones',
|
||||
'notif.someone': 'Alguien',
|
||||
'notif.follow_request': 'quiere seguirte',
|
||||
'notif.follow_accepted': 'aceptó tu solicitud',
|
||||
'notif.new_follower': 'empezó a seguirte',
|
||||
'notif.reaction': 'reaccionó a tu opinión',
|
||||
'notif.on': 'en {title}',
|
||||
'home.notifications': 'Notificaciones',
|
||||
'home.notificationsN': '{count} notificaciones',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "+ {count} reto más",
|
||||
'challenges.more_other': "+ {count} retos más",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Notificaciones en este dispositivo",
|
||||
'push.deviceHint': "Incluso con la app cerrada. Las opciones de abajo también se aplican.",
|
||||
'push.iosInstall': "En iPhone y iPad, primero añade Kino a la pantalla de inicio (iOS 16.4 o posterior) y abre la app desde su icono para activar las notificaciones.",
|
||||
'push.unsupported': "Este navegador no admite notificaciones push.",
|
||||
'push.denied': "Las notificaciones están bloqueadas para este sitio. Permítelas en los ajustes del navegador y vuelve a intentarlo.",
|
||||
'push.notReady': "Las notificaciones push aún no están disponibles en el servidor.",
|
||||
'push.error': "No se pudieron activar las notificaciones. Comprueba tu conexión e inténtalo de nuevo.",
|
||||
'netPill.offlineSync': "Sin conexión — tus cambios se sincronizarán",
|
||||
'netPill.offlineLocal': "Sin conexión — todo queda guardado en este dispositivo",
|
||||
'netPill.synced': "Sincronizado",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "Comentas demasiado rápido: vuelve a intentarlo en un minuto.",
|
||||
'comments.err.gone': "Esta reseña ya no está disponible.",
|
||||
'comments.err.invalid': "Comentario vacío o demasiado largo (máx. 500 caracteres).",
|
||||
'notif.review_comment': "comentó tu reseña",
|
||||
'notif.shared_list_invite': "te invitó a la lista compartida",
|
||||
'settings.notifComments': "Comentarios en mis reseñas",
|
||||
'settings.notifLists': "Invitaciones a listas compartidas",
|
||||
'shared.title': "Listas compartidas",
|
||||
'shared.hint': "Listas entre varios: cada miembro puede añadir o quitar títulos.",
|
||||
'shared.new': "Nueva lista compartida",
|
||||
|
||||
@@ -241,14 +241,6 @@ const dict = {
|
||||
'settings.installApp': 'Installer l\'application',
|
||||
'settings.installHint': 'Ajoute Kino à ton écran d\'accueil ou ton bureau.',
|
||||
'settings.installed': 'Application installée',
|
||||
'settings.notifs': 'Notifications',
|
||||
'settings.notifsHint': 'Choisis ce qui déclenche la cloche.',
|
||||
'settings.notifEpisodes': 'Nouveaux épisodes',
|
||||
'settings.notifFollows': 'Nouveaux abonnés',
|
||||
'settings.notifAccepted': 'Demandes acceptées',
|
||||
'settings.notifReactions': 'Réactions à mes avis',
|
||||
'notif.new_episode': 'Nouvel épisode de {title}',
|
||||
'notif.new_season': 'Nouvelle saison de {title}',
|
||||
'reviews.title': 'Avis',
|
||||
'reviews.friends': 'Tes amis',
|
||||
'reviews.others': 'Autres membres',
|
||||
@@ -257,16 +249,7 @@ const dict = {
|
||||
'reviews.none': 'Aucun avis pour le moment',
|
||||
'reviews.seeAll': 'Voir tous les avis',
|
||||
'reviews.react': 'Réagir',
|
||||
'notif.title': 'Notifications',
|
||||
'notif.empty': 'Aucune notification',
|
||||
'notif.someone': 'Quelqu’un',
|
||||
'notif.follow_request': 'veut s’abonner à toi',
|
||||
'notif.follow_accepted': 'a accepté ta demande',
|
||||
'notif.new_follower': 's’est abonné à toi',
|
||||
'notif.reaction': 'a réagi à ton avis',
|
||||
'notif.on': 'sur {title}',
|
||||
'home.notifications': 'Notifications',
|
||||
'home.notificationsN': '{count} notifications',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Vue d\'ensemble',
|
||||
@@ -1077,13 +1060,6 @@ const dict = {
|
||||
'challenges.more_one': "+ {count} autre défi",
|
||||
'challenges.more_other': "+ {count} autres défis",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Notifications sur cet appareil",
|
||||
'push.deviceHint': "Même quand l’app est fermée. Les choix ci-dessous s’appliquent aussi.",
|
||||
'push.iosInstall': "Sur iPhone et iPad, ajoute d’abord Kino à l’écran d’accueil (iOS 16.4 ou plus récent), puis ouvre l’app depuis son icône pour activer les notifications.",
|
||||
'push.unsupported': "Ce navigateur ne gère pas les notifications push.",
|
||||
'push.denied': "Notifications bloquées pour ce site. Autorise-les dans les réglages du navigateur, puis réessaie.",
|
||||
'push.notReady': "Les notifications push ne sont pas encore disponibles sur le serveur.",
|
||||
'push.error': "Impossible d’activer les notifications. Vérifie ta connexion et réessaie.",
|
||||
'netPill.offlineSync': "Hors ligne — tes modifs seront synchronisées",
|
||||
'netPill.offlineLocal': "Hors ligne — tout reste enregistré sur cet appareil",
|
||||
'netPill.synced': "Synchronisé",
|
||||
@@ -1223,10 +1199,6 @@ const dict = {
|
||||
'comments.err.rate': "Tu commentes trop vite : réessaie dans une minute.",
|
||||
'comments.err.gone': "Cet avis n’est plus disponible.",
|
||||
'comments.err.invalid': "Commentaire vide ou trop long (500 caractères max).",
|
||||
'notif.review_comment': "a commenté ton avis",
|
||||
'notif.shared_list_invite': "t’invite dans la liste partagée",
|
||||
'settings.notifComments': "Commentaires sur mes avis",
|
||||
'settings.notifLists': "Invitations aux listes partagées",
|
||||
'shared.title': "Listes partagées",
|
||||
'shared.hint': "Des listes à plusieurs : chaque membre ajoute ou retire des titres.",
|
||||
'shared.new': "Nouvelle liste partagée",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'ऐप इंस्टॉल करें',
|
||||
'settings.installHint': 'Kino को अपनी होम स्क्रीन या डेस्कटॉप पर जोड़ें।',
|
||||
'settings.installed': 'ऐप इंस्टॉल हो गया',
|
||||
'settings.notifs': 'सूचनाएँ',
|
||||
'settings.notifsHint': 'चुनो कि घंटी किससे बजे।',
|
||||
'settings.notifEpisodes': 'नए एपिसोड',
|
||||
'settings.notifFollows': 'नए फ़ॉलोअर',
|
||||
'settings.notifAccepted': 'स्वीकृत अनुरोध',
|
||||
'settings.notifReactions': 'मेरी समीक्षाओं पर प्रतिक्रियाएँ',
|
||||
'notif.new_episode': '{title} का नया एपिसोड',
|
||||
'notif.new_season': '{title} का नया सीज़न',
|
||||
'reviews.title': 'समीक्षाएँ',
|
||||
'reviews.friends': 'तुम्हारे दोस्त',
|
||||
'reviews.others': 'अन्य सदस्य',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'अभी कोई समीक्षा नहीं',
|
||||
'reviews.seeAll': 'सभी समीक्षाएँ देखें',
|
||||
'reviews.react': 'प्रतिक्रिया दें',
|
||||
'notif.title': 'सूचनाएँ',
|
||||
'notif.empty': 'कोई सूचना नहीं',
|
||||
'notif.someone': 'किसी ने',
|
||||
'notif.follow_request': 'तुम्हें फ़ॉलो करना चाहता है',
|
||||
'notif.follow_accepted': 'तुम्हारा अनुरोध स्वीकार किया',
|
||||
'notif.new_follower': 'तुम्हें फ़ॉलो करने लगा',
|
||||
'notif.reaction': 'तुम्हारी समीक्षा पर प्रतिक्रिया दी',
|
||||
'notif.on': '{title} पर',
|
||||
'home.notifications': 'सूचनाएँ',
|
||||
'home.notificationsN': '{count} सूचनाएँ',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "+ {count} और चुनौती",
|
||||
'challenges.more_other': "+ {count} और चुनौतियाँ",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "इस डिवाइस पर सूचनाएँ",
|
||||
'push.deviceHint': "ऐप बंद होने पर भी। नीचे दिए विकल्प भी लागू होते हैं।",
|
||||
'push.iosInstall': "iPhone और iPad पर पहले Kino को होम स्क्रीन पर जोड़ें (iOS 16.4 या नया), फिर सूचनाएँ चालू करने के लिए ऐप को उसके आइकन से खोलें।",
|
||||
'push.unsupported': "यह ब्राउज़र पुश सूचनाएँ सपोर्ट नहीं करता।",
|
||||
'push.denied': "इस साइट के लिए सूचनाएँ ब्लॉक हैं। ब्राउज़र सेटिंग्स में अनुमति दें, फिर दोबारा कोशिश करें।",
|
||||
'push.notReady': "पुश सूचनाएँ अभी सर्वर पर उपलब्ध नहीं हैं।",
|
||||
'push.error': "सूचनाएँ चालू नहीं हो सकीं। अपना कनेक्शन जाँचें और दोबारा कोशिश करें।",
|
||||
'netPill.offlineSync': "ऑफ़लाइन — आपके बदलाव सिंक हो जाएँगे",
|
||||
'netPill.offlineLocal': "ऑफ़लाइन — सब कुछ इस डिवाइस पर सहेजा रहता है",
|
||||
'netPill.synced': "सिंक हो गया",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "आप बहुत तेज़ी से टिप्पणी कर रहे हैं — एक मिनट बाद फिर कोशिश करें।",
|
||||
'comments.err.gone': "यह रिव्यू अब उपलब्ध नहीं है।",
|
||||
'comments.err.invalid': "टिप्पणी खाली है या बहुत लंबी है (अधिकतम 500 अक्षर)।",
|
||||
'notif.review_comment': "ने आपके रिव्यू पर टिप्पणी की",
|
||||
'notif.shared_list_invite': "ने आपको साझा सूची में आमंत्रित किया",
|
||||
'settings.notifComments': "मेरे रिव्यू पर टिप्पणियाँ",
|
||||
'settings.notifLists': "साझा सूचियों के आमंत्रण",
|
||||
'shared.title': "साझा सूचियाँ",
|
||||
'shared.hint': "मिलकर बनाई गई सूचियाँ: हर सदस्य टाइटल जोड़ या हटा सकता है।",
|
||||
'shared.new': "नई साझा सूची",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Pasang aplikasi',
|
||||
'settings.installHint': 'Tambahkan Kino ke layar utama atau desktop kamu.',
|
||||
'settings.installed': 'Aplikasi terpasang',
|
||||
'settings.notifs': 'Notifikasi',
|
||||
'settings.notifsHint': 'Pilih apa yang memicu lonceng.',
|
||||
'settings.notifEpisodes': 'Episode baru',
|
||||
'settings.notifFollows': 'Pengikut baru',
|
||||
'settings.notifAccepted': 'Permintaan diterima',
|
||||
'settings.notifReactions': 'Reaksi pada ulasanku',
|
||||
'notif.new_episode': 'Episode baru {title}',
|
||||
'notif.new_season': 'Musim baru {title}',
|
||||
'reviews.title': 'Ulasan',
|
||||
'reviews.friends': 'Teman kamu',
|
||||
'reviews.others': 'Anggota lain',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'Belum ada ulasan',
|
||||
'reviews.seeAll': 'Lihat semua ulasan',
|
||||
'reviews.react': 'Reaksi',
|
||||
'notif.title': 'Notifikasi',
|
||||
'notif.empty': 'Tidak ada notifikasi',
|
||||
'notif.someone': 'Seseorang',
|
||||
'notif.follow_request': 'ingin mengikutimu',
|
||||
'notif.follow_accepted': 'menerima permintaanmu',
|
||||
'notif.new_follower': 'mulai mengikutimu',
|
||||
'notif.reaction': 'bereaksi pada ulasanmu',
|
||||
'notif.on': 'di {title}',
|
||||
'home.notifications': 'Notifikasi',
|
||||
'home.notificationsN': '{count} notifikasi',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "+ {count} tantangan lain",
|
||||
'challenges.more_other': "+ {count} tantangan lain",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Notifikasi di perangkat ini",
|
||||
'push.deviceHint': "Bahkan saat aplikasi ditutup. Pilihan di bawah juga berlaku.",
|
||||
'push.iosInstall': "Di iPhone dan iPad, tambahkan dulu Kino ke Layar Utama (iOS 16.4 atau lebih baru), lalu buka aplikasi dari ikonnya untuk mengaktifkan notifikasi.",
|
||||
'push.unsupported': "Browser ini tidak mendukung notifikasi push.",
|
||||
'push.denied': "Notifikasi diblokir untuk situs ini. Izinkan di pengaturan browser, lalu coba lagi.",
|
||||
'push.notReady': "Notifikasi push belum tersedia di server.",
|
||||
'push.error': "Tidak dapat mengaktifkan notifikasi. Periksa koneksimu dan coba lagi.",
|
||||
'netPill.offlineSync': "Offline — perubahanmu akan disinkronkan",
|
||||
'netPill.offlineLocal': "Offline — semuanya tetap tersimpan di perangkat ini",
|
||||
'netPill.synced': "Tersinkron",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "Kamu berkomentar terlalu cepat — coba lagi dalam satu menit.",
|
||||
'comments.err.gone': "Ulasan ini sudah tidak tersedia.",
|
||||
'comments.err.invalid': "Komentar kosong atau terlalu panjang (maks. 500 karakter).",
|
||||
'notif.review_comment': "mengomentari ulasanmu",
|
||||
'notif.shared_list_invite': "mengundangmu ke daftar bersama",
|
||||
'settings.notifComments': "Komentar di ulasanku",
|
||||
'settings.notifLists': "Undangan daftar bersama",
|
||||
'shared.title': "Daftar bersama",
|
||||
'shared.hint': "Daftar yang dibuat bersama: setiap anggota bisa menambah atau menghapus judul.",
|
||||
'shared.new': "Daftar bersama baru",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Installa l\'app',
|
||||
'settings.installHint': 'Aggiungi Kino alla schermata home o al desktop.',
|
||||
'settings.installed': 'App installata',
|
||||
'settings.notifs': 'Notifiche',
|
||||
'settings.notifsHint': 'Scegli cosa attiva la campana.',
|
||||
'settings.notifEpisodes': 'Nuovi episodi',
|
||||
'settings.notifFollows': 'Nuovi follower',
|
||||
'settings.notifAccepted': 'Richieste accettate',
|
||||
'settings.notifReactions': 'Reazioni alle mie recensioni',
|
||||
'notif.new_episode': 'Nuovo episodio di {title}',
|
||||
'notif.new_season': 'Nuova stagione di {title}',
|
||||
'reviews.title': 'Recensioni',
|
||||
'reviews.friends': 'I tuoi amici',
|
||||
'reviews.others': 'Altri membri',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'Ancora nessuna recensione',
|
||||
'reviews.seeAll': 'Vedi tutte le recensioni',
|
||||
'reviews.react': 'Reagisci',
|
||||
'notif.title': 'Notifiche',
|
||||
'notif.empty': 'Nessuna notifica',
|
||||
'notif.someone': 'Qualcuno',
|
||||
'notif.follow_request': 'vuole seguirti',
|
||||
'notif.follow_accepted': 'ha accettato la tua richiesta',
|
||||
'notif.new_follower': 'ha iniziato a seguirti',
|
||||
'notif.reaction': 'ha reagito alla tua recensione',
|
||||
'notif.on': 'su {title}',
|
||||
'home.notifications': 'Notifiche',
|
||||
'home.notificationsN': '{count} notifiche',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "+ {count} altra sfida",
|
||||
'challenges.more_other': "+ {count} altre sfide",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Notifiche su questo dispositivo",
|
||||
'push.deviceHint': "Anche con l’app chiusa. Valgono anche le scelte qui sotto.",
|
||||
'push.iosInstall': "Su iPhone e iPad, aggiungi prima Kino alla schermata Home (iOS 16.4 o successivo), poi apri l’app dalla sua icona per attivare le notifiche.",
|
||||
'push.unsupported': "Questo browser non supporta le notifiche push.",
|
||||
'push.denied': "Le notifiche sono bloccate per questo sito. Consentile nelle impostazioni del browser, poi riprova.",
|
||||
'push.notReady': "Le notifiche push non sono ancora disponibili sul server.",
|
||||
'push.error': "Impossibile attivare le notifiche. Controlla la connessione e riprova.",
|
||||
'netPill.offlineSync': "Offline — le modifiche verranno sincronizzate",
|
||||
'netPill.offlineLocal': "Offline — tutto resta salvato su questo dispositivo",
|
||||
'netPill.synced': "Sincronizzato",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "Stai commentando troppo in fretta: riprova tra un minuto.",
|
||||
'comments.err.gone': "Questa recensione non è più disponibile.",
|
||||
'comments.err.invalid': "Commento vuoto o troppo lungo (max 500 caratteri).",
|
||||
'notif.review_comment': "ha commentato la tua recensione",
|
||||
'notif.shared_list_invite': "ti ha invitato nella lista condivisa",
|
||||
'settings.notifComments': "Commenti alle mie recensioni",
|
||||
'settings.notifLists': "Inviti alle liste condivise",
|
||||
'shared.title': "Liste condivise",
|
||||
'shared.hint': "Liste a più mani: ogni membro può aggiungere o togliere titoli.",
|
||||
'shared.new': "Nuova lista condivisa",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'アプリをインストール',
|
||||
'settings.installHint': 'Kino をホーム画面やデスクトップに追加します。',
|
||||
'settings.installed': 'アプリをインストール済み',
|
||||
'settings.notifs': '通知',
|
||||
'settings.notifsHint': 'ベルを鳴らす項目を選びます。',
|
||||
'settings.notifEpisodes': '新しいエピソード',
|
||||
'settings.notifFollows': '新しいフォロワー',
|
||||
'settings.notifAccepted': '承認されたリクエスト',
|
||||
'settings.notifReactions': '自分のレビューへのリアクション',
|
||||
'notif.new_episode': '「{title}」の新エピソード',
|
||||
'notif.new_season': '「{title}」の新シーズン',
|
||||
'reviews.title': 'レビュー',
|
||||
'reviews.friends': '友だち',
|
||||
'reviews.others': 'ほかのメンバー',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'まだレビューがありません',
|
||||
'reviews.seeAll': 'すべてのレビューを見る',
|
||||
'reviews.react': 'リアクション',
|
||||
'notif.title': '通知',
|
||||
'notif.empty': '通知はありません',
|
||||
'notif.someone': '誰か',
|
||||
'notif.follow_request': 'があなたをフォローしたがっています',
|
||||
'notif.follow_accepted': 'があなたのリクエストを承認しました',
|
||||
'notif.new_follower': 'があなたをフォローしました',
|
||||
'notif.reaction': 'があなたのレビューにリアクションしました',
|
||||
'notif.on': '「{title}」に',
|
||||
'home.notifications': '通知',
|
||||
'home.notificationsN': '{count}件の通知',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "ほか{count}件のチャレンジ",
|
||||
'challenges.more_other': "ほか{count}件のチャレンジ",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "このデバイスの通知",
|
||||
'push.deviceHint': "アプリを閉じていても届きます。下の設定も適用されます。",
|
||||
'push.iosInstall': "iPhone・iPad では、まず Kino をホーム画面に追加し(iOS 16.4 以降)、アイコンからアプリを開いて通知をオンにしてください。",
|
||||
'push.unsupported': "このブラウザはプッシュ通知に対応していません。",
|
||||
'push.denied': "このサイトの通知はブロックされています。ブラウザの設定で許可してから、もう一度お試しください。",
|
||||
'push.notReady': "プッシュ通知はまだサーバーで利用できません。",
|
||||
'push.error': "通知をオンにできませんでした。接続を確認して、もう一度お試しください。",
|
||||
'netPill.offlineSync': "オフライン — 変更は後で同期されます",
|
||||
'netPill.offlineLocal': "オフライン — すべてこのデバイスに保存されています",
|
||||
'netPill.synced': "同期済み",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "コメントの投稿が速すぎます。1分後にもう一度お試しください。",
|
||||
'comments.err.gone': "このレビューはもう利用できません。",
|
||||
'comments.err.invalid': "コメントが空か長すぎます(最大500文字)。",
|
||||
'notif.review_comment': "があなたのレビューにコメントしました",
|
||||
'notif.shared_list_invite': "があなたを共有リストに招待しました",
|
||||
'settings.notifComments': "自分のレビューへのコメント",
|
||||
'settings.notifLists': "共有リストへの招待",
|
||||
'shared.title': "共有リスト",
|
||||
'shared.hint': "みんなで作るリスト:メンバー全員が作品を追加・削除できます。",
|
||||
'shared.new': "新しい共有リスト",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': '앱 설치',
|
||||
'settings.installHint': 'Kino을 홈 화면이나 바탕화면에 추가하세요.',
|
||||
'settings.installed': '앱 설치됨',
|
||||
'settings.notifs': '알림',
|
||||
'settings.notifsHint': '벨을 울릴 항목을 선택하세요.',
|
||||
'settings.notifEpisodes': '새 에피소드',
|
||||
'settings.notifFollows': '새 팔로워',
|
||||
'settings.notifAccepted': '수락된 요청',
|
||||
'settings.notifReactions': '내 리뷰에 대한 반응',
|
||||
'notif.new_episode': '{title} 새 에피소드',
|
||||
'notif.new_season': '{title} 새 시즌',
|
||||
'reviews.title': '리뷰',
|
||||
'reviews.friends': '내 친구',
|
||||
'reviews.others': '다른 회원',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': '아직 리뷰가 없어요',
|
||||
'reviews.seeAll': '리뷰 모두 보기',
|
||||
'reviews.react': '반응하기',
|
||||
'notif.title': '알림',
|
||||
'notif.empty': '알림이 없어요',
|
||||
'notif.someone': '누군가',
|
||||
'notif.follow_request': '님이 당신을 팔로우하고 싶어 해요',
|
||||
'notif.follow_accepted': '님이 요청을 수락했어요',
|
||||
'notif.new_follower': '님이 당신을 팔로우했어요',
|
||||
'notif.reaction': '님이 당신의 리뷰에 반응했어요',
|
||||
'notif.on': '{title}에',
|
||||
'home.notifications': '알림',
|
||||
'home.notificationsN': '알림 {count}개',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "+ 챌린지 {count}개 더",
|
||||
'challenges.more_other': "+ 챌린지 {count}개 더",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "이 기기의 알림",
|
||||
'push.deviceHint': "앱이 닫혀 있어도 받아요. 아래 선택 사항도 적용돼요.",
|
||||
'push.iosInstall': "iPhone과 iPad에서는 먼저 Kino을 홈 화면에 추가한 뒤(iOS 16.4 이상) 아이콘으로 앱을 열어 알림을 켜 주세요.",
|
||||
'push.unsupported': "이 브라우저는 푸시 알림을 지원하지 않아요.",
|
||||
'push.denied': "이 사이트의 알림이 차단되어 있어요. 브라우저 설정에서 허용한 뒤 다시 시도해 주세요.",
|
||||
'push.notReady': "서버에서 아직 푸시 알림을 사용할 수 없어요.",
|
||||
'push.error': "알림을 켜지 못했어요. 연결을 확인하고 다시 시도해 주세요.",
|
||||
'netPill.offlineSync': "오프라인 — 변경 사항은 나중에 동기화돼요",
|
||||
'netPill.offlineLocal': "오프라인 — 모든 내용이 이 기기에 저장돼 있어요",
|
||||
'netPill.synced': "동기화됨",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "댓글을 너무 빨리 달고 있어요. 1분 후 다시 시도하세요.",
|
||||
'comments.err.gone': "이 리뷰는 더 이상 볼 수 없습니다.",
|
||||
'comments.err.invalid': "댓글이 비어 있거나 너무 깁니다(최대 500자).",
|
||||
'notif.review_comment': "님이 내 리뷰에 댓글을 남겼습니다",
|
||||
'notif.shared_list_invite': "님이 공유 목록에 초대했습니다",
|
||||
'settings.notifComments': "내 리뷰에 달린 댓글",
|
||||
'settings.notifLists': "공유 목록 초대",
|
||||
'shared.title': "공유 목록",
|
||||
'shared.hint': "함께 만드는 목록: 모든 멤버가 작품을 추가하거나 뺄 수 있어요.",
|
||||
'shared.new': "새 공유 목록",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'App installeren',
|
||||
'settings.installHint': 'Voeg Kino toe aan je startscherm of bureaublad.',
|
||||
'settings.installed': 'App geïnstalleerd',
|
||||
'settings.notifs': 'Meldingen',
|
||||
'settings.notifsHint': 'Kies wat de bel activeert.',
|
||||
'settings.notifEpisodes': 'Nieuwe afleveringen',
|
||||
'settings.notifFollows': 'Nieuwe volgers',
|
||||
'settings.notifAccepted': 'Geaccepteerde verzoeken',
|
||||
'settings.notifReactions': 'Reacties op mijn recensies',
|
||||
'notif.new_episode': 'Nieuwe aflevering van {title}',
|
||||
'notif.new_season': 'Nieuw seizoen van {title}',
|
||||
'reviews.title': 'Recensies',
|
||||
'reviews.friends': 'Je vrienden',
|
||||
'reviews.others': 'Andere leden',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'Nog geen recensies',
|
||||
'reviews.seeAll': 'Alle recensies bekijken',
|
||||
'reviews.react': 'Reageren',
|
||||
'notif.title': 'Meldingen',
|
||||
'notif.empty': 'Geen meldingen',
|
||||
'notif.someone': 'Iemand',
|
||||
'notif.follow_request': 'wil je volgen',
|
||||
'notif.follow_accepted': 'heeft je verzoek geaccepteerd',
|
||||
'notif.new_follower': 'volgt je nu',
|
||||
'notif.reaction': 'heeft op je recensie gereageerd',
|
||||
'notif.on': 'op {title}',
|
||||
'home.notifications': 'Meldingen',
|
||||
'home.notificationsN': '{count} meldingen',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "+ {count} andere uitdaging",
|
||||
'challenges.more_other': "+ {count} andere uitdagingen",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Meldingen op dit apparaat",
|
||||
'push.deviceHint': "Ook als de app gesloten is. De keuzes hieronder gelden ook.",
|
||||
'push.iosInstall': "Voeg op iPhone en iPad Kino eerst toe aan je beginscherm (iOS 16.4 of nieuwer) en open de app via het pictogram om meldingen aan te zetten.",
|
||||
'push.unsupported': "Deze browser ondersteunt geen pushmeldingen.",
|
||||
'push.denied': "Meldingen zijn geblokkeerd voor deze site. Sta ze toe in je browserinstellingen en probeer het opnieuw.",
|
||||
'push.notReady': "Pushmeldingen zijn nog niet beschikbaar op de server.",
|
||||
'push.error': "Kon meldingen niet aanzetten. Controleer je verbinding en probeer het opnieuw.",
|
||||
'netPill.offlineSync': "Offline — je wijzigingen worden gesynchroniseerd",
|
||||
'netPill.offlineLocal': "Offline — alles blijft op dit apparaat bewaard",
|
||||
'netPill.synced': "Gesynchroniseerd",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "Je reageert te snel – probeer het over een minuut opnieuw.",
|
||||
'comments.err.gone': "Deze recensie is niet meer beschikbaar.",
|
||||
'comments.err.invalid': "Reactie leeg of te lang (max. 500 tekens).",
|
||||
'notif.review_comment': "reageerde op je recensie",
|
||||
'notif.shared_list_invite': "nodigde je uit voor de gedeelde lijst",
|
||||
'settings.notifComments': "Reacties op mijn recensies",
|
||||
'settings.notifLists': "Uitnodigingen voor gedeelde lijsten",
|
||||
'shared.title': "Gedeelde lijsten",
|
||||
'shared.hint': "Lijsten voor meerdere mensen: elk lid kan titels toevoegen of verwijderen.",
|
||||
'shared.new': "Nieuwe gedeelde lijst",
|
||||
|
||||
@@ -243,14 +243,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Zainstaluj aplikację',
|
||||
'settings.installHint': 'Dodaj Kino do ekranu głównego lub pulpitu.',
|
||||
'settings.installed': 'Aplikacja zainstalowana',
|
||||
'settings.notifs': 'Powiadomienia',
|
||||
'settings.notifsHint': 'Wybierz, co uruchamia dzwonek.',
|
||||
'settings.notifEpisodes': 'Nowe odcinki',
|
||||
'settings.notifFollows': 'Nowi obserwujący',
|
||||
'settings.notifAccepted': 'Zaakceptowane prośby',
|
||||
'settings.notifReactions': 'Reakcje na moje recenzje',
|
||||
'notif.new_episode': 'Nowy odcinek: {title}',
|
||||
'notif.new_season': 'Nowy sezon: {title}',
|
||||
'reviews.title': 'Recenzje',
|
||||
'reviews.friends': 'Twoi znajomi',
|
||||
'reviews.others': 'Inni użytkownicy',
|
||||
@@ -259,16 +251,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'Jeszcze nie ma recenzji',
|
||||
'reviews.seeAll': 'Zobacz wszystkie recenzje',
|
||||
'reviews.react': 'Zareaguj',
|
||||
'notif.title': 'Powiadomienia',
|
||||
'notif.empty': 'Brak powiadomień',
|
||||
'notif.someone': 'Ktoś',
|
||||
'notif.follow_request': 'chce Cię obserwować',
|
||||
'notif.follow_accepted': 'zaakceptował Twoją prośbę',
|
||||
'notif.new_follower': 'zaczął Cię obserwować',
|
||||
'notif.reaction': 'zareagował na Twoją recenzję',
|
||||
'notif.on': 'w {title}',
|
||||
'home.notifications': 'Powiadomienia',
|
||||
'home.notificationsN': 'Powiadomienia: {count}',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1211,13 +1194,6 @@ const dict: Translations = {
|
||||
'challenges.more_many': "+ {count} innych wyzwań",
|
||||
'challenges.more_other': "+ {count} innego wyzwania",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Powiadomienia na tym urządzeniu",
|
||||
'push.deviceHint': "Nawet gdy aplikacja jest zamknięta. Poniższe ustawienia też obowiązują.",
|
||||
'push.iosInstall': "Na iPhonie i iPadzie najpierw dodaj Kino do ekranu początkowego (iOS 16.4 lub nowszy), a potem otwórz aplikację z jej ikony, aby włączyć powiadomienia.",
|
||||
'push.unsupported': "Ta przeglądarka nie obsługuje powiadomień push.",
|
||||
'push.denied': "Powiadomienia są zablokowane dla tej witryny. Zezwól na nie w ustawieniach przeglądarki i spróbuj ponownie.",
|
||||
'push.notReady': "Powiadomienia push nie są jeszcze dostępne na serwerze.",
|
||||
'push.error': "Nie udało się włączyć powiadomień. Sprawdź połączenie i spróbuj ponownie.",
|
||||
'netPill.offlineSync': "Offline — zmiany zostaną zsynchronizowane",
|
||||
'netPill.offlineLocal': "Offline — wszystko zostaje zapisane na tym urządzeniu",
|
||||
'netPill.synced': "Zsynchronizowano",
|
||||
@@ -1357,10 +1333,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "Komentujesz zbyt szybko – spróbuj ponownie za minutę.",
|
||||
'comments.err.gone': "Ta recenzja nie jest już dostępna.",
|
||||
'comments.err.invalid': "Komentarz jest pusty lub za długi (maks. 500 znaków).",
|
||||
'notif.review_comment': "skomentował(a) twoją recenzję",
|
||||
'notif.shared_list_invite': "zaprasza cię do wspólnej listy",
|
||||
'settings.notifComments': "Komentarze do moich recenzji",
|
||||
'settings.notifLists': "Zaproszenia do wspólnych list",
|
||||
'shared.title': "Wspólne listy",
|
||||
'shared.hint': "Listy tworzone razem: każdy członek może dodawać i usuwać tytuły.",
|
||||
'shared.new': "Nowa wspólna lista",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Instalar o app',
|
||||
'settings.installHint': 'Adicione o Kino à tela inicial ou à área de trabalho.',
|
||||
'settings.installed': 'App instalado',
|
||||
'settings.notifs': 'Notificações',
|
||||
'settings.notifsHint': 'Escolhe o que aciona o sino.',
|
||||
'settings.notifEpisodes': 'Novos episódios',
|
||||
'settings.notifFollows': 'Novos seguidores',
|
||||
'settings.notifAccepted': 'Pedidos aceites',
|
||||
'settings.notifReactions': 'Reações às minhas avaliações',
|
||||
'notif.new_episode': 'Novo episódio de {title}',
|
||||
'notif.new_season': 'Nova temporada de {title}',
|
||||
'reviews.title': 'Avaliações',
|
||||
'reviews.friends': 'Teus amigos',
|
||||
'reviews.others': 'Outros membros',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'Ainda sem avaliações',
|
||||
'reviews.seeAll': 'Ver todas as avaliações',
|
||||
'reviews.react': 'Reagir',
|
||||
'notif.title': 'Notificações',
|
||||
'notif.empty': 'Sem notificações',
|
||||
'notif.someone': 'Alguém',
|
||||
'notif.follow_request': 'quer te seguir',
|
||||
'notif.follow_accepted': 'aceitou teu pedido',
|
||||
'notif.new_follower': 'começou a te seguir',
|
||||
'notif.reaction': 'reagiu à tua avaliação',
|
||||
'notif.on': 'em {title}',
|
||||
'home.notifications': 'Notificações',
|
||||
'home.notificationsN': '{count} notificações',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "+ {count} outro desafio",
|
||||
'challenges.more_other': "+ {count} outros desafios",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Notificações neste dispositivo",
|
||||
'push.deviceHint': "Mesmo com o app fechado. As opções abaixo também valem.",
|
||||
'push.iosInstall': "No iPhone e iPad, primeiro adicione o Kino à Tela de Início (iOS 16.4 ou mais recente) e abra o app pelo ícone para ativar as notificações.",
|
||||
'push.unsupported': "Este navegador não suporta notificações push.",
|
||||
'push.denied': "As notificações estão bloqueadas para este site. Permita-as nas configurações do navegador e tente de novo.",
|
||||
'push.notReady': "As notificações push ainda não estão disponíveis no servidor.",
|
||||
'push.error': "Não foi possível ativar as notificações. Verifique sua conexão e tente de novo.",
|
||||
'netPill.offlineSync': "Offline — suas alterações serão sincronizadas",
|
||||
'netPill.offlineLocal': "Offline — tudo fica salvo neste dispositivo",
|
||||
'netPill.synced': "Sincronizado",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "Você está comentando rápido demais: tente de novo em um minuto.",
|
||||
'comments.err.gone': "Esta resenha não está mais disponível.",
|
||||
'comments.err.invalid': "Comentário vazio ou longo demais (máx. 500 caracteres).",
|
||||
'notif.review_comment': "comentou sua resenha",
|
||||
'notif.shared_list_invite': "convidou você para a lista compartilhada",
|
||||
'settings.notifComments': "Comentários nas minhas resenhas",
|
||||
'settings.notifLists': "Convites para listas compartilhadas",
|
||||
'shared.title': "Listas compartilhadas",
|
||||
'shared.hint': "Listas a várias mãos: cada membro pode adicionar ou remover títulos.",
|
||||
'shared.new': "Nova lista compartilhada",
|
||||
|
||||
@@ -243,14 +243,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Установить приложение',
|
||||
'settings.installHint': 'Добавь Kino на главный экран или рабочий стол.',
|
||||
'settings.installed': 'Приложение установлено',
|
||||
'settings.notifs': 'Уведомления',
|
||||
'settings.notifsHint': 'Выбери, что включает колокольчик.',
|
||||
'settings.notifEpisodes': 'Новые серии',
|
||||
'settings.notifFollows': 'Новые подписчики',
|
||||
'settings.notifAccepted': 'Принятые заявки',
|
||||
'settings.notifReactions': 'Реакции на мои отзывы',
|
||||
'notif.new_episode': 'Новая серия «{title}»',
|
||||
'notif.new_season': 'Новый сезон «{title}»',
|
||||
'reviews.title': 'Отзывы',
|
||||
'reviews.friends': 'Твои друзья',
|
||||
'reviews.others': 'Другие участники',
|
||||
@@ -259,16 +251,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'Пока нет отзывов',
|
||||
'reviews.seeAll': 'Смотреть все отзывы',
|
||||
'reviews.react': 'Отреагировать',
|
||||
'notif.title': 'Уведомления',
|
||||
'notif.empty': 'Нет уведомлений',
|
||||
'notif.someone': 'Кто-то',
|
||||
'notif.follow_request': 'хочет подписаться на тебя',
|
||||
'notif.follow_accepted': 'принял(а) твою заявку',
|
||||
'notif.new_follower': 'подписался(ась) на тебя',
|
||||
'notif.reaction': 'отреагировал(а) на твой отзыв',
|
||||
'notif.on': 'к «{title}»',
|
||||
'home.notifications': 'Уведомления',
|
||||
'home.notificationsN': 'Уведомлений: {count}',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1211,13 +1194,6 @@ const dict: Translations = {
|
||||
'challenges.more_many': "+ ещё {count} челленджей",
|
||||
'challenges.more_other': "+ ещё {count} челленджа",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Уведомления на этом устройстве",
|
||||
'push.deviceHint': "Даже когда приложение закрыто. Настройки ниже тоже действуют.",
|
||||
'push.iosInstall': "На iPhone и iPad сначала добавьте Kino на экран «Домой» (iOS 16.4 или новее), затем откройте приложение с его значка, чтобы включить уведомления.",
|
||||
'push.unsupported': "Этот браузер не поддерживает push-уведомления.",
|
||||
'push.denied': "Уведомления для этого сайта заблокированы. Разрешите их в настройках браузера и повторите попытку.",
|
||||
'push.notReady': "Push-уведомления пока недоступны на сервере.",
|
||||
'push.error': "Не удалось включить уведомления. Проверьте подключение и повторите попытку.",
|
||||
'netPill.offlineSync': "Нет сети — изменения будут синхронизированы",
|
||||
'netPill.offlineLocal': "Нет сети — всё сохранено на этом устройстве",
|
||||
'netPill.synced': "Синхронизировано",
|
||||
@@ -1357,10 +1333,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "Вы комментируете слишком часто — попробуйте через минуту.",
|
||||
'comments.err.gone': "Этот отзыв больше недоступен.",
|
||||
'comments.err.invalid': "Комментарий пустой или слишком длинный (макс. 500 символов).",
|
||||
'notif.review_comment': "прокомментировал(а) ваш отзыв",
|
||||
'notif.shared_list_invite': "приглашает вас в общий список",
|
||||
'settings.notifComments': "Комментарии к моим отзывам",
|
||||
'settings.notifLists': "Приглашения в общие списки",
|
||||
'shared.title': "Общие списки",
|
||||
'shared.hint': "Списки на несколько человек: каждый участник может добавлять и удалять тайтлы.",
|
||||
'shared.new': "Новый общий список",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'ติดตั้งแอป',
|
||||
'settings.installHint': 'เพิ่ม Kino ไปที่หน้าจอหลักหรือเดสก์ท็อปของคุณ',
|
||||
'settings.installed': 'ติดตั้งแอปแล้ว',
|
||||
'settings.notifs': 'การแจ้งเตือน',
|
||||
'settings.notifsHint': 'เลือกสิ่งที่จะทำให้กระดิ่งเตือน',
|
||||
'settings.notifEpisodes': 'ตอนใหม่',
|
||||
'settings.notifFollows': 'ผู้ติดตามใหม่',
|
||||
'settings.notifAccepted': 'คำขอที่ยอมรับแล้ว',
|
||||
'settings.notifReactions': 'รีแอกชันต่อรีวิวของฉัน',
|
||||
'notif.new_episode': 'ตอนใหม่ของ {title}',
|
||||
'notif.new_season': 'ซีซันใหม่ของ {title}',
|
||||
'reviews.title': 'รีวิว',
|
||||
'reviews.friends': 'เพื่อนของคุณ',
|
||||
'reviews.others': 'สมาชิกอื่น',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'ยังไม่มีรีวิว',
|
||||
'reviews.seeAll': 'ดูรีวิวทั้งหมด',
|
||||
'reviews.react': 'แสดงความรู้สึก',
|
||||
'notif.title': 'การแจ้งเตือน',
|
||||
'notif.empty': 'ไม่มีการแจ้งเตือน',
|
||||
'notif.someone': 'มีคน',
|
||||
'notif.follow_request': 'ต้องการติดตามคุณ',
|
||||
'notif.follow_accepted': 'ยอมรับคำขอของคุณ',
|
||||
'notif.new_follower': 'เริ่มติดตามคุณ',
|
||||
'notif.reaction': 'แสดงความรู้สึกต่อรีวิวของคุณ',
|
||||
'notif.on': 'ใน {title}',
|
||||
'home.notifications': 'การแจ้งเตือน',
|
||||
'home.notificationsN': '{count} การแจ้งเตือน',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "+ อีก {count} ชาเลนจ์",
|
||||
'challenges.more_other': "+ อีก {count} ชาเลนจ์",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "การแจ้งเตือนบนอุปกรณ์นี้",
|
||||
'push.deviceHint': "แม้ปิดแอปอยู่ ตัวเลือกด้านล่างก็มีผลด้วย",
|
||||
'push.iosInstall': "บน iPhone และ iPad ให้เพิ่ม Kino ไปยังหน้าจอโฮมก่อน (iOS 16.4 ขึ้นไป) แล้วเปิดแอปจากไอคอนเพื่อเปิดการแจ้งเตือน",
|
||||
'push.unsupported': "เบราว์เซอร์นี้ไม่รองรับการแจ้งเตือนแบบพุช",
|
||||
'push.denied': "การแจ้งเตือนถูกบล็อกสำหรับเว็บไซต์นี้ อนุญาตในการตั้งค่าเบราว์เซอร์แล้วลองอีกครั้ง",
|
||||
'push.notReady': "เซิร์ฟเวอร์ยังไม่พร้อมสำหรับการแจ้งเตือนแบบพุช",
|
||||
'push.error': "เปิดการแจ้งเตือนไม่สำเร็จ ตรวจสอบการเชื่อมต่อแล้วลองอีกครั้ง",
|
||||
'netPill.offlineSync': "ออฟไลน์ — การเปลี่ยนแปลงจะซิงค์ภายหลัง",
|
||||
'netPill.offlineLocal': "ออฟไลน์ — ทุกอย่างยังบันทึกอยู่ในอุปกรณ์นี้",
|
||||
'netPill.synced': "ซิงค์แล้ว",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "คุณแสดงความคิดเห็นเร็วเกินไป ลองใหม่ในอีกหนึ่งนาที",
|
||||
'comments.err.gone': "รีวิวนี้ไม่มีให้ดูแล้ว",
|
||||
'comments.err.invalid': "ความคิดเห็นว่างหรือยาวเกินไป (สูงสุด 500 ตัวอักษร)",
|
||||
'notif.review_comment': "แสดงความคิดเห็นในรีวิวของคุณ",
|
||||
'notif.shared_list_invite': "เชิญคุณเข้ารายการที่แชร์",
|
||||
'settings.notifComments': "ความคิดเห็นในรีวิวของฉัน",
|
||||
'settings.notifLists': "คำเชิญเข้ารายการที่แชร์",
|
||||
'shared.title': "รายการที่แชร์",
|
||||
'shared.hint': "รายการที่ทำร่วมกัน: สมาชิกทุกคนเพิ่มหรือนำเรื่องออกได้",
|
||||
'shared.new': "รายการที่แชร์ใหม่",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Uygulamayı yükle',
|
||||
'settings.installHint': 'Kino’yu ana ekranına veya masaüstüne ekle.',
|
||||
'settings.installed': 'Uygulama yüklendi',
|
||||
'settings.notifs': 'Bildirimler',
|
||||
'settings.notifsHint': 'Zili neyin tetikleyeceğini seç.',
|
||||
'settings.notifEpisodes': 'Yeni bölümler',
|
||||
'settings.notifFollows': 'Yeni takipçiler',
|
||||
'settings.notifAccepted': 'Kabul edilen istekler',
|
||||
'settings.notifReactions': 'Yorumlarıma tepkiler',
|
||||
'notif.new_episode': '{title} yeni bölüm',
|
||||
'notif.new_season': '{title} yeni sezon',
|
||||
'reviews.title': 'Yorumlar',
|
||||
'reviews.friends': 'Arkadaşların',
|
||||
'reviews.others': 'Diğer üyeler',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'Henüz yorum yok',
|
||||
'reviews.seeAll': 'Tüm yorumları gör',
|
||||
'reviews.react': 'Tepki ver',
|
||||
'notif.title': 'Bildirimler',
|
||||
'notif.empty': 'Bildirim yok',
|
||||
'notif.someone': 'Biri',
|
||||
'notif.follow_request': 'seni takip etmek istiyor',
|
||||
'notif.follow_accepted': 'isteğini kabul etti',
|
||||
'notif.new_follower': 'seni takip etmeye başladı',
|
||||
'notif.reaction': 'yorumuna tepki verdi',
|
||||
'notif.on': '{title} için',
|
||||
'home.notifications': 'Bildirimler',
|
||||
'home.notificationsN': '{count} bildirim',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "+ {count} hedef daha",
|
||||
'challenges.more_other': "+ {count} hedef daha",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Bu cihazda bildirimler",
|
||||
'push.deviceHint': "Uygulama kapalıyken bile. Aşağıdaki seçimler de geçerlidir.",
|
||||
'push.iosInstall': "iPhone ve iPad’de önce Kino’yu Ana Ekran’a ekle (iOS 16.4 veya üstü), ardından bildirimleri açmak için uygulamayı simgesinden aç.",
|
||||
'push.unsupported': "Bu tarayıcı anlık bildirimleri desteklemiyor.",
|
||||
'push.denied': "Bu site için bildirimler engellendi. Tarayıcı ayarlarından izin ver ve tekrar dene.",
|
||||
'push.notReady': "Anlık bildirimler sunucuda henüz kullanılamıyor.",
|
||||
'push.error': "Bildirimler açılamadı. Bağlantını kontrol edip tekrar dene.",
|
||||
'netPill.offlineSync': "Çevrimdışı — değişikliklerin eşitlenecek",
|
||||
'netPill.offlineLocal': "Çevrimdışı — her şey bu cihazda kayıtlı kalır",
|
||||
'netPill.synced': "Eşitlendi",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "Çok hızlı yorum yapıyorsun, bir dakika sonra tekrar dene.",
|
||||
'comments.err.gone': "Bu inceleme artık mevcut değil.",
|
||||
'comments.err.invalid': "Yorum boş ya da çok uzun (en fazla 500 karakter).",
|
||||
'notif.review_comment': "incelemene yorum yaptı",
|
||||
'notif.shared_list_invite': "seni ortak listeye davet etti",
|
||||
'settings.notifComments': "İncelemelerime yapılan yorumlar",
|
||||
'settings.notifLists': "Ortak liste davetleri",
|
||||
'shared.title': "Ortak listeler",
|
||||
'shared.hint': "Birlikte oluşturulan listeler: her üye başlık ekleyip çıkarabilir.",
|
||||
'shared.new': "Yeni ortak liste",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Cài đặt ứng dụng',
|
||||
'settings.installHint': 'Thêm Kino vào màn hình chính hoặc màn hình nền của bạn.',
|
||||
'settings.installed': 'Đã cài ứng dụng',
|
||||
'settings.notifs': 'Thông báo',
|
||||
'settings.notifsHint': 'Chọn điều kích hoạt chuông.',
|
||||
'settings.notifEpisodes': 'Tập mới',
|
||||
'settings.notifFollows': 'Người theo dõi mới',
|
||||
'settings.notifAccepted': 'Yêu cầu đã chấp nhận',
|
||||
'settings.notifReactions': 'Cảm xúc với đánh giá của tôi',
|
||||
'notif.new_episode': 'Tập mới của {title}',
|
||||
'notif.new_season': 'Mùa mới của {title}',
|
||||
'reviews.title': 'Đánh giá',
|
||||
'reviews.friends': 'Bạn bè của bạn',
|
||||
'reviews.others': 'Thành viên khác',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': 'Chưa có đánh giá',
|
||||
'reviews.seeAll': 'Xem tất cả đánh giá',
|
||||
'reviews.react': 'Bày tỏ cảm xúc',
|
||||
'notif.title': 'Thông báo',
|
||||
'notif.empty': 'Không có thông báo',
|
||||
'notif.someone': 'Ai đó',
|
||||
'notif.follow_request': 'muốn theo dõi bạn',
|
||||
'notif.follow_accepted': 'đã chấp nhận yêu cầu của bạn',
|
||||
'notif.new_follower': 'đã theo dõi bạn',
|
||||
'notif.reaction': 'đã bày tỏ cảm xúc với đánh giá của bạn',
|
||||
'notif.on': 'về {title}',
|
||||
'home.notifications': 'Thông báo',
|
||||
'home.notificationsN': '{count} thông báo',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "+ {count} thử thách khác",
|
||||
'challenges.more_other': "+ {count} thử thách khác",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Thông báo trên thiết bị này",
|
||||
'push.deviceHint': "Ngay cả khi ứng dụng đã đóng. Các lựa chọn bên dưới cũng được áp dụng.",
|
||||
'push.iosInstall': "Trên iPhone và iPad, trước tiên hãy thêm Kino vào Màn hình chính (iOS 16.4 trở lên), sau đó mở ứng dụng từ biểu tượng để bật thông báo.",
|
||||
'push.unsupported': "Trình duyệt này không hỗ trợ thông báo đẩy.",
|
||||
'push.denied': "Thông báo đã bị chặn cho trang này. Hãy cho phép trong cài đặt trình duyệt rồi thử lại.",
|
||||
'push.notReady': "Máy chủ chưa hỗ trợ thông báo đẩy.",
|
||||
'push.error': "Không thể bật thông báo. Kiểm tra kết nối rồi thử lại.",
|
||||
'netPill.offlineSync': "Ngoại tuyến — thay đổi của bạn sẽ được đồng bộ",
|
||||
'netPill.offlineLocal': "Ngoại tuyến — mọi thứ vẫn được lưu trên thiết bị này",
|
||||
'netPill.synced': "Đã đồng bộ",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "Bạn bình luận quá nhanh — hãy thử lại sau một phút.",
|
||||
'comments.err.gone': "Bài đánh giá này không còn nữa.",
|
||||
'comments.err.invalid': "Bình luận trống hoặc quá dài (tối đa 500 ký tự).",
|
||||
'notif.review_comment': "đã bình luận bài đánh giá của bạn",
|
||||
'notif.shared_list_invite': "đã mời bạn vào danh sách chung",
|
||||
'settings.notifComments': "Bình luận về đánh giá của tôi",
|
||||
'settings.notifLists': "Lời mời vào danh sách chung",
|
||||
'shared.title': "Danh sách chung",
|
||||
'shared.hint': "Danh sách làm cùng nhau: mọi thành viên đều có thể thêm hoặc bớt phim.",
|
||||
'shared.new': "Danh sách chung mới",
|
||||
|
||||
@@ -239,14 +239,6 @@ const dict: Translations = {
|
||||
'settings.installApp': '安装应用',
|
||||
'settings.installHint': '将 Kino 添加到主屏幕或桌面。',
|
||||
'settings.installed': '应用已安装',
|
||||
'settings.notifs': '通知',
|
||||
'settings.notifsHint': '选择触发铃铛的内容。',
|
||||
'settings.notifEpisodes': '新剧集',
|
||||
'settings.notifFollows': '新粉丝',
|
||||
'settings.notifAccepted': '已接受的请求',
|
||||
'settings.notifReactions': '对我评价的回应',
|
||||
'notif.new_episode': '《{title}》有新一集',
|
||||
'notif.new_season': '《{title}》有新一季',
|
||||
'reviews.title': '评价',
|
||||
'reviews.friends': '你的好友',
|
||||
'reviews.others': '其他用户',
|
||||
@@ -255,16 +247,7 @@ const dict: Translations = {
|
||||
'reviews.none': '还没有评价',
|
||||
'reviews.seeAll': '查看全部评价',
|
||||
'reviews.react': '回应',
|
||||
'notif.title': '通知',
|
||||
'notif.empty': '暂无通知',
|
||||
'notif.someone': '有人',
|
||||
'notif.follow_request': '想关注你',
|
||||
'notif.follow_accepted': '接受了你的请求',
|
||||
'notif.new_follower': '开始关注你',
|
||||
'notif.reaction': '回应了你的评价',
|
||||
'notif.on': '关于《{title}》',
|
||||
'home.notifications': '通知',
|
||||
'home.notificationsN': '{count} 条通知',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
@@ -1075,13 +1058,6 @@ const dict: Translations = {
|
||||
'challenges.more_one': "+ 另外 {count} 个挑战",
|
||||
'challenges.more_other': "+ 另外 {count} 个挑战",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "此设备上的通知",
|
||||
'push.deviceHint': "即使应用已关闭也会提醒。下方的选项同样适用。",
|
||||
'push.iosInstall': "在 iPhone 和 iPad 上,请先将 Kino 添加到主屏幕(iOS 16.4 或更高版本),再从图标打开应用以开启通知。",
|
||||
'push.unsupported': "此浏览器不支持推送通知。",
|
||||
'push.denied': "此网站的通知已被阻止。请在浏览器设置中允许后重试。",
|
||||
'push.notReady': "服务器暂未开放推送通知。",
|
||||
'push.error': "无法开启通知。请检查网络连接后重试。",
|
||||
'netPill.offlineSync': "离线 — 你的修改将稍后同步",
|
||||
'netPill.offlineLocal': "离线 — 所有内容都保存在此设备上",
|
||||
'netPill.synced': "已同步",
|
||||
@@ -1221,10 +1197,6 @@ const dict: Translations = {
|
||||
'comments.err.rate': "你评论得太快了,请一分钟后再试。",
|
||||
'comments.err.gone': "此评论已不存在。",
|
||||
'comments.err.invalid': "评论为空或过长(最多 500 字)。",
|
||||
'notif.review_comment': "评论了你的影评",
|
||||
'notif.shared_list_invite': "邀请你加入共享片单",
|
||||
'settings.notifComments': "我的影评收到的评论",
|
||||
'settings.notifLists': "共享片单邀请",
|
||||
'shared.title': "共享片单",
|
||||
'shared.hint': "多人共建的片单:每位成员都可以添加或移除作品。",
|
||||
'shared.new': "新建共享片单",
|
||||
|
||||
+1
-6
@@ -1,5 +1,5 @@
|
||||
import { t } from '../i18n'
|
||||
import type { BackupFile, Criteria, CustomList, MediaItem, MediaType, NotifPrefs, Settings, TopCategory, TopEntry, WatchStatus } from '../types'
|
||||
import type { BackupFile, Criteria, CustomList, MediaItem, MediaType, Settings, TopCategory, TopEntry, WatchStatus } from '../types'
|
||||
import { ALL_TOP_CATEGORIES, MEDIA_TYPES, STATUSES } from './constants'
|
||||
import { episodeCap } from './franchise'
|
||||
import { convertLegacyBackup, isLegacyBackup } from './legacyImport'
|
||||
@@ -154,11 +154,6 @@ export function normalizeSettings(raw: unknown): Partial<Settings> | undefined {
|
||||
if (Array.isArray(raw.topCategories)) out.topCategories = ALL_TOP_CATEGORIES.filter((c) => (raw.topCategories as unknown[]).includes(c))
|
||||
if (isHexColor(raw.accentColor)) out.accentColor = raw.accentColor.toLowerCase()
|
||||
if (raw.themeMode === 'auto' || raw.themeMode === 'light' || raw.themeMode === 'dark' || raw.themeMode === 'night' || raw.themeMode === 'starfield') out.themeMode = raw.themeMode
|
||||
if (isPlainObject(raw.notifPrefs)) {
|
||||
const np: NotifPrefs = {}
|
||||
for (const k of ['episodes', 'follows', 'accepted', 'reactions', 'comments', 'lists'] as const) if (typeof raw.notifPrefs[k] === 'boolean') np[k] = raw.notifPrefs[k] as boolean
|
||||
out.notifPrefs = np
|
||||
}
|
||||
const challenges = normalizeChallenges(raw.challenges)
|
||||
if (challenges) out.challenges = challenges
|
||||
if (Array.isArray(raw.statsHiddenMonths)) {
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
import { t } from '../../i18n'
|
||||
import { cleanText, isPlainObject, safeIso } from '../security'
|
||||
import { cloudFetch } from './api'
|
||||
import { safeMediaUrl } from './social'
|
||||
|
||||
/** Notifications (cloche) : abonnements, demandes acceptées, réactions reçues. */
|
||||
|
||||
export type NotificationKind =
|
||||
| 'follow_request'
|
||||
| 'follow_accepted'
|
||||
| 'new_follower'
|
||||
| 'reaction'
|
||||
| 'new_episode'
|
||||
| 'new_season'
|
||||
| 'review_comment'
|
||||
| 'shared_list_invite'
|
||||
|
||||
export interface AppNotification {
|
||||
id: number
|
||||
kind: NotificationKind
|
||||
created_at: string
|
||||
read_at: string | null
|
||||
emoji: string | null
|
||||
item_id: string | null
|
||||
/** Numéro du dernier épisode sorti (épisodes) */
|
||||
episode: number | null
|
||||
/** Nombre de nouveaux épisodes (épisodes) */
|
||||
ep_count: number | null
|
||||
actor: { username: string; display_name: string; avatar_url: string | null } | null
|
||||
/** Titre de la fiche concernée (réactions, commentaires, épisodes) ou nom de la liste partagée */
|
||||
title: string | null
|
||||
/** Invitation à une liste partagée : en attente, acceptée, ou plus valable (null) */
|
||||
invite_status: 'pending' | 'accepted' | null
|
||||
}
|
||||
|
||||
/** Épisode/saison à signaler (envoyé après la vérification des sorties). */
|
||||
export interface EpisodeNotice {
|
||||
item_id: string
|
||||
kind: 'new_episode' | 'new_season'
|
||||
/** Dernier épisode sorti */
|
||||
episode: number
|
||||
/** Nombre de nouveaux épisodes */
|
||||
count: number
|
||||
}
|
||||
|
||||
/** Enregistre les nouveaux épisodes des séries suivies (dédoublonné côté serveur). Renvoie le nombre créé. */
|
||||
export async function addEpisodeNotifications(list: EpisodeNotice[]): Promise<number> {
|
||||
if (!list.length) return 0
|
||||
try {
|
||||
const n = await rpc<number>('add_episode_notifications', { p_list: list })
|
||||
return typeof n === 'number' ? n : 0
|
||||
} catch {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
async function rpc<T>(name: string, args: Record<string, unknown> = {}): Promise<T> {
|
||||
const res = await cloudFetch(`/rest/v1/rpc/${name}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(args),
|
||||
})
|
||||
if (!res.ok) throw new Error(t('social.err.server', { status: res.status }))
|
||||
return res.json() as Promise<T>
|
||||
}
|
||||
|
||||
const KINDS: NotificationKind[] = ['follow_request', 'follow_accepted', 'new_follower', 'reaction', 'new_episode', 'new_season', 'review_comment', 'shared_list_invite']
|
||||
const num = (v: unknown) => (typeof v === 'number' && Number.isFinite(v) ? v : null)
|
||||
|
||||
/** Réponse du serveur relue champ par champ (adresses d'images comprises), comme pour les profils. */
|
||||
function toNotification(v: unknown): AppNotification | null {
|
||||
if (!isPlainObject(v) || typeof v.id !== 'number' || !KINDS.includes(v.kind as NotificationKind)) return null
|
||||
const created = safeIso(v.created_at)
|
||||
if (!created) return null
|
||||
const a = isPlainObject(v.actor) ? v.actor : null
|
||||
const username = a && typeof a.username === 'string' && /^[a-z0-9_]{3,20}$/.test(a.username) ? a.username : null
|
||||
return {
|
||||
id: v.id,
|
||||
kind: v.kind as NotificationKind,
|
||||
created_at: created,
|
||||
read_at: safeIso(v.read_at) ?? null,
|
||||
emoji: cleanText(v.emoji, 8) ?? null,
|
||||
item_id: cleanText(v.item_id, 64) ?? null,
|
||||
episode: num(v.episode),
|
||||
ep_count: num(v.ep_count),
|
||||
actor: username ? { username, display_name: cleanText(a!.display_name, 40) ?? username, avatar_url: safeMediaUrl(a!.avatar_url) ?? null } : null,
|
||||
title: cleanText(v.title, 300) ?? null,
|
||||
invite_status: v.invite_status === 'pending' || v.invite_status === 'accepted' ? v.invite_status : null,
|
||||
}
|
||||
}
|
||||
|
||||
export const listNotifications = async (offset = 0): Promise<AppNotification[]> => {
|
||||
const raw = await rpc<unknown>('get_notifications', { p_offset: offset })
|
||||
return (Array.isArray(raw) ? raw : []).map(toNotification).filter((n): n is AppNotification => n !== null)
|
||||
}
|
||||
|
||||
export async function unreadCount(): Promise<number> {
|
||||
try {
|
||||
const n = await rpc<number>('notifications_unread')
|
||||
return typeof n === 'number' ? n : 0
|
||||
} catch {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
export async function markNotificationsRead(): Promise<void> {
|
||||
await rpc('mark_notifications_read')
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import { cloudFetch } from './api'
|
||||
* En cas de conflit, la modification la plus récente gagne (vérifié aussi par la base).
|
||||
*/
|
||||
|
||||
export type SyncedSettings = Pick<Settings, 'ratingScale' | 'topCategories' | 'accentColor' | 'themeMode' | 'notifPrefs' | 'challenges' | 'statsHiddenMonths'>
|
||||
export type SyncedSettings = Pick<Settings, 'ratingScale' | 'topCategories' | 'accentColor' | 'themeMode' | 'challenges' | 'statsHiddenMonths'>
|
||||
|
||||
export interface SyncHooks {
|
||||
getLists: () => CustomList[]
|
||||
|
||||
+12
-201
@@ -1,210 +1,21 @@
|
||||
import { getLang } from '../i18n'
|
||||
import { cloudFetch } from './cloud/api'
|
||||
import { cloudEnabled } from './cloud/config'
|
||||
import { detectPlatform } from './pwa'
|
||||
import { scopedKey } from './scope'
|
||||
import { isPlainObject, storageGet, storageSet } from './security'
|
||||
|
||||
/**
|
||||
* Notifications push (Web Push) sur cet appareil :
|
||||
* - la permission n'est demandée qu'au clic sur l'interrupteur (jamais au chargement) ;
|
||||
* - l'abonnement du navigateur est enregistré sur le serveur (register_push_subscription) ;
|
||||
* - le serveur envoie ensuite les notifications de la cloche, même app fermée.
|
||||
* Les notifications ont été retirées de l'app (novembre 2026).
|
||||
* Un appareil qui les avait activées garde un abonnement dans son navigateur : on le résilie
|
||||
* au lancement, pour qu'il ne reste rien. Le serveur, lui, n'en envoie plus aucune.
|
||||
*/
|
||||
|
||||
export type PushSupport = 'ok' | 'unsupported' | 'needs-install'
|
||||
export type PushState = 'unsupported' | 'needs-install' | 'denied' | 'off' | 'on'
|
||||
|
||||
export class PushError extends Error {
|
||||
constructor(public code: 'denied' | 'not-ready' | 'failed') {
|
||||
super(code)
|
||||
}
|
||||
}
|
||||
|
||||
/** Dernier enregistrement réussi (par compte) */
|
||||
const storeKey = () => scopedKey('push')
|
||||
const REFRESH_MS = 7 * 24 * 3600 * 1000
|
||||
|
||||
function isStandalone(): boolean {
|
||||
return window.matchMedia?.('(display-mode: standalone)').matches || (navigator as { standalone?: boolean }).standalone === true
|
||||
}
|
||||
|
||||
/** Ce navigateur sait-il recevoir des notifications push ? (iPhone : seulement l'app installée, iOS 16.4+) */
|
||||
export function pushSupport(): PushSupport {
|
||||
if (!cloudEnabled || typeof window === 'undefined') return 'unsupported'
|
||||
const api = 'serviceWorker' in navigator && 'PushManager' in window && 'Notification' in window
|
||||
if (detectPlatform() === 'ios' && (!isStandalone() || !api)) return 'needs-install'
|
||||
return api ? 'ok' : 'unsupported'
|
||||
}
|
||||
|
||||
function withTimeout<T>(p: Promise<T>, ms: number): Promise<T> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const timer = setTimeout(() => reject(new PushError('failed')), ms)
|
||||
p.then(
|
||||
(v) => {
|
||||
clearTimeout(timer)
|
||||
resolve(v)
|
||||
},
|
||||
(e) => {
|
||||
clearTimeout(timer)
|
||||
reject(e)
|
||||
},
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
/** Service worker actif (absent en mode développement : on n'attend pas indéfiniment). */
|
||||
const registration = () => withTimeout(navigator.serviceWorker.ready, 8000)
|
||||
|
||||
async function currentSubscription(): Promise<PushSubscription | null> {
|
||||
const reg = await navigator.serviceWorker.getRegistration()
|
||||
return (await reg?.pushManager.getSubscription()) ?? null
|
||||
}
|
||||
|
||||
export async function getPushState(): Promise<PushState> {
|
||||
const support = pushSupport()
|
||||
if (support !== 'ok') return support
|
||||
if (Notification.permission === 'denied') return 'denied'
|
||||
if (Notification.permission !== 'granted') return 'off'
|
||||
export async function dropPushSubscription(): Promise<void> {
|
||||
try {
|
||||
return (await currentSubscription()) ? 'on' : 'off'
|
||||
if (!('serviceWorker' in navigator) || !('PushManager' in window)) return
|
||||
const reg = await navigator.serviceWorker.getRegistration()
|
||||
const sub = await reg?.pushManager.getSubscription()
|
||||
await sub?.unsubscribe()
|
||||
} catch {
|
||||
return 'off'
|
||||
/* rien à faire */
|
||||
}
|
||||
}
|
||||
|
||||
function b64urlToBytes(s: string): Uint8Array<ArrayBuffer> {
|
||||
const b64 = s.replace(/-/g, '+').replace(/_/g, '/')
|
||||
const bin = atob(b64 + '='.repeat((4 - (b64.length % 4)) % 4))
|
||||
const out = new Uint8Array(new ArrayBuffer(bin.length))
|
||||
for (let i = 0; i < bin.length; i++) out[i] = bin.charCodeAt(i)
|
||||
return out
|
||||
}
|
||||
|
||||
function bytesToB64url(buf: ArrayBuffer | null): string {
|
||||
if (!buf) return ''
|
||||
let s = ''
|
||||
for (const b of new Uint8Array(buf)) s += String.fromCharCode(b)
|
||||
return btoa(s).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '')
|
||||
}
|
||||
|
||||
/** Clé publique VAPID du serveur (la clé privée ne quitte jamais Supabase). */
|
||||
async function serverKey(): Promise<string> {
|
||||
let res: Response
|
||||
// Ancien état local des notifications push
|
||||
try {
|
||||
res = await cloudFetch('/functions/v1/send-push')
|
||||
for (const k of Object.keys(localStorage)) if (/^azuucine:(?:[^:]+:)?push$/.test(k)) localStorage.removeItem(k)
|
||||
} catch {
|
||||
throw new PushError('failed')
|
||||
/* stockage indisponible */
|
||||
}
|
||||
if (res.status === 404 || res.status === 503) throw new PushError('not-ready')
|
||||
if (!res.ok) throw new PushError('failed')
|
||||
const body = (await res.json().catch(() => null)) as unknown
|
||||
const key = isPlainObject(body) && typeof body.publicKey === 'string' ? body.publicKey : ''
|
||||
if (!/^B[A-Za-z0-9_-]{86}$/.test(key)) throw new PushError('not-ready')
|
||||
return key
|
||||
}
|
||||
|
||||
/** Petit libellé de l'appareil (« Chrome · Android ») pour s'y retrouver côté serveur. */
|
||||
function deviceLabel(): string {
|
||||
const ua = navigator.userAgent
|
||||
const browser = /Edg\//.test(ua) ? 'Edge' : /Firefox\//.test(ua) ? 'Firefox' : /Chrome\//.test(ua) ? 'Chrome' : /Safari\//.test(ua) ? 'Safari' : 'Web'
|
||||
const p = detectPlatform()
|
||||
const os = p === 'ios' ? 'iOS' : p === 'android' ? 'Android' : /Windows/.test(ua) ? 'Windows' : /Mac/.test(ua) ? 'macOS' : /Linux|CrOS/.test(ua) ? 'Linux' : ''
|
||||
return os ? `${browser} · ${os}` : browser
|
||||
}
|
||||
|
||||
async function register(sub: PushSubscription): Promise<void> {
|
||||
const lang = getLang()
|
||||
const res = await cloudFetch('/rest/v1/rpc/register_push_subscription', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
p_endpoint: sub.endpoint,
|
||||
p_p256dh: bytesToB64url(sub.getKey('p256dh')),
|
||||
p_auth: bytesToB64url(sub.getKey('auth')),
|
||||
p_lang: lang,
|
||||
p_ua: deviceLabel(),
|
||||
}),
|
||||
})
|
||||
if (res.status === 404) throw new PushError('not-ready')
|
||||
if (!res.ok) throw new PushError('failed')
|
||||
storageSet(storeKey(), JSON.stringify({ endpoint: sub.endpoint, lang, at: Date.now() }))
|
||||
}
|
||||
|
||||
/** Active les notifications push sur cet appareil. À appeler uniquement depuis un clic. */
|
||||
export async function enablePush(): Promise<PushState> {
|
||||
const support = pushSupport()
|
||||
if (support !== 'ok') return support
|
||||
const permission = await Notification.requestPermission()
|
||||
if (permission === 'denied') throw new PushError('denied')
|
||||
if (permission !== 'granted') return 'off'
|
||||
|
||||
const key = await serverKey()
|
||||
const reg = await registration()
|
||||
let sub = await reg.pushManager.getSubscription()
|
||||
// Abonnement créé avec une autre clé serveur (clés VAPID changées) : on le refait
|
||||
if (sub && sub.options.applicationServerKey && bytesToB64url(sub.options.applicationServerKey) !== key) {
|
||||
await sub.unsubscribe().catch(() => false)
|
||||
sub = null
|
||||
}
|
||||
if (!sub) {
|
||||
try {
|
||||
sub = await reg.pushManager.subscribe({ userVisibleOnly: true, applicationServerKey: b64urlToBytes(key) })
|
||||
} catch {
|
||||
throw new PushError(Notification.permission === 'denied' ? 'denied' : 'failed')
|
||||
}
|
||||
}
|
||||
try {
|
||||
await register(sub)
|
||||
} catch (e) {
|
||||
await sub.unsubscribe().catch(() => false)
|
||||
throw e instanceof PushError ? e : new PushError('failed')
|
||||
}
|
||||
return 'on'
|
||||
}
|
||||
|
||||
/** Coupe les notifications push sur cet appareil (et retire l'appareil du serveur). */
|
||||
export async function disablePush(): Promise<void> {
|
||||
if (pushSupport() !== 'ok') return
|
||||
const sub = await currentSubscription().catch(() => null)
|
||||
storageSet(storeKey(), null)
|
||||
if (!sub) return
|
||||
try {
|
||||
await cloudFetch('/rest/v1/rpc/unregister_push_subscription', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ p_endpoint: sub.endpoint }),
|
||||
})
|
||||
} catch {
|
||||
/* hors-ligne : le serveur oubliera l'abonnement au premier envoi refusé (410) */
|
||||
}
|
||||
await sub.unsubscribe().catch(() => false)
|
||||
}
|
||||
|
||||
/** Désabonne seulement le navigateur (compte supprimé : le serveur a déjà tout effacé). */
|
||||
export async function forgetPushLocally(): Promise<void> {
|
||||
storageSet(storeKey(), null)
|
||||
if (pushSupport() !== 'ok') return
|
||||
const sub = await currentSubscription().catch(() => null)
|
||||
await sub?.unsubscribe().catch(() => false)
|
||||
}
|
||||
|
||||
/**
|
||||
* Au lancement : réenregistre l'abonnement si le navigateur l'a renouvelé, si la langue a changé,
|
||||
* ou une fois par semaine (le serveur garde ainsi les appareils réellement utilisés).
|
||||
*/
|
||||
export async function keepPushFresh(): Promise<void> {
|
||||
if (pushSupport() !== 'ok' || Notification.permission !== 'granted' || !navigator.onLine) return
|
||||
const sub = await currentSubscription().catch(() => null)
|
||||
if (!sub) return
|
||||
let saved: unknown = null
|
||||
try {
|
||||
saved = JSON.parse(storageGet(storeKey()) ?? 'null')
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
// Pas d'enregistrement connu : l'abonnement n'a pas été créé par ce compte, on n'y touche pas
|
||||
if (!isPlainObject(saved)) return
|
||||
const fresh = saved.endpoint === sub.endpoint && saved.lang === getLang() && typeof saved.at === 'number' && Date.now() - saved.at < REFRESH_MS
|
||||
if (!fresh) await register(sub).catch(() => {})
|
||||
}
|
||||
+2
-30
@@ -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} />
|
||||
|
||||
@@ -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">
|
||||
|
||||
+3
-7
@@ -10,7 +10,6 @@ import { createSync, type SyncEngine, type SyncStatus } from './lib/cloud/sync'
|
||||
import { deleteDatabase, readOtherDatabase } from './lib/db'
|
||||
import { cloudFetch } from './lib/cloud/api'
|
||||
import { signOut } from './lib/cloud/auth'
|
||||
import { disablePush, forgetPushLocally } from './lib/push'
|
||||
import { dbNameFor, scopedKey } from './lib/scope'
|
||||
import { isPlainObject, LIMITS, readStorage, storageGet, storageSet } from './lib/security'
|
||||
import { mediaDB, requestPersistentStorage } from './lib/db'
|
||||
@@ -207,8 +206,8 @@ export function MediaProvider({
|
||||
getLists: () => listsRef.current,
|
||||
applyLists: (next) => setLists(() => next, true),
|
||||
getSettings: () => {
|
||||
const { ratingScale, topCategories, accentColor, themeMode, notifPrefs, challenges, statsHiddenMonths } = settingsRef.current
|
||||
return { ratingScale, topCategories, accentColor, themeMode, notifPrefs, challenges, statsHiddenMonths }
|
||||
const { ratingScale, topCategories, accentColor, themeMode, challenges, statsHiddenMonths } = settingsRef.current
|
||||
return { ratingScale, topCategories, accentColor, themeMode, challenges, statsHiddenMonths }
|
||||
},
|
||||
applySettings: (patch) => updateSettingsRef.current(patch, true),
|
||||
itemsChanged: () => void reloadItems(),
|
||||
@@ -249,7 +248,7 @@ export function MediaProvider({
|
||||
}, [settings.themeMode])
|
||||
|
||||
const updateSettings = useCallback((patch: Partial<Settings>, silent = false) => {
|
||||
if (!silent && syncRef.current && ('ratingScale' in patch || 'topCategories' in patch || 'accentColor' in patch || 'themeMode' in patch || 'notifPrefs' in patch || 'challenges' in patch || 'statsHiddenMonths' in patch)) syncRef.current.markSettings()
|
||||
if (!silent && syncRef.current && ('ratingScale' in patch || 'topCategories' in patch || 'accentColor' in patch || 'themeMode' in patch || 'challenges' in patch || 'statsHiddenMonths' in patch)) syncRef.current.markSettings()
|
||||
setSettings((prev) => {
|
||||
const next = { ...prev, ...patch }
|
||||
try {
|
||||
@@ -502,8 +501,6 @@ export function MediaProvider({
|
||||
if (engine && navigator.onLine) await engine.syncNow()
|
||||
if (!force && engine && engine.status().pending > 0) return 'pending'
|
||||
engine?.stop()
|
||||
// Cet appareil ne doit plus recevoir les notifications push de ce compte
|
||||
await disablePush().catch(() => {})
|
||||
await wipeAccountFromDevice(userId)
|
||||
await signOut()
|
||||
return 'done'
|
||||
@@ -516,7 +513,6 @@ export function MediaProvider({
|
||||
})
|
||||
if (!res.ok) throw new Error(res.status === 429 ? t('account.err.deleteRate') : t('account.err.delete'))
|
||||
syncRef.current?.stop()
|
||||
await forgetPushLocally().catch(() => {})
|
||||
await wipeAccountFromDevice(userId)
|
||||
await signOut()
|
||||
},
|
||||
|
||||
@@ -109,8 +109,6 @@ export interface Settings {
|
||||
accentColor: string
|
||||
/** Apparence (clair, sombre, nuit, bleu nuit étoilé). « auto » suit le navigateur. */
|
||||
themeMode: ThemeMode
|
||||
/** Notifications reçues (true par défaut si absent). Nécessite un compte. */
|
||||
notifPrefs?: NotifPrefs
|
||||
/** Défis de visionnage (synchronisés avec les réglages, privés). */
|
||||
challenges?: Challenge[]
|
||||
/** Mois masqués dans la courbe des stats (AAAA-MM), ex. le mois où j'ai tout ajouté d'un coup. */
|
||||
@@ -133,22 +131,6 @@ export interface Challenge {
|
||||
archived?: boolean
|
||||
}
|
||||
|
||||
/** Types de notifications que l'on choisit de recevoir (true par défaut). */
|
||||
export interface NotifPrefs {
|
||||
/** Nouveaux épisodes / saisons des séries suivies */
|
||||
episodes?: boolean
|
||||
/** Nouveaux abonnés et demandes d'abonnement */
|
||||
follows?: boolean
|
||||
/** Demandes d'abonnement acceptées */
|
||||
accepted?: boolean
|
||||
/** Réactions reçues sur mes avis */
|
||||
reactions?: boolean
|
||||
/** Commentaires reçus sous mes avis */
|
||||
comments?: boolean
|
||||
/** Invitations à des listes partagées */
|
||||
lists?: boolean
|
||||
}
|
||||
|
||||
export interface CustomList {
|
||||
id: string
|
||||
name: string
|
||||
|
||||
Reference in new issue
Block a user