1 parent
eaad6f1e77
commit
a5da756803
51 files changed
+537
-672
No files matched your search
@@ -10,22 +10,29 @@ on:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: github.ref == 'refs/heads/main'
|
||||
runs-on: azuucine
|
||||
env:
|
||||
REQUIRE_SUPABASE: '1' # le build échoue si VITE_SUPABASE_* manquent (garde dans vite.config.ts)
|
||||
VITE_SUPABASE_URL: ${{ vars.VITE_SUPABASE_URL }}
|
||||
VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }}
|
||||
GIT_TOKEN: ${{ github.token }}
|
||||
steps:
|
||||
- name: Récupérer le code
|
||||
# Le jeton n'est visible que de cette étape (pas des scripts npm qui suivent)
|
||||
env:
|
||||
GIT_TOKEN: ${{ github.token }}
|
||||
REF: ${{ github.ref_name }}
|
||||
REPO_URL: ${{ github.server_url }}/${{ github.repository }}.git
|
||||
run: |
|
||||
rm -rf src
|
||||
AUTH=$(printf 'x-access-token:%s' "$GIT_TOKEN" | base64 -w0)
|
||||
git -c http.extraheader="AUTHORIZATION: basic $AUTH" clone --depth 1 --branch "${{ github.ref_name }}" \
|
||||
"${{ github.server_url }}/${{ github.repository }}.git" src
|
||||
git -c http.extraheader="AUTHORIZATION: basic $AUTH" clone --depth 1 --branch "$REF" "$REPO_URL" src
|
||||
- name: Installer les dépendances
|
||||
run: cd src && npm ci --no-audit --no-fund
|
||||
- name: Construire
|
||||
env:
|
||||
VITE_SUPABASE_URL: ${{ vars.VITE_SUPABASE_URL }}
|
||||
VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }}
|
||||
run: cd src && npm run build
|
||||
- name: Publier (atomique, 3 versions conservées)
|
||||
run: cd src && bash deploy/release.sh dist "${{ github.sha }}"
|
||||
env:
|
||||
SHA: ${{ github.sha }}
|
||||
run: cd src && bash deploy/release.sh dist "$SHA"
|
||||
@@ -1,9 +0,0 @@
|
||||
# Netlify construit le site lui-même : `npm run build`, puis publie le dossier dist.
|
||||
# Les deux variables VITE_SUPABASE_* (publiques) sont réglées dans Netlify → Environment variables.
|
||||
# La clé TMDB n'est JAMAIS ici : elle reste un secret Supabase.
|
||||
[build]
|
||||
command = "npm run build"
|
||||
publish = "dist"
|
||||
|
||||
[build.environment]
|
||||
NODE_VERSION = "22"
|
||||
@@ -1,5 +1,5 @@
|
||||
import { t } from '../i18n'
|
||||
import { useEffect } from 'react'
|
||||
import { useEscape } from '../lib/escape'
|
||||
|
||||
interface Props {
|
||||
open: boolean
|
||||
@@ -12,12 +12,7 @@ interface Props {
|
||||
|
||||
/** Fenêtre « Êtes-vous sûr ? » intégrée à l'app (plus fiable que window.confirm sur mobile). */
|
||||
export default function ConfirmDialog({ open, title, message, confirmLabel = t('common.confirm'), onConfirm, onCancel }: Props) {
|
||||
useEffect(() => {
|
||||
if (!open) return
|
||||
const onKey = (e: KeyboardEvent) => e.key === 'Escape' && onCancel()
|
||||
window.addEventListener('keydown', onKey)
|
||||
return () => window.removeEventListener('keydown', onKey)
|
||||
}, [open, onCancel])
|
||||
useEscape(onCancel, open)
|
||||
|
||||
if (!open) return null
|
||||
return (
|
||||
|
||||
@@ -39,13 +39,14 @@ export default function DatabaseSearch({ onPick, initialQuery = '', currentExter
|
||||
// Recherche avec un petit délai pendant la frappe
|
||||
useEffect(() => {
|
||||
const q = query.trim()
|
||||
// Toute réponse d'une recherche précédente devient caduque
|
||||
const id = ++requestId.current
|
||||
setError(undefined)
|
||||
if (q.length < 2) {
|
||||
setResults([])
|
||||
setLoading(false)
|
||||
return
|
||||
}
|
||||
const id = ++requestId.current
|
||||
setLoading(true)
|
||||
const timer = setTimeout(async () => {
|
||||
try {
|
||||
|
||||
@@ -23,7 +23,13 @@ export default function EpisodeList({ form, onChange }: Props) {
|
||||
const { settings } = useMedia()
|
||||
const seasons = form.seasons
|
||||
const pos = seasonPosition(form)
|
||||
const [viewSeason, setViewSeason] = useState(pos?.season ?? 1)
|
||||
const [picked, setViewSeason] = useState(pos?.season ?? 1)
|
||||
// La saison affichée suit la progression (bouton « Vu : S2 · É1 » de l'en-tête) et reste dans les limites
|
||||
const current = pos?.season
|
||||
useEffect(() => {
|
||||
if (current) setViewSeason(current)
|
||||
}, [current])
|
||||
const viewSeason = seasons ? Math.min(Math.max(1, picked), seasons.length) : 1
|
||||
const [episodes, setEpisodes] = useState<EpisodeInfo[]>()
|
||||
const [loading, setLoading] = useState(false)
|
||||
const listRef = useRef<HTMLDivElement>(null)
|
||||
@@ -33,7 +39,7 @@ export default function EpisodeList({ form, onChange }: Props) {
|
||||
|
||||
// Taille de la saison affichée (ou de toute la série si on ne connaît pas le découpage)
|
||||
const before = seasons ? episodesBeforeSeason(seasons, viewSeason) : 0
|
||||
const size = seasons ? seasons[viewSeason - 1] : Math.min(episodeCap(form) ?? 0, MAX_GENERIC)
|
||||
const size = seasons ? (seasons[viewSeason - 1] ?? 0) : Math.min(episodeCap(form) ?? 0, MAX_GENERIC)
|
||||
|
||||
useEffect(() => {
|
||||
if (!isTmdb || !navigator.onLine) return setEpisodes(undefined)
|
||||
|
||||
@@ -15,7 +15,7 @@ export function nextEpisodeLabel(item: MediaItem): string | undefined {
|
||||
if (cap && item.episodesWatched >= cap) return undefined
|
||||
const pos = seasonPosition({ ...item, episodesWatched: item.episodesWatched + 1, season: undefined })
|
||||
const ep = t('episodes.short', { n: pos ? pos.episode : item.episodesWatched + 1 })
|
||||
return pos ? `S${pos.season} · ${ep}` : ep
|
||||
return pos ? `${t('episodes.seasonShort', { n: pos.season })} · ${ep}` : ep
|
||||
}
|
||||
|
||||
/** Grande bannière de l'accueil : défile entre les titres que je regarde en ce moment (ou le prochain à voir). */
|
||||
|
||||
@@ -9,18 +9,19 @@ import Poster from './Poster'
|
||||
import { RatingBadge } from './Rating'
|
||||
|
||||
function Progress({ item }: { item: MediaItem }) {
|
||||
if (!TYPE_BY_VALUE[item.type].episodic || (!item.episodesWatched && !item.episodesTotal)) return null
|
||||
const cap = episodeCap(item)
|
||||
if (!TYPE_BY_VALUE[item.type].episodic || (!item.episodesWatched && !cap)) return null
|
||||
// Série en plusieurs saisons : progression dans la saison en cours
|
||||
const pos = seasonPosition(item)
|
||||
const done = pos ? pos.episode : item.episodesWatched
|
||||
const size = pos ? pos.size : item.episodesTotal
|
||||
const size = pos ? pos.size : cap
|
||||
const pct = size ? Math.min(100, (done / size) * 100) : 0
|
||||
const season = pos?.season ?? item.season
|
||||
return (
|
||||
<div className="mt-1.5">
|
||||
<div className="flex justify-between text-[10.5px] text-ink-3">
|
||||
<span>
|
||||
{season ? `S${season} · ` : ''}{t('card.ep', { n: done })}
|
||||
{season ? `${t('episodes.seasonShort', { n: season })} · ` : ''}{t('card.ep', { n: done })}
|
||||
{size ? `/${size}` : ''}
|
||||
</span>
|
||||
</div>
|
||||
@@ -72,37 +73,3 @@ export function MediaCard({ item, onOpen }: { item: MediaItem; onOpen: (item: Me
|
||||
</article>
|
||||
)
|
||||
}
|
||||
|
||||
/** Ligne horizontale (accueil : « En cours »), avec compteur +1. */
|
||||
export function MediaRow({ item, onOpen }: { item: MediaItem; onOpen: (item: MediaItem) => void }) {
|
||||
const { settings, incrementEpisode } = useMedia()
|
||||
const episodic = TYPE_BY_VALUE[item.type].episodic
|
||||
const done = !!episodeCap(item) && item.episodesWatched >= episodeCap(item)!
|
||||
|
||||
return (
|
||||
<article className="card flex items-center gap-3.5 p-3">
|
||||
<button onClick={() => onOpen(item)} className="flex min-w-0 flex-1 items-center gap-3 text-left">
|
||||
<div className="w-14 shrink-0">
|
||||
<Poster src={item.poster} title={item.title} />
|
||||
</div>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex items-center gap-2">
|
||||
<TypeBadge item={item} />
|
||||
<RatingBadge value={item.rating} scale={settings.ratingScale} />
|
||||
</div>
|
||||
<h3 className="mt-1.5 truncate text-[15px] font-semibold leading-tight">{item.title}</h3>
|
||||
{episodic ? <Progress item={item} /> : <StatusPill status={item.status} />}
|
||||
</div>
|
||||
</button>
|
||||
{episodic && !done && (
|
||||
<button
|
||||
onClick={() => incrementEpisode(item.id)}
|
||||
className="flex h-10 shrink-0 items-center gap-0.5 rounded-full border border-accent px-3.5 text-sm text-accent transition-colors active:bg-accent-fill active:text-on-accent"
|
||||
aria-label={t('card.plusOne', { title: item.title })}
|
||||
>
|
||||
<Plus size={14} strokeWidth={2.5} />1
|
||||
</button>
|
||||
)}
|
||||
</article>
|
||||
)
|
||||
}
|
||||
@@ -209,7 +209,7 @@ export default function MediaForm({ item, onClose, onGoToSettings, onOpenItem }:
|
||||
if (cap && form.episodesWatched >= cap) return { label: t('hero.allSeen'), done: true }
|
||||
const nextPos = seasonPosition({ ...form, episodesWatched: form.episodesWatched + 1, season: undefined })
|
||||
const ep = t('episodes.short', { n: nextPos ? nextPos.episode : form.episodesWatched + 1 })
|
||||
const label = t('hero.seenEp', { ep: nextPos ? `S${nextPos.season} · ${ep}` : ep })
|
||||
const label = t('hero.seenEp', { ep: nextPos ? `${t('episodes.seasonShort', { n: nextPos.season })} · ${ep}` : ep })
|
||||
return { label, onClick: () => setForm((f) => withEpisodes(f, f.episodesWatched + 1)) }
|
||||
}
|
||||
if (form.status === 'termine') return { label: t('hero.seen'), done: true }
|
||||
@@ -259,13 +259,8 @@ export default function MediaForm({ item, onClose, onGoToSettings, onOpenItem }:
|
||||
return next
|
||||
})
|
||||
|
||||
const changeEpisodes = (delta: number) =>
|
||||
setForm((f) => {
|
||||
let n = Math.max(0, f.episodesWatched + delta)
|
||||
const cap = episodeCap(f)
|
||||
if (cap) n = Math.min(n, cap)
|
||||
return { ...f, episodesWatched: n }
|
||||
})
|
||||
// Même règles que la liste d'épisodes : le statut et les dates suivent
|
||||
const changeEpisodes = (delta: number) => setForm((f) => withEpisodes(f, f.episodesWatched + delta))
|
||||
|
||||
const onPickImage = async (file?: File) => {
|
||||
if (!file) return
|
||||
@@ -468,7 +463,8 @@ export default function MediaForm({ item, onClose, onGoToSettings, onOpenItem }:
|
||||
{/* Épisodes / durée */}
|
||||
{typeInfo.episodic ? (
|
||||
<Section title={t('form.episodes')}>
|
||||
{form.seasons || form.episodesTotal ? (
|
||||
{/* Liste d'épisodes pour une fiche liée (TMDB / AniList) ; compteur + total modifiable pour une fiche manuelle */}
|
||||
{form.seasons || (form.externalId && form.episodesTotal) ? (
|
||||
<EpisodeList form={form} onChange={(n, season) => setForm((f) => withEpisodes(f, n, season))} />
|
||||
) : (
|
||||
<div className="card space-y-5 p-4">
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
import { locale, t } from '../i18n'
|
||||
import { Loader2, RefreshCw } from 'lucide-react'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { loadAiring, needsCheck, novelties, refreshAiring, saveAiring, trackable, type AiringCache } from '../lib/airing'
|
||||
import { formatDate, todayISO } from '../lib/utils'
|
||||
import { useMedia } from '../store'
|
||||
import type { MediaItem } from '../types'
|
||||
import Poster from './Poster'
|
||||
import { SectionTitle } from './ui'
|
||||
|
||||
const dayLabel = (iso: string) => {
|
||||
const d = new Date(iso + 'T12:00:00')
|
||||
const diff = Math.round((d.getTime() - new Date(todayISO() + 'T12:00:00').getTime()) / 86400000)
|
||||
if (diff <= 0) return t('time.today')
|
||||
if (diff === 1) return t('time.tomorrow')
|
||||
if (diff < 7) return d.toLocaleDateString(locale(), { weekday: 'long' })
|
||||
return t('time.onDate', { date: formatDate(iso) })
|
||||
}
|
||||
|
||||
/** Section « Nouveautés » de l'accueil : nouveaux épisodes et nouvelles saisons. */
|
||||
export default function NewEpisodes({ onOpen }: { onOpen: (item: MediaItem) => void }) {
|
||||
const { items, loading, settings, patchMany, update } = useMedia()
|
||||
const [cache, setCache] = useState<AiringCache>(loadAiring)
|
||||
const [checking, setChecking] = useState(false)
|
||||
const started = useRef(false)
|
||||
|
||||
const check = useCallback(
|
||||
async (force = false) => {
|
||||
setChecking(true)
|
||||
try {
|
||||
const next = await refreshAiring(items, loadAiring(), settings.tmdbKey, force)
|
||||
saveAiring(next)
|
||||
setCache(next)
|
||||
// Met à jour le nombre total d'épisodes des séries en cours si de nouveaux sont sortis
|
||||
const patches = trackable(items)
|
||||
.filter((i) => i.status !== 'termine' && next[i.id] && next[i.id].aired > (i.episodesTotal ?? 0))
|
||||
.map((i) => ({ id: i.id, patch: { episodesTotal: next[i.id].aired } }))
|
||||
if (patches.length) await patchMany(patches)
|
||||
} finally {
|
||||
setChecking(false)
|
||||
}
|
||||
},
|
||||
[items, settings.tmdbKey, patchMany],
|
||||
)
|
||||
|
||||
// Vérification automatique au plus toutes les 12 h, au lancement
|
||||
useEffect(() => {
|
||||
if (loading || started.current || !navigator.onLine) return
|
||||
started.current = true
|
||||
const c = loadAiring()
|
||||
if (trackable(items).some((i) => needsCheck(i, c))) void check()
|
||||
}, [loading, items, check])
|
||||
|
||||
const list = useMemo(() => novelties(items, cache), [items, cache])
|
||||
const tracked = trackable(items).length
|
||||
const hasAniList = trackable(items).some((i) => i.externalId!.startsWith('anilist:'))
|
||||
if (!tracked) return null
|
||||
|
||||
const resume = (item: MediaItem, aired: number) =>
|
||||
update(item.id, { status: 'en_cours', episodesTotal: aired, startDate: item.startDate ?? todayISO(), endDate: undefined })
|
||||
|
||||
return (
|
||||
<>
|
||||
<SectionTitle
|
||||
action={
|
||||
<button onClick={() => check(true)} disabled={checking} className="flex items-center gap-1.5 text-xs font-medium text-ink-3">
|
||||
{checking ? <Loader2 size={13} className="animate-spin" /> : <RefreshCw size={13} />}
|
||||
{checking ? t('settings.checking') : t('newEp.check')}
|
||||
</button>
|
||||
}
|
||||
>
|
||||
{t('newEp.title')}
|
||||
</SectionTitle>
|
||||
|
||||
{list.length === 0 ? (
|
||||
<p className="text-sm text-ink-3">
|
||||
{checking
|
||||
? t('newEp.checking')
|
||||
: !settings.tmdbKey && !hasAniList
|
||||
? t('newEp.needKey')
|
||||
: t('newEp.nothing', { count: tracked })}
|
||||
{!checking && !settings.tmdbKey && hasAniList && ` ${t('newEp.needKeyAlso')}`}
|
||||
</p>
|
||||
) : (
|
||||
<div className="no-scrollbar -mx-4 flex gap-3 overflow-x-auto px-4 pb-1">
|
||||
{list.map(({ item, info, unwatched, kind }) => (
|
||||
<div key={item.id} className="card flex w-64 shrink-0 gap-3 p-2.5">
|
||||
<button onClick={() => onOpen(item)} className="w-14 shrink-0">
|
||||
<Poster src={item.poster} title={item.title} />
|
||||
</button>
|
||||
<div className="flex min-w-0 flex-1 flex-col">
|
||||
<span className="eyebrow text-accent">
|
||||
{kind === 'new_season' ? t('newEp.newSeason') : kind === 'new_episodes' ? t('newEp.catchUp') : t('newEp.soon')}
|
||||
</span>
|
||||
<button onClick={() => onOpen(item)} className="mt-1 truncate text-left text-sm font-semibold">
|
||||
{item.title}
|
||||
</button>
|
||||
<span className="mt-0.5 text-xs text-ink-2">
|
||||
{kind === 'upcoming'
|
||||
? t('newEp.epWhen', { ep: info.next!.episode, when: dayLabel(info.next!.date) })
|
||||
: t('newEp.available', { count: unwatched })}
|
||||
</span>
|
||||
{kind !== 'upcoming' && info.next && (
|
||||
<span className="text-[11px] text-ink-3">
|
||||
{t('newEp.next', { ep: info.next.episode, when: dayLabel(info.next.date) })}
|
||||
</span>
|
||||
)}
|
||||
{kind === 'new_season' && (
|
||||
<button onClick={() => resume(item, info.aired)} className="mt-auto self-start pt-1.5 text-xs font-semibold text-accent">
|
||||
{t('newEp.resume')} →
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -3,14 +3,15 @@ import { cx } from '../lib/utils'
|
||||
|
||||
/** Affiche du média, ou une vignette sobre (aplat + initiale en serif) si aucune image. */
|
||||
export default function Poster({ src, title, className }: { src?: string; title: string; className?: string }) {
|
||||
const [broken, setBroken] = useState(false)
|
||||
if (src && !broken) {
|
||||
// On retient quelle image a échoué (une nouvelle affiche doit retenter)
|
||||
const [broken, setBroken] = useState<string>()
|
||||
if (src && broken !== src) {
|
||||
return (
|
||||
<img
|
||||
src={src}
|
||||
alt=""
|
||||
loading="lazy"
|
||||
onError={() => setBroken(true)}
|
||||
onError={() => setBroken(src)}
|
||||
className={cx('aspect-[2/3] w-full rounded-xl border border-line bg-surface-2 object-cover', className)}
|
||||
/>
|
||||
)
|
||||
|
||||
@@ -61,13 +61,14 @@ export function RatingInput({ value, onChange, scale, size = 'lg', label }: Inpu
|
||||
const stars = (value ?? 0) / 2
|
||||
const pick = (e: MouseEvent<HTMLButtonElement>, index: number) => {
|
||||
const rect = e.currentTarget.getBoundingClientRect()
|
||||
const half = e.clientX - rect.left < rect.width / 2
|
||||
// Clavier (Entrée / Espace) : pas de position de clic, on donne l'étoile entière
|
||||
const half = e.detail !== 0 && e.clientX - rect.left < rect.width / 2
|
||||
const next = (index + (half ? 0.5 : 1)) * 2
|
||||
onChange(next === value ? undefined : next) // retoucher la même valeur efface la note
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex items-center gap-1" role="group" aria-label={label ?? 'Note sur 5'}>
|
||||
<div className="flex items-center gap-1" role="group" aria-label={label ?? t('rating.outOf5')}>
|
||||
{Array.from({ length: 5 }, (_, i) => {
|
||||
const fill = Math.max(0, Math.min(1, stars - i))
|
||||
return (
|
||||
|
||||
@@ -3,6 +3,7 @@ import { locale, t } from '../i18n'
|
||||
import { Check, Dices, RotateCcw, X } from 'lucide-react'
|
||||
import { useEffect, useLayoutEffect, useMemo, useRef, useState, type TransitionEvent } from 'react'
|
||||
import { MEDIA_TYPES, TYPE_BY_VALUE } from '../lib/constants'
|
||||
import { episodeCap } from '../lib/franchise'
|
||||
import {
|
||||
buildPool,
|
||||
loadFilters,
|
||||
@@ -61,6 +62,8 @@ export default function Roulette({ onClose, onOpen }: Props) {
|
||||
const pending = useRef<MediaItem | undefined>(undefined)
|
||||
const spinningRef = useRef(false)
|
||||
const resultRef = useRef<MediaItem | undefined>(undefined)
|
||||
const timers = useRef<number[]>([])
|
||||
useEffect(() => () => timers.current.forEach((x) => clearTimeout(x)), [])
|
||||
resultRef.current = result
|
||||
|
||||
const xFor = (index: number, jitter = 0) => {
|
||||
@@ -115,12 +118,15 @@ export default function Roulette({ onClose, onOpen }: Props) {
|
||||
setAnimate(false)
|
||||
setOffset(xFor(2))
|
||||
// On place le rouleau au départ, puis on lance l'animation juste après
|
||||
window.setTimeout(() => {
|
||||
setAnimate(true)
|
||||
setOffset(xFor(TARGET, (Math.random() - 0.5) * (CARD - 30)))
|
||||
}, 40)
|
||||
// Filet de sécurité si l'événement de fin d'animation n'arrive pas (onglet en arrière-plan…)
|
||||
window.setTimeout(finishSpin, SPIN_MS + 400)
|
||||
timers.current.forEach((x) => clearTimeout(x))
|
||||
timers.current = [
|
||||
window.setTimeout(() => {
|
||||
setAnimate(true)
|
||||
setOffset(xFor(TARGET, (Math.random() - 0.5) * (CARD - 30)))
|
||||
}, 40),
|
||||
// Filet de sécurité si l'événement de fin d'animation n'arrive pas (onglet en arrière-plan…)
|
||||
window.setTimeout(finishSpin, SPIN_MS + 400),
|
||||
]
|
||||
}
|
||||
|
||||
const finishSpin = () => {
|
||||
@@ -214,7 +220,7 @@ export default function Roulette({ onClose, onOpen }: Props) {
|
||||
{result.year && <span>{result.year}</span>}
|
||||
<span>
|
||||
{TYPE_BY_VALUE[result.type].episodic
|
||||
? `${result.episodesTotal ? `${t('roulette.nEps', { n: result.episodesTotal })} · ` : ''}${t('roulette.perEp', { duration: formatDuration(sessionMinutes(result)) })}`
|
||||
? `${episodeCap(result) ? `${t('roulette.nEps', { n: episodeCap(result)! })} · ` : ''}${t('roulette.perEp', { duration: formatDuration(sessionMinutes(result)) })}`
|
||||
: formatDuration(sessionMinutes(result))}
|
||||
</span>
|
||||
{result.platform && <span>· {result.platform}</span>}
|
||||
@@ -222,8 +228,8 @@ export default function Roulette({ onClose, onOpen }: Props) {
|
||||
</div>
|
||||
{result.status === 'pause' && (
|
||||
<p className="mt-2 text-xs text-ink-2">
|
||||
{result.episodesTotal
|
||||
? t('roulette.stoppedAtOf', { ep: result.episodesWatched, total: result.episodesTotal })
|
||||
{episodeCap(result)
|
||||
? t('roulette.stoppedAtOf', { ep: result.episodesWatched, total: episodeCap(result)! })
|
||||
: t('roulette.stoppedAt', { ep: result.episodesWatched })}
|
||||
</p>
|
||||
)}
|
||||
|
||||
@@ -2,6 +2,7 @@ import { t } from '../i18n'
|
||||
import { Download, Share2, X } from 'lucide-react'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { shareImage } from '../lib/shareCard'
|
||||
import { useEscape } from '../lib/escape'
|
||||
|
||||
interface Props {
|
||||
blob: Blob
|
||||
@@ -28,11 +29,7 @@ export default function SharePreview({ blob, filename, title, onClose }: Props)
|
||||
setUrl(u)
|
||||
return () => URL.revokeObjectURL(u)
|
||||
}, [blob])
|
||||
useEffect(() => {
|
||||
const onKey = (e: KeyboardEvent) => e.key === 'Escape' && onClose()
|
||||
window.addEventListener('keydown', onKey)
|
||||
return () => window.removeEventListener('keydown', onKey)
|
||||
}, [onClose])
|
||||
useEscape(onClose)
|
||||
|
||||
const go = async () => {
|
||||
setBusy(true)
|
||||
|
||||
@@ -86,7 +86,7 @@ export default function TopFiveEditor({ category: initialCategory, onClose }: Pr
|
||||
<div className="flex-1 overflow-y-auto overscroll-contain">
|
||||
<div className="safe-bottom mx-auto max-w-2xl space-y-6 px-4 py-5 pb-16">
|
||||
<div className="no-scrollbar -mx-4 flex gap-2 overflow-x-auto px-4">
|
||||
{TOP_CATEGORIES.map((c) => (
|
||||
{TOP_CATEGORIES.filter((c) => c.value === category || settings.topCategories.includes(c.value)).map((c) => (
|
||||
<button key={c.value} onClick={() => switchCategory(c.value)} className={cx('chip py-1! text-[13px]', category === c.value && 'chip-on')}>
|
||||
{c.plural}
|
||||
</button>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Camera, ImagePlus, Loader2, Lock, Trash2 } from 'lucide-react'
|
||||
import { useRef, useState } from 'react'
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { deleteProfileImage, updateProfile, uploadProfileImage, USERNAME_RE, type ProfilePatch } from '../../lib/cloud/social'
|
||||
import { cropImageToJpeg } from '../../lib/image'
|
||||
@@ -22,6 +22,20 @@ export default function EditProfile({ onClose }: { onClose: () => void }) {
|
||||
const avatarInput = useRef<HTMLInputElement>(null)
|
||||
const bannerInput = useRef<HTMLInputElement>(null)
|
||||
|
||||
// Aperçus locaux : libérés dès qu'ils sont remplacés ou que la fenêtre se ferme
|
||||
useEffect(() => {
|
||||
const url = avatar.preview
|
||||
return () => {
|
||||
if (url?.startsWith('blob:')) URL.revokeObjectURL(url)
|
||||
}
|
||||
}, [avatar.preview])
|
||||
useEffect(() => {
|
||||
const url = banner.preview
|
||||
return () => {
|
||||
if (url?.startsWith('blob:')) URL.revokeObjectURL(url)
|
||||
}
|
||||
}, [banner.preview])
|
||||
|
||||
const cleanUsername = username.trim().toLowerCase().replace(/^@/, '')
|
||||
const usernameOk = USERNAME_RE.test(cleanUsername)
|
||||
const nameOk = displayName.trim().length >= 1 && displayName.trim().length <= 40
|
||||
@@ -152,7 +166,7 @@ export default function EditProfile({ onClose }: { onClose: () => void }) {
|
||||
<span className="mt-1 block text-right text-[11px] text-ink-3">{bio.length}/300</span>
|
||||
</label>
|
||||
|
||||
<button type="button" onClick={() => setIsPrivate((v) => !v)} className="flex w-full items-center gap-3 rounded-2xl border border-line px-4 py-3.5 text-left">
|
||||
<button type="button" role="switch" aria-checked={isPrivate} onClick={() => setIsPrivate((v) => !v)} className="flex w-full items-center gap-3 rounded-2xl border border-line px-4 py-3.5 text-left">
|
||||
<Lock size={18} className="shrink-0 text-ink-2" />
|
||||
<span className="flex-1">
|
||||
<span className="block text-sm font-medium">{t('social.privateAccount')}</span>
|
||||
|
||||
@@ -13,7 +13,9 @@ type Tab = 'followers' | 'following' | 'requests'
|
||||
export default function FollowList({ profile, initial, onClose }: { profile: Profile; initial: 'followers' | 'following'; onClose: () => void }) {
|
||||
const social = useSocial()
|
||||
const showRequests = profile.isMe && social.requests.length > 0
|
||||
const [tab, setTab] = useState<Tab>(showRequests && initial === 'followers' ? 'requests' : initial)
|
||||
const [picked, setTab] = useState<Tab>(showRequests && initial === 'followers' ? 'requests' : initial)
|
||||
// Dernière demande acceptée : l'onglet « Demandes » disparaît, on retombe sur les abonnés
|
||||
const tab: Tab = picked === 'requests' && !showRequests ? 'followers' : picked
|
||||
const [list, setList] = useState<ProfileCard[]>()
|
||||
const [busy, setBusy] = useState<string>()
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Check, Loader2, Plus, Star } from 'lucide-react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { genreLabel } from '../../lib/genres'
|
||||
import { useScrollLock } from '../../lib/scrollLock'
|
||||
@@ -9,6 +9,7 @@ import type { MediaInput, MediaItem } from '../../types'
|
||||
import { StatusPill, TypeBadge } from '../Badges'
|
||||
import Poster from '../Poster'
|
||||
import Avatar from './Avatar'
|
||||
import { useEscape } from '../../lib/escape'
|
||||
|
||||
export interface PeekOwner {
|
||||
username: string
|
||||
@@ -27,11 +28,7 @@ export default function ItemPeek({ item, owner, onClose }: { item: MediaItem; ow
|
||||
|
||||
useScrollLock()
|
||||
|
||||
useEffect(() => {
|
||||
const onKey = (e: KeyboardEvent) => e.key === 'Escape' && onClose()
|
||||
window.addEventListener('keydown', onKey)
|
||||
return () => window.removeEventListener('keydown', onKey)
|
||||
}, [onClose])
|
||||
useEscape(onClose)
|
||||
|
||||
const addToWatchlist = async () => {
|
||||
setBusy(true)
|
||||
@@ -46,11 +43,13 @@ export default function ItemPeek({ item, owner, onClose }: { item: MediaItem; ow
|
||||
criteria: {},
|
||||
episodesWatched: 0,
|
||||
episodesTotal: item.episodesTotal,
|
||||
seasons: item.seasons,
|
||||
episodeDuration: item.episodeDuration,
|
||||
duration: item.duration,
|
||||
genres: item.genres,
|
||||
platform: item.platform,
|
||||
poster: item.poster,
|
||||
backdrop: item.backdrop,
|
||||
overview: item.overview,
|
||||
externalId: item.externalId,
|
||||
countries: item.countries,
|
||||
|
||||
@@ -16,7 +16,10 @@ export default function PeopleSearch({ onClose }: { onClose: () => void }) {
|
||||
|
||||
useEffect(() => {
|
||||
const term = q.trim()
|
||||
if (term.length < 2) return setResults([])
|
||||
if (term.length < 2) {
|
||||
setLoading(false)
|
||||
return setResults([])
|
||||
}
|
||||
let alive = true
|
||||
setLoading(true)
|
||||
const timer = setTimeout(() => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Check, Loader2, Lock, Share2, Star, UserPlus } from 'lucide-react'
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { fmtNumber, t } from '../../i18n'
|
||||
import { follow, getProfile, getProfileItems, profileLink, unfollow, type Profile } from '../../lib/cloud/social'
|
||||
import { STATUSES, TOP_CATEGORIES } from '../../lib/constants'
|
||||
import { cx, formatRating } from '../../lib/utils'
|
||||
@@ -35,7 +35,7 @@ function PosterTile({ item, onOpen, caption }: { item: MediaItem; onOpen: () =>
|
||||
function Stat({ value, label, onClick }: { value?: number; label: string; onClick?: () => void }) {
|
||||
const body = (
|
||||
<>
|
||||
<span className="block text-lg font-bold tabular-nums leading-tight">{value == null ? '—' : value.toLocaleString()}</span>
|
||||
<span className="block text-lg font-bold tabular-nums leading-tight">{value == null ? '—' : fmtNumber(value)}</span>
|
||||
<span className="block text-[11px] text-ink-3">{label}</span>
|
||||
</>
|
||||
)
|
||||
@@ -51,6 +51,7 @@ function Stat({ value, label, onClick }: { value?: number; label: string; onClic
|
||||
/** Page de profil (la mienne ou celle d'un autre). */
|
||||
export default function ProfileView({ username, onClose }: { username: string; onClose: () => void }) {
|
||||
const social = useSocial()
|
||||
const { settings } = useMedia()
|
||||
const [profile, setProfile] = useState<Profile | null>()
|
||||
const [error, setError] = useState<string>()
|
||||
const [tab, setTab] = useState<'profile' | 'library'>('profile')
|
||||
@@ -133,12 +134,14 @@ export default function ProfileView({ username, onClose }: { username: string; o
|
||||
|
||||
const topByCategory = useMemo(() => {
|
||||
const out: { label: string; items: MediaItem[] }[] = []
|
||||
for (const c of TOP_CATEGORIES) {
|
||||
// Mon profil : mes réglages locaux font foi tout de suite (même avant la synchro)
|
||||
const shown = profile?.isMe ? TOP_CATEGORIES.filter((c) => settings.topCategories.includes(c.value)) : TOP_CATEGORIES
|
||||
for (const c of shown) {
|
||||
const list = (profile?.top ?? []).filter((i) => i.top?.category === c.value).sort((a, b) => a.top!.rank - b.top!.rank)
|
||||
if (list.length) out.push({ label: c.plural, items: list })
|
||||
}
|
||||
return out
|
||||
}, [profile])
|
||||
}, [profile, settings.topCategories])
|
||||
|
||||
return (
|
||||
<Sheet
|
||||
@@ -335,7 +338,7 @@ function ProfileTab({ profile, topByCategory, onOpen }: { profile: Profile; topB
|
||||
].map(([v, label]) => (
|
||||
<div key={label as string} className="card p-4">
|
||||
<div className="eyebrow">{label}</div>
|
||||
<div className="mt-2 text-2xl font-bold tabular-nums leading-none">{(v as number).toLocaleString()}</div>
|
||||
<div className="mt-2 text-2xl font-bold tabular-nums leading-none">{fmtNumber(v as number)}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
@@ -351,15 +354,23 @@ function LibraryTab({ profile, onOpen }: { profile: Profile; onOpen: (i: MediaIt
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [done, setDone] = useState(false)
|
||||
|
||||
const request = useRef(0)
|
||||
|
||||
const loadPage = useCallback(
|
||||
async (reset: boolean) => {
|
||||
// Une réponse arrivée après un changement de filtre ne doit pas écraser la nouvelle liste
|
||||
const id = ++request.current
|
||||
setLoading(true)
|
||||
if (reset) setList([])
|
||||
try {
|
||||
const page = await getProfileItems(profile.id, status || null, reset ? 0 : list.length)
|
||||
if (id !== request.current) return
|
||||
setList((prev) => (reset ? page : [...prev, ...page]))
|
||||
setDone(page.length < 48)
|
||||
} catch {
|
||||
if (id === request.current) setDone(true)
|
||||
} finally {
|
||||
setLoading(false)
|
||||
if (id === request.current) setLoading(false)
|
||||
}
|
||||
},
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
import { X } from 'lucide-react'
|
||||
import { useEffect, type ReactNode } from 'react'
|
||||
import { type ReactNode } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { useScrollLock } from '../../lib/scrollLock'
|
||||
import { useEscape } from '../../lib/escape'
|
||||
|
||||
/** Écran plein (profil, recherche…) avec en-tête et bouton fermer. */
|
||||
export default function Sheet({ title, onClose, right, children, label }: { title: ReactNode; onClose: () => void; right?: ReactNode; children: ReactNode; label: string }) {
|
||||
useScrollLock()
|
||||
useEffect(() => {
|
||||
const onKey = (e: KeyboardEvent) => e.key === 'Escape' && onClose()
|
||||
window.addEventListener('keydown', onKey)
|
||||
return () => window.removeEventListener('keydown', onKey)
|
||||
}, [onClose])
|
||||
useEscape(onClose)
|
||||
return (
|
||||
<div className="sheet-in fixed inset-0 z-50 flex flex-col bg-bg" role="dialog" aria-modal="true" aria-label={label}>
|
||||
<header className="safe-top border-b border-line">
|
||||
|
||||
@@ -46,27 +46,6 @@ export function LinkArrow({ onClick, children }: { onClick: () => void; children
|
||||
)
|
||||
}
|
||||
|
||||
/** Liste de barres horizontales (une seule série → une seule couleur, valeurs écrites en clair). */
|
||||
export function BarList({ data, format = String }: { data: { label: string; value: number }[]; format?: (v: number) => string }) {
|
||||
const max = Math.max(1, ...data.map((d) => d.value))
|
||||
if (!data.some((d) => d.value > 0)) return <p className="text-sm text-ink-3">{t('common.noData')}</p>
|
||||
return (
|
||||
<ul className="space-y-3">
|
||||
{data.map((d) => (
|
||||
<li key={d.label} className="text-sm" title={`${d.label} : ${format(d.value)}`}>
|
||||
<div className="mb-1.5 flex justify-between gap-2">
|
||||
<span className="truncate text-ink-2">{d.label}</span>
|
||||
<span className="shrink-0 text-xs tabular-nums text-ink">{format(d.value)}</span>
|
||||
</div>
|
||||
<div className="h-1 rounded-full bg-surface-2">
|
||||
<div className="h-full rounded-full bg-accent" style={{ width: `${(d.value / max) * 100}%`, minWidth: d.value ? 4 : 0 }} />
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)
|
||||
}
|
||||
|
||||
export function EmptyState({ title, text, action }: { title: string; text?: string; action?: ReactNode }) {
|
||||
return (
|
||||
<div className="card mt-4 flex flex-col items-center px-6 py-12 text-center">
|
||||
|
||||
@@ -76,7 +76,6 @@ let dict: Partial<Translations> = fr
|
||||
let plural = new Intl.PluralRules('fr-FR')
|
||||
|
||||
export const getLang = () => current
|
||||
export const langInfo = () => BY_CODE[current]
|
||||
/** Locale BCP 47 pour toLocaleDateString / Intl */
|
||||
export const locale = () => BY_CODE[current].locale
|
||||
export const tmdbLanguage = () => BY_CODE[current].tmdb
|
||||
|
||||
+4
-38
@@ -9,10 +9,6 @@ const dict: Translations = {
|
||||
'common.add': 'Hinzufügen',
|
||||
'common.delete': 'Löschen',
|
||||
'common.all': 'Alle',
|
||||
'common.none': 'Keine',
|
||||
'common.noData': 'Noch keine Daten.',
|
||||
'common.retry': 'Nochmal versuchen',
|
||||
'common.back': 'Zurück',
|
||||
'common.offline': 'Keine Internetverbindung.',
|
||||
'common.minutes': '{n} Min.',
|
||||
'common.hours': '{h} Std.',
|
||||
@@ -63,9 +59,6 @@ const dict: Translations = {
|
||||
'subtype.stage': 'Bühnenshow',
|
||||
'subtype.miniseries': 'Miniserie',
|
||||
|
||||
'platform.cinema': 'Kino',
|
||||
'platform.dvd': 'DVD / Blu-ray',
|
||||
'platform.tv': 'TV',
|
||||
|
||||
'genre.action': 'Action',
|
||||
'genre.adventure': 'Abenteuer',
|
||||
@@ -148,6 +141,7 @@ const dict: Translations = {
|
||||
'card.open': '{title} öffnen',
|
||||
|
||||
'rating.outOf10': 'Bewertung von 10',
|
||||
'rating.outOf5': 'Bewertung von 5',
|
||||
'rating.stars_one': '{count} Stern',
|
||||
'rating.stars_other': '{count} Sterne',
|
||||
'rating.clear': 'Bewertung löschen',
|
||||
@@ -185,7 +179,7 @@ const dict: Translations = {
|
||||
'auth.sendLink': 'Link senden',
|
||||
'auth.forgot': 'Passwort vergessen?',
|
||||
'auth.backToLogin': 'Zurück zur Anmeldung',
|
||||
'auth.privacy': 'Deine Daten sind mit deinem Konto verknüpft und nur für dich sichtbar. Sie bleiben außerdem auf deinem Gerät, damit alles auch ohne Internet funktioniert.',
|
||||
'auth.privacy': 'Dein Konto schützt deine Bibliothek. Dein Profil (Titel, Bewertungen und Meinungen) ist für Mitglieder sichtbar, außer du stellst es auf privat; deine Listen und Einstellungen bleiben privat. Alles bleibt außerdem auf deinem Gerät, damit die App auch offline funktioniert.',
|
||||
'auth.newPasswordTitle': 'Wähl dein neues Passwort.',
|
||||
'auth.newPassword': 'Neues Passwort',
|
||||
'auth.err.credentials': 'E-Mail oder Passwort falsch.',
|
||||
@@ -436,21 +430,6 @@ const dict: Translations = {
|
||||
'roulette.seeItem': 'Ganzen Eintrag ansehen',
|
||||
'roulette.watchIt': 'Den schau ich',
|
||||
|
||||
'newEp.check': 'Prüfen',
|
||||
'newEp.title': 'Neuheiten',
|
||||
'newEp.checking': 'Ich schau, was rausgekommen ist…',
|
||||
'newEp.needKey': 'Füg deinen TMDB-Schlüssel in den Einstellungen hinzu, um über neue Folgen und Staffeln informiert zu werden.',
|
||||
'newEp.nothing_one': 'Nichts Neues bei deiner verfolgten Serie oder deinem Anime.',
|
||||
'newEp.nothing_other': 'Nichts Neues bei deinen {count} verfolgten Serien und Animes.',
|
||||
'newEp.needKeyAlso': '(Füg deinen TMDB-Schlüssel in den Einstellungen hinzu, um auch Serien und Dramas zu verfolgen.)',
|
||||
'newEp.newSeason': 'Neue Staffel',
|
||||
'newEp.catchUp': 'Nachholen',
|
||||
'newEp.soon': 'Bald',
|
||||
'newEp.epWhen': 'Ep. {ep} {when}',
|
||||
'newEp.available_one': '{count} Folge verfügbar',
|
||||
'newEp.available_other': '{count} Folgen verfügbar',
|
||||
'newEp.next': 'Nächste: Ep. {ep} {when}',
|
||||
'newEp.resume': 'Weiterschauen',
|
||||
|
||||
'top.pick': 'Platz {rank} wählen',
|
||||
'top.shareTitle': 'Meine Top 5 {category}',
|
||||
@@ -477,10 +456,8 @@ const dict: Translations = {
|
||||
'reco.addLabel': '{title} zu Geplant hinzufügen',
|
||||
'reco.addedShort': 'Hinzugefügt',
|
||||
|
||||
'search.moviesSeries': 'Filme & Serien',
|
||||
'search.offline': 'Keine Internetverbindung: Für die Suche brauchst du Netz.',
|
||||
'search.fillFrom': 'Aus einer Datenbank ausfüllen',
|
||||
'search.needKey': 'Um Filme, Serien und Dramas zu suchen, füg deinen kostenlosen TMDB-Schlüssel in den Einstellungen hinzu.',
|
||||
'search.openSettings': 'Einstellungen öffnen',
|
||||
'search.already': 'schon hinzugefügt',
|
||||
'search.noResults': 'Keine Ergebnisse. Du kannst den Eintrag unten von Hand ausfüllen.',
|
||||
@@ -570,12 +547,8 @@ const dict: Translations = {
|
||||
'form.plusEp': '+1 Folge',
|
||||
'form.total': 'Gesamt',
|
||||
'form.season': 'Staffel',
|
||||
'form.minPerEp': 'Min. / Ep.',
|
||||
'form.duration': 'Dauer',
|
||||
'form.durationMin': 'Dauer (Minuten)',
|
||||
'form.info': 'Infos',
|
||||
'form.start': 'Start / gesehen am',
|
||||
'form.end': 'Ende',
|
||||
'form.year': 'Jahr',
|
||||
'form.platform': 'Plattform',
|
||||
'form.genres': 'Genres / Tags',
|
||||
@@ -590,8 +563,6 @@ const dict: Translations = {
|
||||
'form.deleteConfirm': '„{title}“ wird endgültig gelöscht.',
|
||||
'form.removeRewatch': 'Rewatch entfernen',
|
||||
'form.rewatchDate': 'Datum des Rewatches',
|
||||
'form.reviewPublic': 'Diese Meinung auf meinem Profil zeigen',
|
||||
'form.reviewPublicHint': 'Sonst siehst nur du sie.',
|
||||
|
||||
'journal.rewatched': 'Nochmal gesehen',
|
||||
'journal.started': 'Angefangen',
|
||||
@@ -722,7 +693,7 @@ const dict: Translations = {
|
||||
'social.bioPh': 'Was du gern schaust, deine Lieblingsgenres…',
|
||||
'social.privateAccount': 'Privates Konto',
|
||||
'social.privateHint': 'Nur Follower, die du bestätigst, sehen, was du schaust.',
|
||||
'social.publicHint': 'Dein Name, Username, Foto, Banner und deine Bio sind für alle Mitglieder sichtbar. Deine Meinungen bleiben privat, außer denen, die du auf deinem Profil zeigst.',
|
||||
'social.publicHint': 'Dein Name, Username, Foto, Banner, deine Bio, Bewertungen und Meinungen sind für Mitglieder sichtbar. Stelle dein Konto auf privat, um zu entscheiden, wer sie sehen kann.',
|
||||
'social.requestsTab_one': 'Anfrage',
|
||||
'social.requestsTab_other': 'Anfragen ({count})',
|
||||
'social.noFollowing': 'Du folgst noch niemandem.',
|
||||
@@ -760,15 +731,9 @@ const dict: Translations = {
|
||||
'welcome.later': "Später",
|
||||
'social.watching': "Schaut gerade",
|
||||
'social.watchlist': "Möchte sehen",
|
||||
'form.infoHint': "Daten, Jahr, Plattform und Genres – werden automatisch ausgefüllt",
|
||||
'search.allKinds': "Filme, Serien und Anime",
|
||||
'search.animeOnly': "Ohne TMDB-Schlüssel werden nur Animes gefunden.",
|
||||
'search.alreadySeries': "schon in deiner Bibliothek – öffnen",
|
||||
'form.episodesOfSeason': "Folgen von Staffel {season}",
|
||||
'form.seasonsTotal_one': "{seasons} Staffeln · insgesamt {count} Folge",
|
||||
'form.seasonsTotal_other': "{seasons} Staffeln · insgesamt {count} Folgen",
|
||||
'form.seasonEpisodes_one': "{count} Folge",
|
||||
'form.seasonEpisodes_other': "{count} Folgen",
|
||||
'form.startShort': "Begonnen",
|
||||
'form.endShort': "Beendet",
|
||||
'hero.allSeen': "Alles gesehen",
|
||||
@@ -784,6 +749,7 @@ const dict: Translations = {
|
||||
'episodes.short': "F{n}",
|
||||
'episodes.upcoming': "am {date}",
|
||||
'episodes.nameless': "Folge {n}",
|
||||
'episodes.seasonShort': 'S{n}',
|
||||
'homeHero.continue': "Schaue ich gerade",
|
||||
'homeHero.next': "Als Nächstes",
|
||||
'homeHero.details': "Details",
|
||||
|
||||
+4
-38
@@ -9,10 +9,6 @@ const dict: Translations = {
|
||||
'common.add': 'Add',
|
||||
'common.delete': 'Delete',
|
||||
'common.all': 'All',
|
||||
'common.none': 'None',
|
||||
'common.noData': 'No data yet.',
|
||||
'common.retry': 'Try again',
|
||||
'common.back': 'Back',
|
||||
'common.offline': 'No internet connection.',
|
||||
'common.minutes': '{n} min',
|
||||
'common.hours': '{h} h',
|
||||
@@ -63,9 +59,6 @@ const dict: Translations = {
|
||||
'subtype.stage': 'Stage show',
|
||||
'subtype.miniseries': 'Miniseries',
|
||||
|
||||
'platform.cinema': 'Theater',
|
||||
'platform.dvd': 'DVD / Blu-ray',
|
||||
'platform.tv': 'TV',
|
||||
|
||||
'genre.action': 'Action',
|
||||
'genre.adventure': 'Adventure',
|
||||
@@ -148,6 +141,7 @@ const dict: Translations = {
|
||||
'card.open': 'Open {title}',
|
||||
|
||||
'rating.outOf10': 'Rating out of 10',
|
||||
'rating.outOf5': 'Rating out of 5',
|
||||
'rating.stars_one': '{count} star',
|
||||
'rating.stars_other': '{count} stars',
|
||||
'rating.clear': 'Clear rating',
|
||||
@@ -185,7 +179,7 @@ const dict: Translations = {
|
||||
'auth.sendLink': 'Send link',
|
||||
'auth.forgot': 'Forgot your password?',
|
||||
'auth.backToLogin': 'Back to login',
|
||||
'auth.privacy': 'Your data is tied to your account and only visible to you. It also stays on your device so the app works offline.',
|
||||
'auth.privacy': 'Your account keeps your library safe. Your profile (titles, ratings and reviews) is visible to members unless you make it private; your lists and settings stay private. Everything also stays on your device so the app works offline.',
|
||||
'auth.newPasswordTitle': 'Pick your new password.',
|
||||
'auth.newPassword': 'New password',
|
||||
'auth.err.credentials': 'Wrong email or password.',
|
||||
@@ -436,21 +430,6 @@ const dict: Translations = {
|
||||
'roulette.seeItem': 'See full details',
|
||||
'roulette.watchIt': 'I’ll watch it',
|
||||
|
||||
'newEp.check': 'Check',
|
||||
'newEp.title': 'What’s new',
|
||||
'newEp.checking': 'Checking what’s out…',
|
||||
'newEp.needKey': 'Add your TMDB key in Settings to get notified about new episodes and seasons.',
|
||||
'newEp.nothing_one': 'Nothing new for your tracked show.',
|
||||
'newEp.nothing_other': 'Nothing new for your {count} tracked shows.',
|
||||
'newEp.needKeyAlso': '(Add your TMDB key in Settings to track series and dramas too.)',
|
||||
'newEp.newSeason': 'New season',
|
||||
'newEp.catchUp': 'To catch up',
|
||||
'newEp.soon': 'Coming soon',
|
||||
'newEp.epWhen': 'Ep. {ep} {when}',
|
||||
'newEp.available_one': '{count} episode available',
|
||||
'newEp.available_other': '{count} episodes available',
|
||||
'newEp.next': 'Next: ep. {ep} {when}',
|
||||
'newEp.resume': 'Resume',
|
||||
|
||||
'top.pick': 'Pick #{rank}',
|
||||
'top.shareTitle': 'My Top 5 {category}',
|
||||
@@ -477,10 +456,8 @@ const dict: Translations = {
|
||||
'reco.addLabel': 'Add {title} to watch',
|
||||
'reco.addedShort': 'Added',
|
||||
|
||||
'search.moviesSeries': 'Movies & series',
|
||||
'search.offline': 'No internet connection: search needs the network.',
|
||||
'search.fillFrom': 'Fill in from a database',
|
||||
'search.needKey': 'To search movies, series and dramas, add your free TMDB key in Settings.',
|
||||
'search.openSettings': 'Open Settings',
|
||||
'search.already': 'already added',
|
||||
'search.noResults': 'No results. You can fill in the entry by hand below.',
|
||||
@@ -570,12 +547,8 @@ const dict: Translations = {
|
||||
'form.plusEp': '+1 episode',
|
||||
'form.total': 'Total',
|
||||
'form.season': 'Season',
|
||||
'form.minPerEp': 'Min / ep.',
|
||||
'form.duration': 'Runtime',
|
||||
'form.durationMin': 'Runtime (minutes)',
|
||||
'form.info': 'Info',
|
||||
'form.start': 'Started / watched on',
|
||||
'form.end': 'Finished',
|
||||
'form.year': 'Year',
|
||||
'form.platform': 'Platform',
|
||||
'form.genres': 'Genres / tags',
|
||||
@@ -590,8 +563,6 @@ const dict: Translations = {
|
||||
'form.deleteConfirm': '“{title}” will be permanently deleted.',
|
||||
'form.removeRewatch': 'Remove this rewatch',
|
||||
'form.rewatchDate': 'Rewatch date',
|
||||
'form.reviewPublic': 'Show this review on my profile',
|
||||
'form.reviewPublicHint': 'Otherwise, only you can see it.',
|
||||
|
||||
'journal.rewatched': 'Rewatched',
|
||||
'journal.started': 'Started',
|
||||
@@ -722,7 +693,7 @@ const dict: Translations = {
|
||||
'social.bioPh': 'What you love to watch, your favorite genres…',
|
||||
'social.privateAccount': 'Private account',
|
||||
'social.privateHint': 'Only followers you approve can see what you watch.',
|
||||
'social.publicHint': 'Your name, username, photo, banner and bio are visible to all members. Your written reviews stay private, except the ones you choose to show on your profile.',
|
||||
'social.publicHint': 'Your name, username, photo, banner, bio, ratings and reviews are visible to members. Make your account private to choose who can see them.',
|
||||
'social.requestsTab_one': 'Request',
|
||||
'social.requestsTab_other': 'Requests ({count})',
|
||||
'social.noFollowing': 'Not following anyone yet.',
|
||||
@@ -760,15 +731,9 @@ const dict: Translations = {
|
||||
'welcome.later': "Later",
|
||||
'social.watching': "Watching",
|
||||
'social.watchlist': "Wants to watch",
|
||||
'form.infoHint': "Dates, year, platform and genres — filled in automatically",
|
||||
'search.allKinds': "Movies, series and anime",
|
||||
'search.animeOnly': "Without a TMDB key, only anime can be found.",
|
||||
'search.alreadySeries': "already in your library — open",
|
||||
'form.episodesOfSeason': "Season {season} episodes",
|
||||
'form.seasonsTotal_one': "{seasons} seasons · {count} episode in total",
|
||||
'form.seasonsTotal_other': "{seasons} seasons · {count} episodes in total",
|
||||
'form.seasonEpisodes_one': "{count} episode",
|
||||
'form.seasonEpisodes_other': "{count} episodes",
|
||||
'form.startShort': "Started",
|
||||
'form.endShort': "Finished",
|
||||
'hero.allSeen': "All watched",
|
||||
@@ -784,6 +749,7 @@ const dict: Translations = {
|
||||
'episodes.short': "E{n}",
|
||||
'episodes.upcoming': "on {date}",
|
||||
'episodes.nameless': "Episode {n}",
|
||||
'episodes.seasonShort': 'S{n}',
|
||||
'homeHero.continue': "Currently watching",
|
||||
'homeHero.next': "Up next",
|
||||
'homeHero.details': "Details",
|
||||
|
||||
+4
-38
@@ -9,10 +9,6 @@ const dict: Translations = {
|
||||
'common.add': 'Añadir',
|
||||
'common.delete': 'Eliminar',
|
||||
'common.all': 'Todo',
|
||||
'common.none': 'Ninguno',
|
||||
'common.noData': 'Aún no hay datos.',
|
||||
'common.retry': 'Reintentar',
|
||||
'common.back': 'Volver',
|
||||
'common.offline': 'Sin conexión a internet.',
|
||||
'common.minutes': '{n} min',
|
||||
'common.hours': '{h} h',
|
||||
@@ -63,9 +59,6 @@ const dict: Translations = {
|
||||
'subtype.stage': 'Espectáculo',
|
||||
'subtype.miniseries': 'Miniserie',
|
||||
|
||||
'platform.cinema': 'Cine',
|
||||
'platform.dvd': 'DVD / Blu-ray',
|
||||
'platform.tv': 'TV',
|
||||
|
||||
'genre.action': 'Acción',
|
||||
'genre.adventure': 'Aventura',
|
||||
@@ -148,6 +141,7 @@ const dict: Translations = {
|
||||
'card.open': 'Abrir {title}',
|
||||
|
||||
'rating.outOf10': 'Nota sobre 10',
|
||||
'rating.outOf5': 'Nota sobre 5',
|
||||
'rating.stars_one': '{count} estrella',
|
||||
'rating.stars_other': '{count} estrellas',
|
||||
'rating.clear': 'Borrar la nota',
|
||||
@@ -185,7 +179,7 @@ const dict: Translations = {
|
||||
'auth.sendLink': 'Enviar el enlace',
|
||||
'auth.forgot': '¿Olvidaste tu contraseña?',
|
||||
'auth.backToLogin': 'Volver a iniciar sesión',
|
||||
'auth.privacy': 'Tus datos están vinculados a tu cuenta y solo tú puedes verlos. También se quedan en tu dispositivo para funcionar sin internet.',
|
||||
'auth.privacy': 'Tu cuenta guarda tu biblioteca de forma segura. Tu perfil (títulos, notas y opiniones) es visible para los miembros salvo que lo hagas privado; tus listas y ajustes siguen siendo privados. Todo se queda también en tu dispositivo para funcionar sin internet.',
|
||||
'auth.newPasswordTitle': 'Elige tu nueva contraseña.',
|
||||
'auth.newPassword': 'Nueva contraseña',
|
||||
'auth.err.credentials': 'Correo o contraseña incorrectos.',
|
||||
@@ -436,21 +430,6 @@ const dict: Translations = {
|
||||
'roulette.seeItem': 'Ver la ficha completa',
|
||||
'roulette.watchIt': 'Lo veo',
|
||||
|
||||
'newEp.check': 'Comprobar',
|
||||
'newEp.title': 'Novedades',
|
||||
'newEp.checking': 'Mirando qué ha salido…',
|
||||
'newEp.needKey': 'Añade tu clave de TMDB en Ajustes para enterarte de los nuevos episodios y temporadas.',
|
||||
'newEp.nothing_one': 'Nada nuevo para tu serie o anime en seguimiento.',
|
||||
'newEp.nothing_other': 'Nada nuevo para tus {count} series y animes en seguimiento.',
|
||||
'newEp.needKeyAlso': '(Añade tu clave de TMDB en Ajustes para seguir también series y dramas.)',
|
||||
'newEp.newSeason': 'Nueva temporada',
|
||||
'newEp.catchUp': 'Por ponerte al día',
|
||||
'newEp.soon': 'Próximamente',
|
||||
'newEp.epWhen': 'Ep. {ep} {when}',
|
||||
'newEp.available_one': '{count} episodio disponible',
|
||||
'newEp.available_other': '{count} episodios disponibles',
|
||||
'newEp.next': 'Siguiente: ep. {ep} {when}',
|
||||
'newEp.resume': 'Continuar',
|
||||
|
||||
'top.pick': 'Elegir el n.º {rank}',
|
||||
'top.shareTitle': 'Mi Top 5 {category}',
|
||||
@@ -477,10 +456,8 @@ const dict: Translations = {
|
||||
'reco.addLabel': 'Añadir {title} a por ver',
|
||||
'reco.addedShort': 'Añadido',
|
||||
|
||||
'search.moviesSeries': 'Películas y series',
|
||||
'search.offline': 'Sin conexión a internet: la búsqueda necesita red.',
|
||||
'search.fillFrom': 'Rellenar desde una base de datos',
|
||||
'search.needKey': 'Para buscar películas, series y dramas, añade tu clave gratuita de TMDB en Ajustes.',
|
||||
'search.openSettings': 'Abrir Ajustes',
|
||||
'search.already': 'ya añadido',
|
||||
'search.noResults': 'Sin resultados. Puedes rellenar la ficha a mano abajo.',
|
||||
@@ -570,12 +547,8 @@ const dict: Translations = {
|
||||
'form.plusEp': '+1 episodio',
|
||||
'form.total': 'Total',
|
||||
'form.season': 'Temporada',
|
||||
'form.minPerEp': 'Min / ep.',
|
||||
'form.duration': 'Duración',
|
||||
'form.durationMin': 'Duración (minutos)',
|
||||
'form.info': 'Información',
|
||||
'form.start': 'Inicio / visto el',
|
||||
'form.end': 'Fin',
|
||||
'form.year': 'Año',
|
||||
'form.platform': 'Plataforma',
|
||||
'form.genres': 'Géneros / etiquetas',
|
||||
@@ -590,8 +563,6 @@ const dict: Translations = {
|
||||
'form.deleteConfirm': '«{title}» se eliminará para siempre.',
|
||||
'form.removeRewatch': 'Quitar este revisionado',
|
||||
'form.rewatchDate': 'Fecha del revisionado',
|
||||
'form.reviewPublic': 'Mostrar esta opinión en mi perfil',
|
||||
'form.reviewPublicHint': 'Si no, solo la verás tú.',
|
||||
|
||||
'journal.rewatched': 'Vuelto a ver',
|
||||
'journal.started': 'Empezado',
|
||||
@@ -722,7 +693,7 @@ const dict: Translations = {
|
||||
'social.bioPh': 'Lo que te gusta ver, tus géneros favoritos…',
|
||||
'social.privateAccount': 'Cuenta privada',
|
||||
'social.privateHint': 'Solo los seguidores que aceptes ven lo que ves.',
|
||||
'social.publicHint': 'Tu nombre, tu nombre de usuario, tu foto, tu banner y tu bio son visibles para todos los miembros. Tus opiniones escritas siguen siendo privadas, salvo las que decidas mostrar en tu perfil.',
|
||||
'social.publicHint': 'Tu nombre, nombre de usuario, foto, banner, bio, notas y opiniones son visibles para los miembros. Haz tu cuenta privada para elegir quién puede verlos.',
|
||||
'social.requestsTab_one': 'Solicitud',
|
||||
'social.requestsTab_other': 'Solicitudes ({count})',
|
||||
'social.noFollowing': 'Todavía no sigues a nadie.',
|
||||
@@ -760,15 +731,9 @@ const dict: Translations = {
|
||||
'welcome.later': "Más tarde",
|
||||
'social.watching': "Viendo",
|
||||
'social.watchlist': "Quiere ver",
|
||||
'form.infoHint': "Fechas, año, plataforma y géneros — se rellenan solos",
|
||||
'search.allKinds': "Películas, series y anime",
|
||||
'search.animeOnly': "Sin clave de TMDB solo se encuentran animes.",
|
||||
'search.alreadySeries': "ya está en tu biblioteca — abrir",
|
||||
'form.episodesOfSeason': "Episodios de la temporada {season}",
|
||||
'form.seasonsTotal_one': "{seasons} temporadas · {count} episodio en total",
|
||||
'form.seasonsTotal_other': "{seasons} temporadas · {count} episodios en total",
|
||||
'form.seasonEpisodes_one': "{count} episodio",
|
||||
'form.seasonEpisodes_other': "{count} episodios",
|
||||
'form.startShort': "Empezado",
|
||||
'form.endShort': "Terminado",
|
||||
'hero.allSeen': "Todo visto",
|
||||
@@ -784,6 +749,7 @@ const dict: Translations = {
|
||||
'episodes.short': "E{n}",
|
||||
'episodes.upcoming': "el {date}",
|
||||
'episodes.nameless': "Episodio {n}",
|
||||
'episodes.seasonShort': 'T{n}',
|
||||
'homeHero.continue': "Estoy viendo",
|
||||
'homeHero.next': "Para ver después",
|
||||
'homeHero.details': "Ficha",
|
||||
|
||||
+4
-38
@@ -11,10 +11,6 @@ const dict = {
|
||||
'common.add': 'Ajouter',
|
||||
'common.delete': 'Supprimer',
|
||||
'common.all': 'Tout',
|
||||
'common.none': 'Aucun',
|
||||
'common.noData': 'Pas encore de données.',
|
||||
'common.retry': 'Réessayer',
|
||||
'common.back': 'Retour',
|
||||
'common.offline': 'Pas de connexion internet.',
|
||||
'common.minutes': '{n} min',
|
||||
'common.hours': '{h} h',
|
||||
@@ -65,9 +61,6 @@ const dict = {
|
||||
'subtype.stage': 'Spectacle',
|
||||
'subtype.miniseries': 'Mini-série',
|
||||
|
||||
'platform.cinema': 'Cinéma',
|
||||
'platform.dvd': 'DVD / Blu-ray',
|
||||
'platform.tv': 'TV',
|
||||
|
||||
'genre.action': 'Action',
|
||||
'genre.adventure': 'Aventure',
|
||||
@@ -150,6 +143,7 @@ const dict = {
|
||||
'card.open': 'Ouvrir {title}',
|
||||
|
||||
'rating.outOf10': 'Note sur 10',
|
||||
'rating.outOf5': 'Note sur 5',
|
||||
'rating.stars_one': '{count} étoile',
|
||||
'rating.stars_other': '{count} étoiles',
|
||||
'rating.clear': 'Effacer la note',
|
||||
@@ -187,7 +181,7 @@ const dict = {
|
||||
'auth.sendLink': 'Envoyer le lien',
|
||||
'auth.forgot': 'Mot de passe oublié ?',
|
||||
'auth.backToLogin': 'Retour à la connexion',
|
||||
'auth.privacy': 'Tes données sont liées à ton compte et visibles uniquement par toi. Elles restent aussi sur ton appareil pour fonctionner sans internet.',
|
||||
'auth.privacy': 'Ton compte garde ta bibliothèque en sécurité. Ton profil (titres vus, notes et avis) est visible par les membres, sauf si tu le passes en privé ; tes listes et réglages restent privés. Tout reste aussi sur ton appareil pour fonctionner sans internet.',
|
||||
'auth.newPasswordTitle': 'Choisis ton nouveau mot de passe.',
|
||||
'auth.newPassword': 'Nouveau mot de passe',
|
||||
'auth.err.credentials': 'Email ou mot de passe incorrect.',
|
||||
@@ -438,21 +432,6 @@ const dict = {
|
||||
'roulette.seeItem': 'Voir la fiche complète',
|
||||
'roulette.watchIt': 'Je le regarde',
|
||||
|
||||
'newEp.check': 'Vérifier',
|
||||
'newEp.title': 'Nouveautés',
|
||||
'newEp.checking': 'Je regarde ce qui est sorti…',
|
||||
'newEp.needKey': 'Ajoute ta clé TMDB dans les Réglages pour être prévenu des nouveaux épisodes et des nouvelles saisons.',
|
||||
'newEp.nothing_one': 'Rien de neuf pour ta série ou ton anime suivi.',
|
||||
'newEp.nothing_other': 'Rien de neuf pour tes {count} séries et animes suivis.',
|
||||
'newEp.needKeyAlso': '(Ajoute ta clé TMDB dans les Réglages pour suivre aussi les séries et dramas.)',
|
||||
'newEp.newSeason': 'Nouvelle saison',
|
||||
'newEp.catchUp': 'À rattraper',
|
||||
'newEp.soon': 'Bientôt',
|
||||
'newEp.epWhen': 'Ép. {ep} {when}',
|
||||
'newEp.available_one': '{count} épisode dispo',
|
||||
'newEp.available_other': '{count} épisodes dispos',
|
||||
'newEp.next': 'Prochain : ép. {ep} {when}',
|
||||
'newEp.resume': 'Reprendre',
|
||||
|
||||
'top.pick': 'Choisir le n°{rank}',
|
||||
'top.shareTitle': 'Mon Top 5 {category}',
|
||||
@@ -479,10 +458,8 @@ const dict = {
|
||||
'reco.addLabel': 'Ajouter {title} à voir',
|
||||
'reco.addedShort': 'Ajouté',
|
||||
|
||||
'search.moviesSeries': 'Films & séries',
|
||||
'search.offline': 'Pas de connexion Internet : la recherche nécessite le réseau.',
|
||||
'search.fillFrom': 'Remplir depuis une base',
|
||||
'search.needKey': 'Pour chercher films, séries et dramas, ajoute ta clé TMDB gratuite dans les Réglages.',
|
||||
'search.openSettings': 'Ouvrir les Réglages',
|
||||
'search.already': 'déjà ajouté',
|
||||
'search.noResults': 'Aucun résultat. Tu peux remplir la fiche à la main ci-dessous.',
|
||||
@@ -572,12 +549,8 @@ const dict = {
|
||||
'form.plusEp': '+1 épisode',
|
||||
'form.total': 'Total',
|
||||
'form.season': 'Saison',
|
||||
'form.minPerEp': 'Min / ép.',
|
||||
'form.duration': 'Durée',
|
||||
'form.durationMin': 'Durée (minutes)',
|
||||
'form.info': 'Informations',
|
||||
'form.start': 'Début / vu le',
|
||||
'form.end': 'Fin',
|
||||
'form.year': 'Année',
|
||||
'form.platform': 'Plateforme',
|
||||
'form.genres': 'Genres / tags',
|
||||
@@ -592,8 +565,6 @@ const dict = {
|
||||
'form.deleteConfirm': '« {title} » sera supprimé définitivement.',
|
||||
'form.removeRewatch': 'Retirer ce revisionnage',
|
||||
'form.rewatchDate': 'Date du revisionnage',
|
||||
'form.reviewPublic': 'Afficher cet avis sur mon profil',
|
||||
'form.reviewPublicHint': 'Sinon, il reste visible par toi seul.',
|
||||
|
||||
'journal.rewatched': 'Revu',
|
||||
'journal.started': 'Commencé',
|
||||
@@ -724,7 +695,7 @@ const dict = {
|
||||
'social.bioPh': 'Ce que tu aimes regarder, tes genres préférés…',
|
||||
'social.privateAccount': 'Compte privé',
|
||||
'social.privateHint': 'Seuls les abonnés que tu acceptes voient tes visionnages.',
|
||||
'social.publicHint': 'Ton nom, ton pseudo, ta photo, ta bannière et ta bio sont visibles par tous les membres. Tes avis écrits restent privés, sauf ceux que tu choisis d\'afficher sur ton profil.',
|
||||
'social.publicHint': 'Ton nom, ton pseudo, ta photo, ta bannière, ta bio, tes notes et tes avis sont visibles par les membres. Passe ton compte en privé pour choisir qui peut les voir.',
|
||||
'social.requestsTab_one': 'Demande',
|
||||
'social.requestsTab_other': 'Demandes ({count})',
|
||||
'social.noFollowing': 'Aucun abonnement pour l\'instant.',
|
||||
@@ -762,15 +733,9 @@ const dict = {
|
||||
'welcome.later': "Plus tard",
|
||||
'social.watching': "En cours",
|
||||
'social.watchlist': "Envie de voir",
|
||||
'form.infoHint': "Dates, année, plateforme et genres — remplis automatiquement",
|
||||
'search.allKinds': "Films, séries et animes",
|
||||
'search.animeOnly': "Sans clé TMDB, seuls les animes sont trouvés.",
|
||||
'search.alreadySeries': "déjà dans ta bibliothèque — ouvrir",
|
||||
'form.episodesOfSeason': "Épisodes de la saison {season}",
|
||||
'form.seasonsTotal_one': "{seasons} saisons · {count} épisode au total",
|
||||
'form.seasonsTotal_other': "{seasons} saisons · {count} épisodes au total",
|
||||
'form.seasonEpisodes_one': "{count} épisode",
|
||||
'form.seasonEpisodes_other': "{count} épisodes",
|
||||
'form.startShort': "Commencé le",
|
||||
'form.endShort': "Fini le",
|
||||
'hero.allSeen': "Tout vu",
|
||||
@@ -786,6 +751,7 @@ const dict = {
|
||||
'episodes.short': "É{n}",
|
||||
'episodes.upcoming': "le {date}",
|
||||
'episodes.nameless': "Épisode {n}",
|
||||
'episodes.seasonShort': 'S{n}',
|
||||
'homeHero.continue': "Je regarde",
|
||||
'homeHero.next': "À voir ensuite",
|
||||
'homeHero.details': "Fiche",
|
||||
|
||||
+4
-38
@@ -9,10 +9,6 @@ const dict: Translations = {
|
||||
'common.add': 'Aggiungi',
|
||||
'common.delete': 'Elimina',
|
||||
'common.all': 'Tutto',
|
||||
'common.none': 'Nessuno',
|
||||
'common.noData': 'Ancora nessun dato.',
|
||||
'common.retry': 'Riprova',
|
||||
'common.back': 'Indietro',
|
||||
'common.offline': 'Nessuna connessione internet.',
|
||||
'common.minutes': '{n} min',
|
||||
'common.hours': '{h} h',
|
||||
@@ -63,9 +59,6 @@ const dict: Translations = {
|
||||
'subtype.stage': 'Spettacolo',
|
||||
'subtype.miniseries': 'Miniserie',
|
||||
|
||||
'platform.cinema': 'Cinema',
|
||||
'platform.dvd': 'DVD / Blu-ray',
|
||||
'platform.tv': 'TV',
|
||||
|
||||
'genre.action': 'Azione',
|
||||
'genre.adventure': 'Avventura',
|
||||
@@ -148,6 +141,7 @@ const dict: Translations = {
|
||||
'card.open': 'Apri {title}',
|
||||
|
||||
'rating.outOf10': 'Voto su 10',
|
||||
'rating.outOf5': 'Voto su 5',
|
||||
'rating.stars_one': '{count} stella',
|
||||
'rating.stars_other': '{count} stelle',
|
||||
'rating.clear': 'Cancella il voto',
|
||||
@@ -185,7 +179,7 @@ const dict: Translations = {
|
||||
'auth.sendLink': 'Invia il link',
|
||||
'auth.forgot': 'Password dimenticata?',
|
||||
'auth.backToLogin': 'Torna all’accesso',
|
||||
'auth.privacy': 'I tuoi dati sono collegati al tuo account e visibili solo a te. Restano anche sul tuo dispositivo per funzionare senza internet.',
|
||||
'auth.privacy': 'Il tuo account tiene al sicuro la tua libreria. Il tuo profilo (titoli, voti e opinioni) è visibile ai membri, a meno che tu non lo renda privato; liste e impostazioni restano private. Tutto resta anche sul tuo dispositivo per funzionare senza internet.',
|
||||
'auth.newPasswordTitle': 'Scegli la tua nuova password.',
|
||||
'auth.newPassword': 'Nuova password',
|
||||
'auth.err.credentials': 'Email o password errata.',
|
||||
@@ -436,21 +430,6 @@ const dict: Translations = {
|
||||
'roulette.seeItem': 'Vedi la scheda completa',
|
||||
'roulette.watchIt': 'Lo guardo',
|
||||
|
||||
'newEp.check': 'Controlla',
|
||||
'newEp.title': 'Novità',
|
||||
'newEp.checking': 'Controllo cosa è uscito…',
|
||||
'newEp.needKey': 'Aggiungi la tua chiave TMDB nelle Impostazioni per essere avvisato di nuovi episodi e nuove stagioni.',
|
||||
'newEp.nothing_one': 'Niente di nuovo per la serie o l’anime che segui.',
|
||||
'newEp.nothing_other': 'Niente di nuovo per le {count} serie e anime che segui.',
|
||||
'newEp.needKeyAlso': '(Aggiungi la tua chiave TMDB nelle Impostazioni per seguire anche serie e drama.)',
|
||||
'newEp.newSeason': 'Nuova stagione',
|
||||
'newEp.catchUp': 'Da recuperare',
|
||||
'newEp.soon': 'A breve',
|
||||
'newEp.epWhen': 'Ep. {ep} {when}',
|
||||
'newEp.available_one': '{count} episodio disponibile',
|
||||
'newEp.available_other': '{count} episodi disponibili',
|
||||
'newEp.next': 'Prossimo: ep. {ep} {when}',
|
||||
'newEp.resume': 'Riprendi',
|
||||
|
||||
'top.pick': 'Scegli il n°{rank}',
|
||||
'top.shareTitle': 'La mia Top 5 {category}',
|
||||
@@ -477,10 +456,8 @@ const dict: Translations = {
|
||||
'reco.addLabel': 'Aggiungi {title} a da vedere',
|
||||
'reco.addedShort': 'Aggiunto',
|
||||
|
||||
'search.moviesSeries': 'Film e serie',
|
||||
'search.offline': 'Nessuna connessione internet: la ricerca ha bisogno della rete.',
|
||||
'search.fillFrom': 'Compila da un database',
|
||||
'search.needKey': 'Per cercare film, serie e drama, aggiungi la tua chiave TMDB gratuita nelle Impostazioni.',
|
||||
'search.openSettings': 'Apri le Impostazioni',
|
||||
'search.already': 'già aggiunto',
|
||||
'search.noResults': 'Nessun risultato. Puoi compilare la scheda a mano qui sotto.',
|
||||
@@ -570,12 +547,8 @@ const dict: Translations = {
|
||||
'form.plusEp': '+1 episodio',
|
||||
'form.total': 'Totale',
|
||||
'form.season': 'Stagione',
|
||||
'form.minPerEp': 'Min / ep.',
|
||||
'form.duration': 'Durata',
|
||||
'form.durationMin': 'Durata (minuti)',
|
||||
'form.info': 'Informazioni',
|
||||
'form.start': 'Inizio / visto il',
|
||||
'form.end': 'Fine',
|
||||
'form.year': 'Anno',
|
||||
'form.platform': 'Piattaforma',
|
||||
'form.genres': 'Generi / tag',
|
||||
@@ -590,8 +563,6 @@ const dict: Translations = {
|
||||
'form.deleteConfirm': '«{title}» verrà eliminato per sempre.',
|
||||
'form.removeRewatch': 'Rimuovi questa visione',
|
||||
'form.rewatchDate': 'Data della nuova visione',
|
||||
'form.reviewPublic': 'Mostra questa opinione sul mio profilo',
|
||||
'form.reviewPublicHint': 'Altrimenti resta visibile solo a te.',
|
||||
|
||||
'journal.rewatched': 'Rivisto',
|
||||
'journal.started': 'Iniziato',
|
||||
@@ -722,7 +693,7 @@ const dict: Translations = {
|
||||
'social.bioPh': 'Cosa ti piace guardare, i tuoi generi preferiti…',
|
||||
'social.privateAccount': 'Account privato',
|
||||
'social.privateHint': 'Solo i follower che accetti vedono le tue visioni.',
|
||||
'social.publicHint': 'Il tuo nome, username, foto, banner e bio sono visibili a tutti gli utenti. Le tue opinioni scritte restano private, tranne quelle che scegli di mostrare sul tuo profilo.',
|
||||
'social.publicHint': 'Nome, username, foto, banner, bio, voti e opinioni sono visibili ai membri. Rendi privato il tuo account per scegliere chi può vederli.',
|
||||
'social.requestsTab_one': 'Richiesta',
|
||||
'social.requestsTab_other': 'Richieste ({count})',
|
||||
'social.noFollowing': 'Non segui ancora nessuno.',
|
||||
@@ -760,15 +731,9 @@ const dict: Translations = {
|
||||
'welcome.later': "Più tardi",
|
||||
'social.watching': "In corso",
|
||||
'social.watchlist': "Vuole vedere",
|
||||
'form.infoHint': "Date, anno, piattaforma e generi — compilati automaticamente",
|
||||
'search.allKinds': "Film, serie e anime",
|
||||
'search.animeOnly': "Senza chiave TMDB si trovano solo gli anime.",
|
||||
'search.alreadySeries': "già nella tua libreria — apri",
|
||||
'form.episodesOfSeason': "Episodi della stagione {season}",
|
||||
'form.seasonsTotal_one': "{seasons} stagioni · {count} episodio in totale",
|
||||
'form.seasonsTotal_other': "{seasons} stagioni · {count} episodi in totale",
|
||||
'form.seasonEpisodes_one': "{count} episodio",
|
||||
'form.seasonEpisodes_other': "{count} episodi",
|
||||
'form.startShort': "Iniziato",
|
||||
'form.endShort': "Finito",
|
||||
'hero.allSeen': "Tutto visto",
|
||||
@@ -784,6 +749,7 @@ const dict: Translations = {
|
||||
'episodes.short': "E{n}",
|
||||
'episodes.upcoming': "il {date}",
|
||||
'episodes.nameless': "Episodio {n}",
|
||||
'episodes.seasonShort': 'S{n}',
|
||||
'homeHero.continue': "Sto guardando",
|
||||
'homeHero.next': "Da vedere",
|
||||
'homeHero.details': "Scheda",
|
||||
|
||||
+4
-38
@@ -9,10 +9,6 @@ const dict: Translations = {
|
||||
'common.add': '追加',
|
||||
'common.delete': '削除',
|
||||
'common.all': 'すべて',
|
||||
'common.none': 'なし',
|
||||
'common.noData': 'まだデータがありません。',
|
||||
'common.retry': '再試行',
|
||||
'common.back': '戻る',
|
||||
'common.offline': 'インターネットに接続されていません。',
|
||||
'common.minutes': '{n}分',
|
||||
'common.hours': '{h}時間',
|
||||
@@ -63,9 +59,6 @@ const dict: Translations = {
|
||||
'subtype.stage': '舞台',
|
||||
'subtype.miniseries': 'ミニシリーズ',
|
||||
|
||||
'platform.cinema': '映画館',
|
||||
'platform.dvd': 'DVD / Blu-ray',
|
||||
'platform.tv': 'テレビ',
|
||||
|
||||
'genre.action': 'アクション',
|
||||
'genre.adventure': 'アドベンチャー',
|
||||
@@ -148,6 +141,7 @@ const dict: Translations = {
|
||||
'card.open': '{title}を開く',
|
||||
|
||||
'rating.outOf10': '10点満点で評価',
|
||||
'rating.outOf5': '5点満点の評価',
|
||||
'rating.stars_one': '星{count}つ',
|
||||
'rating.stars_other': '星{count}つ',
|
||||
'rating.clear': '評価を消す',
|
||||
@@ -185,7 +179,7 @@ const dict: Translations = {
|
||||
'auth.sendLink': 'リンクを送信',
|
||||
'auth.forgot': 'パスワードをお忘れですか?',
|
||||
'auth.backToLogin': 'ログインに戻る',
|
||||
'auth.privacy': 'データはあなたのアカウントに紐づき、あなただけが見られます。オフラインでも使えるよう、端末にも保存されます。',
|
||||
'auth.privacy': 'アカウントがライブラリを安全に守ります。プロフィール(作品・評価・レビュー)は非公開にしない限りメンバーに公開されます。リストと設定は非公開のままです。オフラインでも使えるよう、端末にも保存されます。',
|
||||
'auth.newPasswordTitle': '新しいパスワードを設定してください。',
|
||||
'auth.newPassword': '新しいパスワード',
|
||||
'auth.err.credentials': 'メールアドレスまたはパスワードが違います。',
|
||||
@@ -436,21 +430,6 @@ const dict: Translations = {
|
||||
'roulette.seeItem': '詳細を見る',
|
||||
'roulette.watchIt': 'これを見る',
|
||||
|
||||
'newEp.check': 'チェック',
|
||||
'newEp.title': '新着',
|
||||
'newEp.checking': '新着をチェック中…',
|
||||
'newEp.needKey': '設定でTMDBキーを追加すると、新しいエピソードやシーズンをお知らせします。',
|
||||
'newEp.nothing_one': 'フォロー中のドラマ・アニメに新着はありません。',
|
||||
'newEp.nothing_other': 'フォロー中の{count}作品に新着はありません。',
|
||||
'newEp.needKeyAlso': '(設定でTMDBキーを追加すると、ドラマもフォローできます。)',
|
||||
'newEp.newSeason': '新シーズン',
|
||||
'newEp.catchUp': '未視聴あり',
|
||||
'newEp.soon': '近日公開',
|
||||
'newEp.epWhen': '第{ep}話・{when}',
|
||||
'newEp.available_one': '{count}話配信中',
|
||||
'newEp.available_other': '{count}話配信中',
|
||||
'newEp.next': '次回:第{ep}話・{when}',
|
||||
'newEp.resume': '続きを見る',
|
||||
|
||||
'top.pick': '{rank}位を選ぶ',
|
||||
'top.shareTitle': 'マイトップ5 {category}',
|
||||
@@ -477,10 +456,8 @@ const dict: Translations = {
|
||||
'reco.addLabel': '{title}を見たいに追加',
|
||||
'reco.addedShort': '追加済み',
|
||||
|
||||
'search.moviesSeries': '映画・ドラマ',
|
||||
'search.offline': 'インターネットに接続されていません。検索にはネット接続が必要です。',
|
||||
'search.fillFrom': 'データベースから入力',
|
||||
'search.needKey': '映画やドラマを検索するには、設定で無料のTMDBキーを追加してください。',
|
||||
'search.openSettings': '設定を開く',
|
||||
'search.already': '追加済み',
|
||||
'search.noResults': '結果がありません。下から手動で入力できます。',
|
||||
@@ -570,12 +547,8 @@ const dict: Translations = {
|
||||
'form.plusEp': '+1話',
|
||||
'form.total': '全話数',
|
||||
'form.season': 'シーズン',
|
||||
'form.minPerEp': '分/話',
|
||||
'form.duration': '時間',
|
||||
'form.durationMin': '上映時間(分)',
|
||||
'form.info': '情報',
|
||||
'form.start': '開始日・視聴日',
|
||||
'form.end': '終了日',
|
||||
'form.year': '年',
|
||||
'form.platform': '配信サービス',
|
||||
'form.genres': 'ジャンル・タグ',
|
||||
@@ -590,8 +563,6 @@ const dict: Translations = {
|
||||
'form.deleteConfirm': '「{title}」を完全に削除します。',
|
||||
'form.removeRewatch': 'この再視聴を削除',
|
||||
'form.rewatchDate': '再視聴日',
|
||||
'form.reviewPublic': 'このレビューをプロフィールに表示',
|
||||
'form.reviewPublicHint': '表示しない場合は、あなただけが見られます。',
|
||||
|
||||
'journal.rewatched': '再視聴',
|
||||
'journal.started': '視聴開始',
|
||||
@@ -722,7 +693,7 @@ const dict: Translations = {
|
||||
'social.bioPh': '好きな作品や好きなジャンルなど…',
|
||||
'social.privateAccount': '非公開アカウント',
|
||||
'social.privateHint': 'あなたが承認したフォロワーだけが視聴記録を見られます。',
|
||||
'social.publicHint': '名前、ユーザー名、写真、バナー、自己紹介はすべてのメンバーに公開されます。書いたレビューは非公開のままです(プロフィールに表示すると選んだものを除く)。',
|
||||
'social.publicHint': '名前、ユーザー名、写真、バナー、自己紹介、評価、レビューはメンバーに公開されます。見せる相手を選ぶには、アカウントを非公開にしてください。',
|
||||
'social.requestsTab_one': 'リクエスト',
|
||||
'social.requestsTab_other': 'リクエスト({count})',
|
||||
'social.noFollowing': 'まだ誰もフォローしていません。',
|
||||
@@ -760,15 +731,9 @@ const dict: Translations = {
|
||||
'welcome.later': "あとで",
|
||||
'social.watching': "視聴中",
|
||||
'social.watchlist': "見たい",
|
||||
'form.infoHint': "日付・年・配信サービス・ジャンル — 自動で入力されます",
|
||||
'search.allKinds': "映画・ドラマ・アニメ",
|
||||
'search.animeOnly': "TMDB キーがない場合はアニメのみ検索できます。",
|
||||
'search.alreadySeries': "ライブラリにあります — 開く",
|
||||
'form.episodesOfSeason': "シーズン{season}のエピソード",
|
||||
'form.seasonsTotal_one': "{seasons}シーズン・全{count}話",
|
||||
'form.seasonsTotal_other': "{seasons}シーズン・全{count}話",
|
||||
'form.seasonEpisodes_one': "{count}話",
|
||||
'form.seasonEpisodes_other': "{count}話",
|
||||
'form.startShort': "開始日",
|
||||
'form.endShort': "完了日",
|
||||
'hero.allSeen': "すべて視聴済み",
|
||||
@@ -784,6 +749,7 @@ const dict: Translations = {
|
||||
'episodes.short': "第{n}話",
|
||||
'episodes.upcoming': "{date}",
|
||||
'episodes.nameless': "第{n}話",
|
||||
'episodes.seasonShort': 'S{n}',
|
||||
'homeHero.continue': "視聴中",
|
||||
'homeHero.next': "次に見る",
|
||||
'homeHero.details': "詳細",
|
||||
|
||||
+4
-38
@@ -9,10 +9,6 @@ const dict: Translations = {
|
||||
'common.add': '추가',
|
||||
'common.delete': '삭제',
|
||||
'common.all': '전체',
|
||||
'common.none': '없음',
|
||||
'common.noData': '아직 데이터가 없어요.',
|
||||
'common.retry': '다시 시도',
|
||||
'common.back': '뒤로',
|
||||
'common.offline': '인터넷에 연결되어 있지 않아요.',
|
||||
'common.minutes': '{n}분',
|
||||
'common.hours': '{h}시간',
|
||||
@@ -63,9 +59,6 @@ const dict: Translations = {
|
||||
'subtype.stage': '공연',
|
||||
'subtype.miniseries': '미니시리즈',
|
||||
|
||||
'platform.cinema': '극장',
|
||||
'platform.dvd': 'DVD / 블루레이',
|
||||
'platform.tv': 'TV',
|
||||
|
||||
'genre.action': '액션',
|
||||
'genre.adventure': '어드벤처',
|
||||
@@ -148,6 +141,7 @@ const dict: Translations = {
|
||||
'card.open': '{title} 열기',
|
||||
|
||||
'rating.outOf10': '10점 만점 평점',
|
||||
'rating.outOf5': '5점 만점 평점',
|
||||
'rating.stars_one': '별 {count}개',
|
||||
'rating.stars_other': '별 {count}개',
|
||||
'rating.clear': '평점 지우기',
|
||||
@@ -185,7 +179,7 @@ const dict: Translations = {
|
||||
'auth.sendLink': '링크 보내기',
|
||||
'auth.forgot': '비밀번호를 잊으셨나요?',
|
||||
'auth.backToLogin': '로그인으로 돌아가기',
|
||||
'auth.privacy': '데이터는 내 계정에 연결되며 나만 볼 수 있어요. 인터넷 없이도 쓸 수 있도록 기기에도 저장돼요.',
|
||||
'auth.privacy': '계정이 내 라이브러리를 안전하게 지켜줘요. 프로필(작품, 평점, 감상)은 비공개로 바꾸지 않으면 회원들이 볼 수 있고, 리스트와 설정은 비공개예요. 인터넷 없이도 쓸 수 있도록 기기에도 저장돼요.',
|
||||
'auth.newPasswordTitle': '새 비밀번호를 정해 주세요.',
|
||||
'auth.newPassword': '새 비밀번호',
|
||||
'auth.err.credentials': '이메일 또는 비밀번호가 올바르지 않아요.',
|
||||
@@ -436,21 +430,6 @@ const dict: Translations = {
|
||||
'roulette.seeItem': '작품 정보 전체 보기',
|
||||
'roulette.watchIt': '이거 볼래요',
|
||||
|
||||
'newEp.check': '확인',
|
||||
'newEp.title': '새 소식',
|
||||
'newEp.checking': '새로 나온 게 있는지 보는 중…',
|
||||
'newEp.needKey': '설정에서 TMDB 키를 추가하면 새 에피소드와 새 시즌 소식을 받을 수 있어요.',
|
||||
'newEp.nothing_one': '보고 있는 시리즈나 애니에 새 소식이 없어요.',
|
||||
'newEp.nothing_other': '보고 있는 시리즈와 애니 {count}개에 새 소식이 없어요.',
|
||||
'newEp.needKeyAlso': '(설정에서 TMDB 키를 추가하면 시리즈와 드라마도 챙겨 볼 수 있어요.)',
|
||||
'newEp.newSeason': '새 시즌',
|
||||
'newEp.catchUp': '따라잡기',
|
||||
'newEp.soon': '곧 공개',
|
||||
'newEp.epWhen': '{ep}화 {when}',
|
||||
'newEp.available_one': '{count}화 시청 가능',
|
||||
'newEp.available_other': '{count}화 시청 가능',
|
||||
'newEp.next': '다음: {ep}화 {when}',
|
||||
'newEp.resume': '이어 보기',
|
||||
|
||||
'top.pick': '{rank}위 고르기',
|
||||
'top.shareTitle': '나의 {category} TOP 5',
|
||||
@@ -477,10 +456,8 @@ const dict: Translations = {
|
||||
'reco.addLabel': '{title}을(를) 볼 예정에 추가',
|
||||
'reco.addedShort': '추가됨',
|
||||
|
||||
'search.moviesSeries': '영화 & 시리즈',
|
||||
'search.offline': '인터넷에 연결되어 있지 않아요. 검색하려면 네트워크가 필요해요.',
|
||||
'search.fillFrom': '데이터베이스에서 채우기',
|
||||
'search.needKey': '영화, 시리즈, 드라마를 검색하려면 설정에서 무료 TMDB 키를 추가해 주세요.',
|
||||
'search.openSettings': '설정 열기',
|
||||
'search.already': '이미 추가됨',
|
||||
'search.noResults': '결과가 없어요. 아래에서 직접 입력할 수 있어요.',
|
||||
@@ -570,12 +547,8 @@ const dict: Translations = {
|
||||
'form.plusEp': '+1화',
|
||||
'form.total': '전체',
|
||||
'form.season': '시즌',
|
||||
'form.minPerEp': '화당 분',
|
||||
'form.duration': '러닝타임',
|
||||
'form.durationMin': '러닝타임 (분)',
|
||||
'form.info': '정보',
|
||||
'form.start': '시작 / 본 날짜',
|
||||
'form.end': '종료',
|
||||
'form.year': '연도',
|
||||
'form.platform': '플랫폼',
|
||||
'form.genres': '장르 / 태그',
|
||||
@@ -590,8 +563,6 @@ const dict: Translations = {
|
||||
'form.deleteConfirm': '‘{title}’이(가) 영구적으로 삭제돼요.',
|
||||
'form.removeRewatch': '이 기록 삭제',
|
||||
'form.rewatchDate': '다시 본 날짜',
|
||||
'form.reviewPublic': '이 감상을 내 프로필에 표시',
|
||||
'form.reviewPublicHint': '표시하지 않으면 나만 볼 수 있어요.',
|
||||
|
||||
'journal.rewatched': '다시 봄',
|
||||
'journal.started': '시작',
|
||||
@@ -722,7 +693,7 @@ const dict: Translations = {
|
||||
'social.bioPh': '즐겨 보는 것, 좋아하는 장르…',
|
||||
'social.privateAccount': '비공개 계정',
|
||||
'social.privateHint': '내가 수락한 팔로워만 내 시청 기록을 볼 수 있어요.',
|
||||
'social.publicHint': '이름, 아이디, 사진, 배너, 소개는 모든 회원이 볼 수 있어요. 작성한 감상은 비공개로 유지되고, 프로필에 표시하기로 한 감상만 공개돼요.',
|
||||
'social.publicHint': '이름, 아이디, 사진, 배너, 소개, 평점과 감상은 회원들이 볼 수 있어요. 볼 수 있는 사람을 고르려면 계정을 비공개로 바꾸세요.',
|
||||
'social.requestsTab_one': '요청',
|
||||
'social.requestsTab_other': '요청 ({count})',
|
||||
'social.noFollowing': '아직 팔로우한 사람이 없어요.',
|
||||
@@ -760,15 +731,9 @@ const dict: Translations = {
|
||||
'welcome.later': "나중에",
|
||||
'social.watching': "보는 중",
|
||||
'social.watchlist': "보고 싶어요",
|
||||
'form.infoHint': "날짜, 연도, 플랫폼, 장르 — 자동으로 채워져요",
|
||||
'search.allKinds': "영화, 시리즈, 애니",
|
||||
'search.animeOnly': "TMDB 키가 없으면 애니만 찾을 수 있어요.",
|
||||
'search.alreadySeries': "이미 라이브러리에 있어요 — 열기",
|
||||
'form.episodesOfSeason': "시즌 {season} 에피소드",
|
||||
'form.seasonsTotal_one': "{seasons}개 시즌 · 총 {count}화",
|
||||
'form.seasonsTotal_other': "{seasons}개 시즌 · 총 {count}화",
|
||||
'form.seasonEpisodes_one': "{count}화",
|
||||
'form.seasonEpisodes_other': "{count}화",
|
||||
'form.startShort': "시작일",
|
||||
'form.endShort': "완료일",
|
||||
'hero.allSeen': "모두 시청함",
|
||||
@@ -784,6 +749,7 @@ const dict: Translations = {
|
||||
'episodes.short': "{n}화",
|
||||
'episodes.upcoming': "{date}",
|
||||
'episodes.nameless': "{n}화",
|
||||
'episodes.seasonShort': 'S{n}',
|
||||
'homeHero.continue': "보는 중",
|
||||
'homeHero.next': "다음에 볼 작품",
|
||||
'homeHero.details': "상세",
|
||||
|
||||
+4
-38
@@ -9,10 +9,6 @@ const dict: Translations = {
|
||||
'common.add': 'Adicionar',
|
||||
'common.delete': 'Excluir',
|
||||
'common.all': 'Tudo',
|
||||
'common.none': 'Nenhum',
|
||||
'common.noData': 'Ainda não há dados.',
|
||||
'common.retry': 'Tentar de novo',
|
||||
'common.back': 'Voltar',
|
||||
'common.offline': 'Sem conexão com a internet.',
|
||||
'common.minutes': '{n} min',
|
||||
'common.hours': '{h} h',
|
||||
@@ -63,9 +59,6 @@ const dict: Translations = {
|
||||
'subtype.stage': 'Espetáculo',
|
||||
'subtype.miniseries': 'Minissérie',
|
||||
|
||||
'platform.cinema': 'Cinema',
|
||||
'platform.dvd': 'DVD / Blu-ray',
|
||||
'platform.tv': 'TV',
|
||||
|
||||
'genre.action': 'Ação',
|
||||
'genre.adventure': 'Aventura',
|
||||
@@ -148,6 +141,7 @@ const dict: Translations = {
|
||||
'card.open': 'Abrir {title}',
|
||||
|
||||
'rating.outOf10': 'Nota de 0 a 10',
|
||||
'rating.outOf5': 'Nota de 0 a 5',
|
||||
'rating.stars_one': '{count} estrela',
|
||||
'rating.stars_other': '{count} estrelas',
|
||||
'rating.clear': 'Apagar a nota',
|
||||
@@ -185,7 +179,7 @@ const dict: Translations = {
|
||||
'auth.sendLink': 'Enviar o link',
|
||||
'auth.forgot': 'Esqueceu a senha?',
|
||||
'auth.backToLogin': 'Voltar para o login',
|
||||
'auth.privacy': 'Seus dados ficam vinculados à sua conta e só você pode vê-los. Eles também ficam no seu aparelho para funcionar sem internet.',
|
||||
'auth.privacy': 'Sua conta guarda sua biblioteca com segurança. Seu perfil (títulos, notas e opiniões) fica visível para os membros, a menos que você o torne privado; suas listas e configurações continuam privadas. Tudo também fica no seu aparelho para funcionar sem internet.',
|
||||
'auth.newPasswordTitle': 'Escolha sua nova senha.',
|
||||
'auth.newPassword': 'Nova senha',
|
||||
'auth.err.credentials': 'E-mail ou senha incorretos.',
|
||||
@@ -436,21 +430,6 @@ const dict: Translations = {
|
||||
'roulette.seeItem': 'Ver a ficha completa',
|
||||
'roulette.watchIt': 'Vou assistir',
|
||||
|
||||
'newEp.check': 'Verificar',
|
||||
'newEp.title': 'Novidades',
|
||||
'newEp.checking': 'Vendo o que saiu…',
|
||||
'newEp.needKey': 'Adicione sua chave do TMDB em Ajustes para ser avisado de novos episódios e novas temporadas.',
|
||||
'newEp.nothing_one': 'Nada de novo na sua série ou anime acompanhado.',
|
||||
'newEp.nothing_other': 'Nada de novo nas suas {count} séries e animes acompanhados.',
|
||||
'newEp.needKeyAlso': '(Adicione sua chave do TMDB em Ajustes para acompanhar também séries e doramas.)',
|
||||
'newEp.newSeason': 'Nova temporada',
|
||||
'newEp.catchUp': 'Para colocar em dia',
|
||||
'newEp.soon': 'Em breve',
|
||||
'newEp.epWhen': 'Ep. {ep} {when}',
|
||||
'newEp.available_one': '{count} episódio disponível',
|
||||
'newEp.available_other': '{count} episódios disponíveis',
|
||||
'newEp.next': 'Próximo: ep. {ep} {when}',
|
||||
'newEp.resume': 'Continuar',
|
||||
|
||||
'top.pick': 'Escolher o nº {rank}',
|
||||
'top.shareTitle': 'Meu Top 5 {category}',
|
||||
@@ -477,10 +456,8 @@ const dict: Translations = {
|
||||
'reco.addLabel': 'Adicionar {title} a “Quero ver”',
|
||||
'reco.addedShort': 'Adicionado',
|
||||
|
||||
'search.moviesSeries': 'Filmes e séries',
|
||||
'search.offline': 'Sem conexão com a internet: a busca precisa de rede.',
|
||||
'search.fillFrom': 'Preencher a partir de uma base',
|
||||
'search.needKey': 'Para buscar filmes, séries e doramas, adicione sua chave grátis do TMDB em Ajustes.',
|
||||
'search.openSettings': 'Abrir Ajustes',
|
||||
'search.already': 'já adicionado',
|
||||
'search.noResults': 'Nenhum resultado. Você pode preencher a ficha à mão abaixo.',
|
||||
@@ -570,12 +547,8 @@ const dict: Translations = {
|
||||
'form.plusEp': '+1 episódio',
|
||||
'form.total': 'Total',
|
||||
'form.season': 'Temporada',
|
||||
'form.minPerEp': 'Min / ep.',
|
||||
'form.duration': 'Duração',
|
||||
'form.durationMin': 'Duração (minutos)',
|
||||
'form.info': 'Informações',
|
||||
'form.start': 'Início / visto em',
|
||||
'form.end': 'Fim',
|
||||
'form.year': 'Ano',
|
||||
'form.platform': 'Plataforma',
|
||||
'form.genres': 'Gêneros / tags',
|
||||
@@ -590,8 +563,6 @@ const dict: Translations = {
|
||||
'form.deleteConfirm': '“{title}” será excluído para sempre.',
|
||||
'form.removeRewatch': 'Remover esta revisão',
|
||||
'form.rewatchDate': 'Data da revisão',
|
||||
'form.reviewPublic': 'Mostrar esta opinião no meu perfil',
|
||||
'form.reviewPublicHint': 'Se não, ela fica visível só para você.',
|
||||
|
||||
'journal.rewatched': 'Revisto',
|
||||
'journal.started': 'Começado',
|
||||
@@ -722,7 +693,7 @@ const dict: Translations = {
|
||||
'social.bioPh': 'O que você gosta de assistir, seus gêneros favoritos…',
|
||||
'social.privateAccount': 'Conta privada',
|
||||
'social.privateHint': 'Só os seguidores que você aceitar veem o que você assiste.',
|
||||
'social.publicHint': 'Seu nome, nome de usuário, foto, banner e bio ficam visíveis para todos os membros. Suas opiniões escritas continuam privadas, exceto as que você escolher mostrar no seu perfil.',
|
||||
'social.publicHint': 'Seu nome, nome de usuário, foto, banner, bio, notas e opiniões ficam visíveis para os membros. Torne sua conta privada para escolher quem pode vê-los.',
|
||||
'social.requestsTab_one': 'Solicitação',
|
||||
'social.requestsTab_other': 'Solicitações ({count})',
|
||||
'social.noFollowing': 'Você ainda não segue ninguém.',
|
||||
@@ -760,15 +731,9 @@ const dict: Translations = {
|
||||
'welcome.later': "Depois",
|
||||
'social.watching': "Assistindo",
|
||||
'social.watchlist': "Quer assistir",
|
||||
'form.infoHint': "Datas, ano, plataforma e gêneros — preenchidos automaticamente",
|
||||
'search.allKinds': "Filmes, séries e animes",
|
||||
'search.animeOnly': "Sem chave do TMDB, só animes são encontrados.",
|
||||
'search.alreadySeries': "já está na sua biblioteca — abrir",
|
||||
'form.episodesOfSeason': "Episódios da temporada {season}",
|
||||
'form.seasonsTotal_one': "{seasons} temporadas · {count} episódio no total",
|
||||
'form.seasonsTotal_other': "{seasons} temporadas · {count} episódios no total",
|
||||
'form.seasonEpisodes_one': "{count} episódio",
|
||||
'form.seasonEpisodes_other': "{count} episódios",
|
||||
'form.startShort': "Começou",
|
||||
'form.endShort': "Terminou",
|
||||
'hero.allSeen': "Tudo visto",
|
||||
@@ -784,6 +749,7 @@ const dict: Translations = {
|
||||
'episodes.short': "E{n}",
|
||||
'episodes.upcoming': "em {date}",
|
||||
'episodes.nameless': "Episódio {n}",
|
||||
'episodes.seasonShort': 'T{n}',
|
||||
'homeHero.continue': "Assistindo agora",
|
||||
'homeHero.next': "Para ver depois",
|
||||
'homeHero.details': "Detalhes",
|
||||
|
||||
+4
-38
@@ -9,10 +9,6 @@ const dict: Translations = {
|
||||
'common.add': '添加',
|
||||
'common.delete': '删除',
|
||||
'common.all': '全部',
|
||||
'common.none': '无',
|
||||
'common.noData': '还没有数据。',
|
||||
'common.retry': '重试',
|
||||
'common.back': '返回',
|
||||
'common.offline': '没有网络连接。',
|
||||
'common.minutes': '{n}分钟',
|
||||
'common.hours': '{h}小时',
|
||||
@@ -63,9 +59,6 @@ const dict: Translations = {
|
||||
'subtype.stage': '舞台演出',
|
||||
'subtype.miniseries': '迷你剧',
|
||||
|
||||
'platform.cinema': '电影院',
|
||||
'platform.dvd': 'DVD / 蓝光',
|
||||
'platform.tv': '电视',
|
||||
|
||||
'genre.action': '动作',
|
||||
'genre.adventure': '冒险',
|
||||
@@ -148,6 +141,7 @@ const dict: Translations = {
|
||||
'card.open': '打开《{title}》',
|
||||
|
||||
'rating.outOf10': '10分制评分',
|
||||
'rating.outOf5': '5分制评分',
|
||||
'rating.stars_one': '{count}星',
|
||||
'rating.stars_other': '{count}星',
|
||||
'rating.clear': '清除评分',
|
||||
@@ -185,7 +179,7 @@ const dict: Translations = {
|
||||
'auth.sendLink': '发送链接',
|
||||
'auth.forgot': '忘记密码?',
|
||||
'auth.backToLogin': '返回登录',
|
||||
'auth.privacy': '你的数据与账号绑定,只有你自己能看到。数据也会保存在你的设备上,没网也能用。',
|
||||
'auth.privacy': '账号会保护你的片库。你的主页(作品、评分和短评)对用户可见,除非你设为私密;你的片单和设置始终私密。数据也会保存在你的设备上,没网也能用。',
|
||||
'auth.newPasswordTitle': '设置你的新密码。',
|
||||
'auth.newPassword': '新密码',
|
||||
'auth.err.credentials': '邮箱或密码错误。',
|
||||
@@ -436,21 +430,6 @@ const dict: Translations = {
|
||||
'roulette.seeItem': '查看完整详情',
|
||||
'roulette.watchIt': '就看这个',
|
||||
|
||||
'newEp.check': '检查',
|
||||
'newEp.title': '最新更新',
|
||||
'newEp.checking': '正在查看有什么新内容…',
|
||||
'newEp.needKey': '在「设置」中添加你的 TMDB 密钥,就能收到新集和新季的提醒。',
|
||||
'newEp.nothing_one': '你追的剧集或动画暂无更新。',
|
||||
'newEp.nothing_other': '你追的{count}部剧集和动画暂无更新。',
|
||||
'newEp.needKeyAlso': '(在「设置」中添加你的 TMDB 密钥,就能同时追剧集和电视剧。)',
|
||||
'newEp.newSeason': '新一季',
|
||||
'newEp.catchUp': '待补',
|
||||
'newEp.soon': '即将播出',
|
||||
'newEp.epWhen': '第{ep}集 {when}',
|
||||
'newEp.available_one': '{count}集可看',
|
||||
'newEp.available_other': '{count}集可看',
|
||||
'newEp.next': '下一集:第{ep}集 {when}',
|
||||
'newEp.resume': '继续看',
|
||||
|
||||
'top.pick': '选择第{rank}名',
|
||||
'top.shareTitle': '我的{category} Top 5',
|
||||
@@ -477,10 +456,8 @@ const dict: Translations = {
|
||||
'reco.addLabel': '将《{title}》加入想看',
|
||||
'reco.addedShort': '已添加',
|
||||
|
||||
'search.moviesSeries': '电影和剧集',
|
||||
'search.offline': '没有网络连接:搜索需要联网。',
|
||||
'search.fillFrom': '从数据库填写',
|
||||
'search.needKey': '要搜索电影、剧集和电视剧,请在「设置」中添加你的免费 TMDB 密钥。',
|
||||
'search.openSettings': '打开「设置」',
|
||||
'search.already': '已添加',
|
||||
'search.noResults': '没有结果。你可以在下方手动填写。',
|
||||
@@ -570,12 +547,8 @@ const dict: Translations = {
|
||||
'form.plusEp': '+1集',
|
||||
'form.total': '总集数',
|
||||
'form.season': '季',
|
||||
'form.minPerEp': '分钟/集',
|
||||
'form.duration': '时长',
|
||||
'form.durationMin': '时长(分钟)',
|
||||
'form.info': '信息',
|
||||
'form.start': '开始 / 观看日期',
|
||||
'form.end': '结束',
|
||||
'form.year': '年份',
|
||||
'form.platform': '平台',
|
||||
'form.genres': '类型 / 标签',
|
||||
@@ -590,8 +563,6 @@ const dict: Translations = {
|
||||
'form.deleteConfirm': '《{title}》将被永久删除。',
|
||||
'form.removeRewatch': '移除这次重温',
|
||||
'form.rewatchDate': '重温日期',
|
||||
'form.reviewPublic': '在我的主页上显示这条短评',
|
||||
'form.reviewPublicHint': '否则只有你自己能看到。',
|
||||
|
||||
'journal.rewatched': '重温',
|
||||
'journal.started': '开始看',
|
||||
@@ -722,7 +693,7 @@ const dict: Translations = {
|
||||
'social.bioPh': '你喜欢看什么、最爱的类型…',
|
||||
'social.privateAccount': '私密账号',
|
||||
'social.privateHint': '只有你同意的粉丝才能看到你的观看记录。',
|
||||
'social.publicHint': '你的昵称、用户名、头像、横幅和简介对所有用户可见。你写的短评保持私密,除非你选择在主页上显示。',
|
||||
'social.publicHint': '你的昵称、用户名、头像、横幅、简介、评分和短评对用户可见。将账号设为私密即可选择谁能看到。',
|
||||
'social.requestsTab_one': '申请',
|
||||
'social.requestsTab_other': '申请({count})',
|
||||
'social.noFollowing': '还没有关注任何人。',
|
||||
@@ -760,15 +731,9 @@ const dict: Translations = {
|
||||
'welcome.later': "稍后",
|
||||
'social.watching': "正在看",
|
||||
'social.watchlist': "想看",
|
||||
'form.infoHint': "日期、年份、平台和类型——自动填写",
|
||||
'search.allKinds': "电影、剧集和动画",
|
||||
'search.animeOnly': "没有 TMDB 密钥时只能找到动画。",
|
||||
'search.alreadySeries': "已在你的片库中——打开",
|
||||
'form.episodesOfSeason': "第 {season} 季的集数",
|
||||
'form.seasonsTotal_one': "{seasons} 季 · 共 {count} 集",
|
||||
'form.seasonsTotal_other': "{seasons} 季 · 共 {count} 集",
|
||||
'form.seasonEpisodes_one': "{count} 集",
|
||||
'form.seasonEpisodes_other': "{count} 集",
|
||||
'form.startShort': "开始于",
|
||||
'form.endShort': "看完于",
|
||||
'hero.allSeen': "全部看完",
|
||||
@@ -784,6 +749,7 @@ const dict: Translations = {
|
||||
'episodes.short': "第{n}集",
|
||||
'episodes.upcoming': "{date}",
|
||||
'episodes.nameless': "第 {n} 集",
|
||||
'episodes.seasonShort': '第{n}季',
|
||||
'homeHero.continue': "正在看",
|
||||
'homeHero.next': "接下来看",
|
||||
'homeHero.details': "详情",
|
||||
|
||||
+4
-2
@@ -4,6 +4,8 @@ import { CLOUD_TMDB, isPlausibleTmdbKey } from './catalogApi'
|
||||
import { tmdbViaCloud } from './cloud/api'
|
||||
import { TYPE_BY_VALUE } from './constants'
|
||||
import { isPlainObject, isSafeExternalId, isSafeId, isSafeTmdbPath, readStorage, remoteImage, safeDay, safeIso, safeSeasons } from './security'
|
||||
import { episodeCap } from './franchise'
|
||||
import { localDay } from './utils'
|
||||
|
||||
/**
|
||||
* Suivi des nouveaux épisodes.
|
||||
@@ -165,7 +167,7 @@ async function checkAniList(ids: number[]): Promise<Map<number, Omit<AiringInfo,
|
||||
out.set(m.id, {
|
||||
aired: nx ? Math.max(0, n0(nx.episode) - 1) : n0(m.episodes),
|
||||
ended: m.status === 'FINISHED' || m.status === 'CANCELLED',
|
||||
next: nx && ts ? { episode: n0(nx.episode), date: new Date(ts * 1000).toISOString().slice(0, 10) } : undefined,
|
||||
next: nx && ts ? { episode: n0(nx.episode), date: localDay(new Date(ts * 1000)) } : undefined,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -227,7 +229,7 @@ export function novelties(items: MediaItem[], cache: AiringCache): Novelty[] {
|
||||
const unwatched = Math.max(0, info.aired - item.episodesWatched)
|
||||
if (item.status === 'termine') {
|
||||
// Terminé de mon côté, mais de nouveaux épisodes sont sortis depuis → nouvelle saison
|
||||
if (unwatched > 0 && item.episodesTotal && info.aired > item.episodesTotal) out.push({ item, info, unwatched, kind: 'new_season' })
|
||||
if (unwatched > 0 && episodeCap(item) && info.aired > episodeCap(item)!) out.push({ item, info, unwatched, kind: 'new_season' })
|
||||
} else if (unwatched > 0) {
|
||||
out.push({ item, info, unwatched, kind: 'new_episodes' })
|
||||
} else if (info.next && new Date(info.next.date).getTime() < soon) {
|
||||
|
||||
+7
-6
@@ -1,6 +1,7 @@
|
||||
import { t } from '../i18n'
|
||||
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'
|
||||
import {
|
||||
cleanText,
|
||||
@@ -61,9 +62,7 @@ function safeDates(v: unknown): string[] | undefined {
|
||||
return out.length ? out : undefined
|
||||
}
|
||||
|
||||
/** Valide et nettoie une fiche venant d'un fichier importé. Renvoie null si inutilisable. */
|
||||
|
||||
|
||||
/** Valide et nettoie une fiche (import, synchro, écriture locale). Renvoie null si inutilisable. */
|
||||
export function normalizeItem(raw: unknown): MediaItem | null {
|
||||
if (!isPlainObject(raw)) return null
|
||||
const r = raw
|
||||
@@ -78,8 +77,11 @@ export function normalizeItem(raw: unknown): MediaItem | null {
|
||||
}
|
||||
const type = (TYPES.has(r.type as string) ? r.type : 'autre') as MediaType
|
||||
const episodesTotal = int(r.episodesTotal, 0, 100000) || undefined
|
||||
const seasons = safeSeasons(r.seasons)
|
||||
let episodesWatched = int(r.episodesWatched, 0, 100000) ?? 0
|
||||
if (episodesTotal && episodesWatched > episodesTotal) episodesWatched = episodesTotal
|
||||
// Plafond : toutes les saisons connues (la fiche peut en avoir plus que le total enregistré)
|
||||
const cap = episodeCap({ episodesTotal, seasons })
|
||||
if (cap && episodesWatched > cap) episodesWatched = cap
|
||||
const listIds = safeStringList(r.listIds, LIMITS.lists, 64).filter(isSafeId)
|
||||
return {
|
||||
id: isSafeId(r.id) ? r.id : uid(),
|
||||
@@ -95,7 +97,7 @@ export function normalizeItem(raw: unknown): MediaItem | null {
|
||||
episodesWatched,
|
||||
episodesTotal,
|
||||
season: int(r.season, 0, 1000) || undefined,
|
||||
seasons: safeSeasons(r.seasons),
|
||||
seasons,
|
||||
episodeDuration: int(r.episodeDuration, 0, 1440) || undefined,
|
||||
duration: int(r.duration, 0, 6000) || undefined,
|
||||
startDate: safeDay(r.startDate),
|
||||
@@ -103,7 +105,6 @@ export function normalizeItem(raw: unknown): MediaItem | null {
|
||||
genres: safeStringList(r.genres, LIMITS.genres),
|
||||
platform: cleanText(r.platform, LIMITS.shortText),
|
||||
notes: cleanText(r.notes, LIMITS.notes),
|
||||
notesPublic: r.notesPublic === true || undefined,
|
||||
poster: safePosterUrl(r.poster),
|
||||
backdrop: remoteImage(r.backdrop),
|
||||
overview: cleanText(r.overview, LIMITS.overview),
|
||||
|
||||
@@ -5,6 +5,7 @@ import { TYPE_BY_VALUE } from './constants'
|
||||
import { subtypeLabel, tmdbGenres } from './genres'
|
||||
import { franchiseKey } from './franchise'
|
||||
import { cleanText, isSafeExternalId, isSafeTmdbPath, LIMITS, remoteImage, safeCountries, safeDay, safePosterUrl, safeSeasons, safeStringList } from './security'
|
||||
import { localDay } from './utils'
|
||||
|
||||
/**
|
||||
* Recherche dans les bases publiques :
|
||||
@@ -666,7 +667,7 @@ export async function getTmdbRelease(externalId: string, key: string): Promise<R
|
||||
const pick = (type: number) => day(local.filter((r) => r.type === type).map((r) => r.release_date ?? '').sort()[0])
|
||||
const cinema = pick(3) ?? pick(2)
|
||||
const online = pick(4)
|
||||
const today = new Date().toISOString().slice(0, 10)
|
||||
const today = localDay()
|
||||
if (cinema && cinema >= today) return { date: cinema, label: t('release.cinema') }
|
||||
if (online && online >= today) return { date: online, label: t('release.online') }
|
||||
const primary = day(d.release_date)
|
||||
@@ -708,7 +709,7 @@ export async function getAniListReleases(ids: number[]): Promise<Map<number, Rel
|
||||
if (!Number.isInteger(m?.id)) continue
|
||||
const nx = m.nextAiringEpisode
|
||||
if (nx && typeof nx.airingAt === 'number' && nx.airingAt > 0 && nx.airingAt < 4102444800) {
|
||||
out.set(m.id, { date: new Date(nx.airingAt * 1000).toISOString().slice(0, 10), label: nx.episode === 1 ? t('release.firstEpisode') : nx.episode ? t('release.episode', { ep: nx.episode }) : t('release.newEpisode') })
|
||||
out.set(m.id, { date: localDay(new Date(nx.airingAt * 1000)), label: nx.episode === 1 ? t('release.firstEpisode') : nx.episode ? t('release.episode', { ep: nx.episode }) : t('release.newEpisode') })
|
||||
} else if (m.startDate?.year && m.startDate.month && m.startDate.day) {
|
||||
const d = `${m.startDate.year}-${String(m.startDate.month).padStart(2, '0')}-${String(m.startDate.day).padStart(2, '0')}`
|
||||
if (day(d)) out.set(m.id, { date: d, label: t('release.firstEpisode') })
|
||||
@@ -737,8 +738,6 @@ export interface GlobalRelease {
|
||||
pop: number
|
||||
}
|
||||
|
||||
const localDay = (d: Date) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`
|
||||
|
||||
function safeRelease(r: GlobalRelease): GlobalRelease | null {
|
||||
const title = cleanText(r.title, LIMITS.title)
|
||||
const date = day(r.date)
|
||||
|
||||
@@ -261,12 +261,14 @@ async function refresh(): Promise<Session | null> {
|
||||
try {
|
||||
const data = await gotrue('/token?grant_type=refresh_token', { body: { refresh_token: s.refreshToken } })
|
||||
const next = toSession(data)
|
||||
if (next && next.user.id === s.user.id) setSession(next)
|
||||
// Déconnexion (ou autre compte) pendant le renouvellement : on ne ressuscite pas l'ancienne session
|
||||
if (!next || next.user.id !== s.user.id || current?.user.id !== s.user.id) return null
|
||||
setSession(next)
|
||||
return next
|
||||
} catch (e) {
|
||||
// Jeton de renouvellement refusé (révoqué, compte supprimé…) : on déconnecte
|
||||
const status = (e as { status?: number }).status
|
||||
if (status === 400 || status === 401 || status === 403) setSession(null)
|
||||
if ((status === 400 || status === 401 || status === 403) && current?.user.id === s.user.id) setSession(null)
|
||||
return null
|
||||
} finally {
|
||||
refreshing = null
|
||||
@@ -300,6 +302,7 @@ export async function consumeAuthRedirect(): Promise<{ type?: string; error?: st
|
||||
return { error: code === 'otp_expired' ? t('auth.err.linkExpired') : t('auth.err.linkUsed') }
|
||||
}
|
||||
const accessToken = params.get('access_token') ?? ''
|
||||
if (!TOKEN.test(accessToken)) return { error: t('auth.err.linkInvalid') }
|
||||
try {
|
||||
const user = await gotrue('/user', { method: 'GET', token: accessToken })
|
||||
const s = toSession({
|
||||
@@ -310,6 +313,8 @@ export async function consumeAuthRedirect(): Promise<{ type?: string; error?: st
|
||||
user,
|
||||
})
|
||||
if (!s) return { error: t('auth.err.linkInvalid') }
|
||||
// Un lien ne doit jamais remplacer en douce le compte déjà ouvert sur cet appareil
|
||||
if (current && current.user.id !== s.user.id) return { error: t('auth.err.linkInvalid') }
|
||||
setSession(s)
|
||||
return { type: params.get('type') ?? undefined }
|
||||
} catch (e) {
|
||||
|
||||
+13
-2
@@ -299,15 +299,26 @@ export function createSync(userId: string, hooks: SyncHooks): SyncEngine {
|
||||
}
|
||||
setStatus({ state: 'syncing', error: undefined })
|
||||
try {
|
||||
await push()
|
||||
// Un envoi refusé (fiche trop lourde, quota…) ne doit pas empêcher de recevoir les autres appareils
|
||||
let pushError: unknown
|
||||
try {
|
||||
await push()
|
||||
} catch (e) {
|
||||
pushError = e
|
||||
}
|
||||
// Déconnexion pendant la synchro : on n'écrit plus rien dans la base de cet utilisateur
|
||||
if (stopped) return
|
||||
await pullItems()
|
||||
if (stopped) return
|
||||
await pullLists()
|
||||
if (stopped) return
|
||||
await pullSettings()
|
||||
if (pushError) throw pushError
|
||||
meta.lastSyncAt = new Date().toISOString()
|
||||
saveMeta()
|
||||
setStatus({ state: 'idle', lastSyncAt: meta.lastSyncAt })
|
||||
} catch (e) {
|
||||
setStatus({ state: navigator.onLine ? 'error' : 'offline', error: (e as Error).message })
|
||||
if (!stopped) setStatus({ state: navigator.onLine ? 'error' : 'offline', error: (e as Error).message })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,12 +47,6 @@ export const CRITERIA: { key: CriteriaKey; readonly label: string }[] = [
|
||||
{ key: 'ost', get label() { return t('criteria.ost') } },
|
||||
]
|
||||
|
||||
export const PLATFORM_SUGGESTIONS = [
|
||||
'Netflix', 'Prime Video', 'Disney+', 'Crunchyroll', 'ADN', 'Viki', 'Apple TV+', 'Max',
|
||||
'Canal+', 'Paramount+', 'YouTube', 'iQIYI', 'WeTV', 'Youku',
|
||||
]
|
||||
export const platformSuggestions = () => [...PLATFORM_SUGGESTIONS, t('platform.cinema'), t('platform.dvd'), t('platform.tv')]
|
||||
|
||||
export const TOP_CATEGORIES: { value: TopCategory; readonly label: string; readonly plural: string }[] = [
|
||||
{ value: 'film', get label() { return t('type.film') }, get plural() { return t('typePlural.film') } },
|
||||
{ value: 'serie', get label() { return t('type.serie') }, get plural() { return t('typePlural.serie') } },
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import { useEffect, useRef } from 'react'
|
||||
|
||||
/**
|
||||
* Touche Échap : seule la fenêtre ouverte en dernier se ferme
|
||||
* (sinon une confirmation par-dessus une fiche fermait les deux d'un coup).
|
||||
*/
|
||||
const stack: { current: () => void }[] = []
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window.addEventListener('keydown', (e) => {
|
||||
if (e.key !== 'Escape' || !stack.length) return
|
||||
e.preventDefault()
|
||||
stack[stack.length - 1].current()
|
||||
})
|
||||
}
|
||||
|
||||
export function useEscape(onEscape: () => void, active = true) {
|
||||
const ref = useRef(onEscape)
|
||||
ref.current = onEscape
|
||||
useEffect(() => {
|
||||
if (!active) return
|
||||
const entry = { current: () => ref.current() }
|
||||
stack.push(entry)
|
||||
return () => {
|
||||
const k = stack.indexOf(entry)
|
||||
if (k >= 0) stack.splice(k, 1)
|
||||
}
|
||||
}, [active])
|
||||
}
|
||||
+2
-2
@@ -3,7 +3,7 @@ import type { MediaItem } from '../types'
|
||||
import { loadAiring, trackable, CACHE_EVENT } from './airing'
|
||||
import { getAniListReleases, getTmdbRelease, type ReleaseInfo } from './catalogApi'
|
||||
import { isPlainObject, isSafeExternalId, isSafeId, readStorage, safeDay, safeIso } from './security'
|
||||
import { todayISO } from './utils'
|
||||
import { localDay, todayISO } from './utils'
|
||||
|
||||
/**
|
||||
* Calendrier des sorties :
|
||||
@@ -92,7 +92,7 @@ export async function refreshReleases(items: MediaItem[], tmdbKey?: string, forc
|
||||
|
||||
/** Tous les évènements connus, triés par date (à partir d'il y a 7 jours). */
|
||||
export function calendarEvents(items: MediaItem[], releases: ReleaseCache = loadReleases()): CalendarEvent[] {
|
||||
const from = new Date(Date.now() - 7 * 86400000).toISOString().slice(0, 10)
|
||||
const from = localDay(new Date(Date.now() - 7 * 86400000))
|
||||
const airing = loadAiring()
|
||||
const events: CalendarEvent[] = []
|
||||
for (const item of trackable(items)) {
|
||||
|
||||
+5
-3
@@ -40,7 +40,7 @@ export function cleanText(value: unknown, max: number): string | undefined {
|
||||
|
||||
/** Identifiant interne : lettres, chiffres, tirets, max 64 caractères. */
|
||||
export function isSafeId(value: unknown): value is string {
|
||||
return typeof value === 'string' && /^[A-Za-z0-9_-]{1,64}$/.test(value)
|
||||
return typeof value === 'string' && /^[A-Za-z0-9_-]{1,64}$/.test(value) && value !== '__proto__'
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -77,8 +77,10 @@ export function safePosterUrl(value: unknown): string | undefined {
|
||||
/** Date au format AAAA-MM-JJ valide. */
|
||||
export function safeDay(value: unknown): string | undefined {
|
||||
if (typeof value !== 'string' || !/^\d{4}-\d{2}-\d{2}$/.test(value)) return undefined
|
||||
const d = new Date(value + 'T12:00:00')
|
||||
return Number.isNaN(d.getTime()) ? undefined : value
|
||||
const [y, m, day] = value.split('-').map(Number)
|
||||
const d = new Date(Date.UTC(y, m - 1, day))
|
||||
// « 2026-02-31 » n'existe pas (le moteur JS l'aurait transformé en 3 mars)
|
||||
return d.getUTCFullYear() === y && d.getUTCMonth() === m - 1 && d.getUTCDate() === day ? value : undefined
|
||||
}
|
||||
|
||||
/** Date-heure ISO valide (ou undefined). */
|
||||
|
||||
@@ -2,6 +2,7 @@ import { genreLabel } from './genres'
|
||||
import { t } from '../i18n'
|
||||
import type { MediaItem, RatingScale } from '../types'
|
||||
import { TYPE_BY_VALUE } from './constants'
|
||||
import { episodeCap } from './franchise'
|
||||
import { safePosterUrl } from './security'
|
||||
import { formatRating } from './utils'
|
||||
|
||||
@@ -255,8 +256,9 @@ export async function renderItemCard(item: MediaItem, scale: RatingScale, credit
|
||||
const episodic = TYPE_BY_VALUE[item.type].episodic
|
||||
const minutes = credits?.runtime ?? item.duration
|
||||
const rows: [string, string][] = []
|
||||
if (episodic && item.episodesTotal) {
|
||||
rows.push([t('form.episodes'), `${t('stats.episodesN', { count: item.episodesTotal })}${item.episodeDuration ? ` · ${t('common.minutes', { n: item.episodeDuration })}` : ''}`])
|
||||
const totalEps = episodeCap(item)
|
||||
if (episodic && totalEps) {
|
||||
rows.push([t('form.episodes'), `${t('stats.episodesN', { count: totalEps })}${item.episodeDuration ? ` · ${t('common.minutes', { n: item.episodeDuration })}` : ''}`])
|
||||
} else if (!episodic && minutes) {
|
||||
rows.push([t('form.duration'), t('share.minutesLong', { n: minutes })])
|
||||
}
|
||||
|
||||
+5
-1
@@ -1,5 +1,6 @@
|
||||
import { locale } from '../i18n'
|
||||
import type { MediaItem, MediaType, WatchStatus } from '../types'
|
||||
import { episodeCap } from './franchise'
|
||||
import { DEFAULT_FILM_MINUTES, MEDIA_TYPES, STATUSES, TYPE_BY_VALUE } from './constants'
|
||||
|
||||
/** Temps estimé (minutes) passé sur une fiche. */
|
||||
@@ -7,7 +8,10 @@ export function watchMinutes(item: MediaItem): number {
|
||||
const epMin = item.episodeDuration || TYPE_BY_VALUE[item.type].episodeMinutes
|
||||
if (item.type === 'film') return item.status === 'termine' ? (item.duration || DEFAULT_FILM_MINUTES) * (1 + (item.rewatchDates?.length ?? 0)) : 0
|
||||
if (item.episodesWatched > 0) return item.episodesWatched * epMin
|
||||
if (item.status === 'termine') return item.episodesTotal ? item.episodesTotal * epMin : item.duration || 0
|
||||
if (item.status === 'termine') {
|
||||
const cap = episodeCap(item)
|
||||
return cap ? cap * epMin : item.duration || 0
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -12,12 +12,14 @@ export function uid(): string {
|
||||
return Date.now().toString(36) + Math.random().toString(36).slice(2, 10)
|
||||
}
|
||||
|
||||
export function todayISO(): string {
|
||||
const d = new Date()
|
||||
/** Jour local AAAA-MM-JJ (et pas le jour UTC : un épisode diffusé à 1 h du matin reste au bon jour). */
|
||||
export function localDay(d: Date = new Date()): string {
|
||||
const pad = (n: number) => String(n).padStart(2, '0')
|
||||
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`
|
||||
}
|
||||
|
||||
export const todayISO = () => localDay()
|
||||
|
||||
export function cx(...classes: (string | false | null | undefined)[]): string {
|
||||
return classes.filter(Boolean).join(' ')
|
||||
}
|
||||
|
||||
+21
-16
@@ -110,7 +110,13 @@ const byUpdatedDesc = (a: MediaItem, b: MediaItem) => b.updatedAt.localeCompare(
|
||||
* IndexedDB est la source persistante (chaque écriture y est répercutée).
|
||||
*/
|
||||
export function MediaProvider({ children, cloudUser }: { children: ReactNode; cloudUser?: { id: string; email: string } }) {
|
||||
const [items, setItems] = useState<MediaItem[]>([])
|
||||
const [items, setItemsState] = useState<MediaItem[]>([])
|
||||
// Copie toujours à jour (deux « +1 » rapides ne doivent pas partir de la même version)
|
||||
const itemsRef = useRef(items)
|
||||
const setItems = useCallback((next: MediaItem[] | ((prev: MediaItem[]) => MediaItem[])) => {
|
||||
itemsRef.current = typeof next === 'function' ? next(itemsRef.current) : next
|
||||
setItemsState(itemsRef.current)
|
||||
}, [])
|
||||
const [loading, setLoading] = useState(true)
|
||||
const [error, setError] = useState<string>()
|
||||
const [settings, setSettings] = useState<Settings>(loadSettings)
|
||||
@@ -230,11 +236,11 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
|
||||
const update = useCallback(
|
||||
async (id: string, patch: Partial<MediaInput>) => {
|
||||
const current = items.find((i) => i.id === id)
|
||||
const current = itemsRef.current.find((i) => i.id === id)
|
||||
if (!current) return
|
||||
await save({ ...current, ...patch, updatedAt: new Date().toISOString() })
|
||||
},
|
||||
[items, save],
|
||||
[save],
|
||||
)
|
||||
|
||||
const remove = useCallback(async (id: string) => {
|
||||
@@ -244,7 +250,7 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
|
||||
const incrementEpisode = useCallback(
|
||||
async (id: string, delta = 1) => {
|
||||
const item = items.find((i) => i.id === id)
|
||||
const item = itemsRef.current.find((i) => i.id === id)
|
||||
if (!item) return
|
||||
let next = Math.max(0, item.episodesWatched + delta)
|
||||
const cap = episodeCap(item)
|
||||
@@ -264,7 +270,7 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
}
|
||||
await update(id, patch)
|
||||
},
|
||||
[items, update],
|
||||
[update],
|
||||
)
|
||||
|
||||
const importItems = useCallback(async (incoming: MediaItem[], mode: 'merge' | 'replace') => {
|
||||
@@ -279,7 +285,7 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
const ids = orderedIds.slice(0, 5)
|
||||
const now = new Date().toISOString()
|
||||
const changed: MediaItem[] = []
|
||||
for (const item of items) {
|
||||
for (const item of itemsRef.current) {
|
||||
const rank = ids.indexOf(item.id) + 1
|
||||
const wasHere = item.top?.category === category
|
||||
if (rank > 0) {
|
||||
@@ -293,7 +299,7 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
const byId = new Map(changed.map((c) => [c.id, c]))
|
||||
setItems((prev) => prev.map((i) => byId.get(i.id) ?? i))
|
||||
},
|
||||
[items],
|
||||
[setItems],
|
||||
)
|
||||
|
||||
const clearAll = useCallback(async () => {
|
||||
@@ -303,7 +309,7 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
|
||||
const patchMany = useCallback(
|
||||
async (patches: { id: string; patch: Partial<MediaInput> }[]) => {
|
||||
const byId = new Map(items.map((i) => [i.id, i]))
|
||||
const byId = new Map(itemsRef.current.map((i) => [i.id, i]))
|
||||
const changed = patches.flatMap(({ id, patch }) => {
|
||||
const cur = byId.get(id)
|
||||
const next = cur ? normalizeItem({ ...cur, ...patch }) : null
|
||||
@@ -314,7 +320,7 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
const map = new Map(changed.map((c) => [c.id, c]))
|
||||
setItems((prev) => prev.map((i) => map.get(i.id) ?? i))
|
||||
},
|
||||
[items],
|
||||
[setItems],
|
||||
)
|
||||
|
||||
const createList = useCallback(
|
||||
@@ -334,27 +340,26 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
const deleteList = useCallback(
|
||||
async (id: string) => {
|
||||
setLists((prev) => prev.filter((l) => l.id !== id))
|
||||
const changed = items.filter((i) => i.listIds?.includes(id)).map((i) => ({ ...i, listIds: i.listIds!.filter((x) => x !== id) }))
|
||||
const now = new Date().toISOString()
|
||||
const changed = itemsRef.current.filter((i) => i.listIds?.includes(id)).map((i) => ({ ...i, listIds: i.listIds!.filter((x) => x !== id), updatedAt: now }))
|
||||
if (changed.length) {
|
||||
await mediaDB.putMany(changed)
|
||||
const map = new Map(changed.map((c) => [c.id, c]))
|
||||
setItems((prev) => prev.map((i) => map.get(i.id) ?? i))
|
||||
}
|
||||
},
|
||||
[items, setLists],
|
||||
[setItems, setLists],
|
||||
)
|
||||
|
||||
const toggleInList = useCallback(
|
||||
async (itemId: string, listId: string) => {
|
||||
const item = items.find((i) => i.id === itemId)
|
||||
const item = itemsRef.current.find((i) => i.id === itemId)
|
||||
if (!item) return
|
||||
const has = item.listIds?.includes(listId)
|
||||
const listIds = has ? item.listIds!.filter((x) => x !== listId) : [...(item.listIds ?? []), listId]
|
||||
const next = { ...item, listIds }
|
||||
await mediaDB.put(next)
|
||||
setItems((prev) => prev.map((i) => (i.id === itemId ? next : i)))
|
||||
await update(itemId, { listIds })
|
||||
},
|
||||
[items],
|
||||
[update],
|
||||
)
|
||||
|
||||
const mergeLists = useCallback(
|
||||
|
||||
+1
-2
@@ -35,9 +35,8 @@ export interface MediaItem {
|
||||
endDate?: string // AAAA-MM-JJ
|
||||
genres: string[]
|
||||
platform?: string
|
||||
/** Mon avis (visible sur mon profil, comme ma note) */
|
||||
notes?: string
|
||||
/** Avis visible sur mon profil public (sinon il reste privé) */
|
||||
notesPublic?: boolean
|
||||
/** URL d'image ou image compressée en data URL (reste locale). */
|
||||
poster?: string
|
||||
/** Grande image horizontale (TMDB), pour l'en-tête de la fiche et l'accueil. */
|
||||
|
||||
@@ -22,21 +22,25 @@ Deno.serve(async (req) => {
|
||||
}
|
||||
if (body.confirm !== 'SUPPRIMER') return json(req, 400, { error: 'confirm' })
|
||||
|
||||
// Photos de profil et bannières (le stockage n'est pas effacé automatiquement avec le compte)
|
||||
// Photos de profil et bannières : elles sont publiques et ne partent pas avec le compte.
|
||||
// Si on n'arrive pas à les effacer, on ne supprime rien (l'utilisateur pourra réessayer).
|
||||
const admin = { apikey: SERVICE_KEY, Authorization: `Bearer ${SERVICE_KEY}`, 'Content-Type': 'application/json' }
|
||||
try {
|
||||
const admin = { apikey: SERVICE_KEY, Authorization: `Bearer ${SERVICE_KEY}`, 'Content-Type': 'application/json' }
|
||||
const list = await fetch(`${SUPABASE_URL}/storage/v1/object/list/profile-media`, {
|
||||
method: 'POST',
|
||||
headers: admin,
|
||||
body: JSON.stringify({ prefix: userId, limit: 1000 }),
|
||||
})
|
||||
const files = list.ok ? ((await list.json()) as { name?: string }[]) : []
|
||||
const prefixes = files.filter((f) => typeof f.name === 'string').map((f) => `${userId}/${f.name}`)
|
||||
if (prefixes.length) {
|
||||
await fetch(`${SUPABASE_URL}/storage/v1/object/profile-media`, { method: 'DELETE', headers: admin, body: JSON.stringify({ prefixes }) })
|
||||
for (let round = 0; round < 20; round++) {
|
||||
const list = await fetch(`${SUPABASE_URL}/storage/v1/object/list/profile-media`, {
|
||||
method: 'POST',
|
||||
headers: admin,
|
||||
body: JSON.stringify({ prefix: userId, limit: 100, offset: 0 }),
|
||||
})
|
||||
if (!list.ok) throw new Error('list')
|
||||
const files = (await list.json()) as { name?: unknown }[]
|
||||
const prefixes = files.filter((f) => typeof f.name === 'string' && /^[A-Za-z0-9_.-]{1,120}$/.test(f.name)).map((f) => `${userId}/${f.name}`)
|
||||
if (!prefixes.length) break
|
||||
const del = await fetch(`${SUPABASE_URL}/storage/v1/object/profile-media`, { method: 'DELETE', headers: admin, body: JSON.stringify({ prefixes }) })
|
||||
if (!del.ok) throw new Error('remove')
|
||||
}
|
||||
} catch {
|
||||
/* on supprime le compte quand même */
|
||||
return json(req, 500, { error: 'storage' })
|
||||
}
|
||||
|
||||
const res = await fetch(`${SUPABASE_URL}/auth/v1/admin/users/${encodeURIComponent(userId)}`, {
|
||||
|
||||
@@ -87,8 +87,15 @@ as $$
|
||||
declare
|
||||
n integer;
|
||||
max_rows integer := case tg_table_name when 'items' then 20000 else 300 end;
|
||||
already boolean;
|
||||
begin
|
||||
execute format('select count(*) from public.%I where user_id = $1', tg_table_name) into n using new.user_id;
|
||||
-- Un « upsert » d'une ligne qui existe déjà n'en ajoute pas : jamais bloqué (sinon plus aucune modification possible)
|
||||
execute format('select exists (select 1 from public.%I where user_id = $1 and id = $2)', tg_table_name) into already using new.user_id, new.id;
|
||||
if already then
|
||||
return new;
|
||||
end if;
|
||||
-- Les fiches supprimées (gardées pour la synchro) ne comptent pas
|
||||
execute format('select count(*) from public.%I where user_id = $1 and not deleted', tg_table_name) into n using new.user_id;
|
||||
if n >= max_rows then
|
||||
raise exception 'quota exceeded for %', tg_table_name;
|
||||
end if;
|
||||
@@ -110,7 +117,8 @@ alter table public.lists force row level security;
|
||||
alter table public.settings force row level security;
|
||||
|
||||
-- Les visiteurs non connectés n'ont accès à rien
|
||||
revoke all on public.items, public.lists, public.settings from anon;
|
||||
-- Rien d'autre que lire / écrire ses lignes (pas de TRUNCATE, TRIGGER, REFERENCES…)
|
||||
revoke all on public.items, public.lists, public.settings from anon, authenticated;
|
||||
grant select, insert, update, delete on public.items, public.lists, public.settings to authenticated;
|
||||
|
||||
drop policy if exists "own items" on public.items;
|
||||
|
||||
@@ -25,7 +25,8 @@ create table if not exists public.profiles (
|
||||
updated_at timestamptz not null default now()
|
||||
);
|
||||
|
||||
create index if not exists profiles_display_name_idx on public.profiles (lower(display_name));
|
||||
-- (ancien index inutile : la recherche par nom se fait avec « like '%…%' »)
|
||||
drop index if exists public.profiles_display_name_idx;
|
||||
|
||||
-- Pseudo de départ aléatoire (l'email n'est jamais utilisé : il resterait visible de tous)
|
||||
create or replace function public.azuu_random_username()
|
||||
@@ -84,7 +85,7 @@ language plpgsql
|
||||
set search_path = ''
|
||||
as $$
|
||||
declare
|
||||
media text := '^https?://[^/?#]+/storage/v1/object/public/profile-media/' || new.id::text || '/[A-Za-z0-9_.-]{1,80}$';
|
||||
media text := '^https://[a-z0-9-]{1,63}\.supabase\.(co|in)/storage/v1/object/public/profile-media/' || new.id::text || '/[A-Za-z0-9_.-]{1,80}$';
|
||||
begin
|
||||
if tg_op = 'UPDATE' and new.id <> old.id then
|
||||
raise exception 'id is immutable';
|
||||
@@ -261,10 +262,11 @@ begin
|
||||
end if;
|
||||
|
||||
if st = 'termine' and old_st is distinct from 'termine'
|
||||
and coalesce(public.azuu_day(new.data->>'endDate'), current_date) >= recent then
|
||||
-- Fiche importée sans date : pas d'activité ; changement de statut fait maintenant : aujourd'hui
|
||||
and coalesce(public.azuu_day(new.data->>'endDate'), case when tg_op = 'UPDATE' then current_date end) >= recent then
|
||||
perform public.azuu_log(new.user_id, new.id, 'finished');
|
||||
elsif st = 'en_cours' and old_st is distinct from 'en_cours'
|
||||
and coalesce(public.azuu_day(new.data->>'startDate'), current_date) >= recent then
|
||||
and coalesce(public.azuu_day(new.data->>'startDate'), case when tg_op = 'UPDATE' then current_date end) >= recent then
|
||||
perform public.azuu_log(new.user_id, new.id, 'started');
|
||||
elsif st = 'a_voir' and tg_op = 'INSERT' and new.updated_at > now() - interval '2 days' then
|
||||
perform public.azuu_log(new.user_id, new.id, 'added');
|
||||
@@ -288,7 +290,7 @@ alter table public.profiles force row level security;
|
||||
alter table public.follows force row level security;
|
||||
alter table public.activity force row level security;
|
||||
|
||||
revoke all on public.profiles, public.follows, public.activity from anon;
|
||||
revoke all on public.profiles, public.follows, public.activity from anon, authenticated;
|
||||
grant select, update on public.profiles to authenticated;
|
||||
grant select, insert, update, delete on public.follows to authenticated;
|
||||
grant select on public.activity to authenticated;
|
||||
@@ -407,7 +409,13 @@ begin
|
||||
),
|
||||
'top', (
|
||||
select coalesce(jsonb_agg(public.public_item(data) order by data->'top'->>'category', (data->'top'->>'rank')), '[]'::jsonb)
|
||||
from public.items where user_id = p.id and not deleted and jsonb_typeof(data->'top') = 'object'
|
||||
from public.items i
|
||||
where i.user_id = p.id and not i.deleted and jsonb_typeof(i.data->'top') = 'object'
|
||||
-- Seulement les catégories de Top 5 que la personne a choisi d'afficher (toutes si rien n'est réglé)
|
||||
and coalesce(
|
||||
(select s.data->'topCategories' ? (i.data->'top'->>'category')
|
||||
from public.settings s where s.user_id = p.id and jsonb_typeof(s.data->'topCategories') = 'array'),
|
||||
true)
|
||||
),
|
||||
'recent', (
|
||||
select coalesce(jsonb_agg(public.public_item(s.data) order by s.k desc nulls last), '[]'::jsonb)
|
||||
@@ -598,12 +606,27 @@ on conflict (id) do update
|
||||
drop policy if exists "profile media read own" on storage.objects;
|
||||
create policy "profile media read own" on storage.objects for select to authenticated
|
||||
using (bucket_id = 'profile-media' and (storage.foldername(name))[1] = (select auth.uid())::text);
|
||||
create or replace function public.azuu_media_count()
|
||||
returns integer
|
||||
language sql
|
||||
stable
|
||||
security definer
|
||||
set search_path = ''
|
||||
as $$
|
||||
select count(*)::integer from storage.objects
|
||||
where bucket_id = 'profile-media' and (storage.foldername(name))[1] = (select auth.uid())::text
|
||||
$$;
|
||||
revoke all on function public.azuu_media_count() from public, anon;
|
||||
grant execute on function public.azuu_media_count() to authenticated;
|
||||
|
||||
drop policy if exists "profile media upload own" on storage.objects;
|
||||
create policy "profile media upload own" on storage.objects for insert to authenticated
|
||||
with check (
|
||||
bucket_id = 'profile-media'
|
||||
and (storage.foldername(name))[1] = (select auth.uid())::text
|
||||
and name ~ '^[0-9a-f-]{36}/(avatar|banner)-[0-9]{1,15}\.(jpg|webp|png)$'
|
||||
-- Pas plus de 6 images par compte (l'app supprime les anciennes à chaque changement)
|
||||
and public.azuu_media_count() < 6
|
||||
);
|
||||
drop policy if exists "profile media delete own" on storage.objects;
|
||||
create policy "profile media delete own" on storage.objects for delete to authenticated
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
-- Durcissement (audit du 4 octobre 2026)
|
||||
|
||||
create or replace function public.azuu_quota()
|
||||
returns trigger
|
||||
language plpgsql
|
||||
security definer
|
||||
set search_path = ''
|
||||
as $$
|
||||
declare
|
||||
n integer;
|
||||
max_rows integer := case tg_table_name when 'items' then 20000 else 300 end;
|
||||
already boolean;
|
||||
begin
|
||||
-- Un « upsert » d'une ligne qui existe déjà n'en ajoute pas : jamais bloqué (sinon plus aucune modification possible)
|
||||
execute format('select exists (select 1 from public.%I where user_id = $1 and id = $2)', tg_table_name) into already using new.user_id, new.id;
|
||||
if already then
|
||||
return new;
|
||||
end if;
|
||||
-- Les fiches supprimées (gardées pour la synchro) ne comptent pas
|
||||
execute format('select count(*) from public.%I where user_id = $1 and not deleted', tg_table_name) into n using new.user_id;
|
||||
if n >= max_rows then
|
||||
raise exception 'quota exceeded for %', tg_table_name;
|
||||
end if;
|
||||
return new;
|
||||
end;
|
||||
$$;
|
||||
|
||||
revoke all on public.items, public.lists, public.settings from anon, authenticated;
|
||||
grant select, insert, update, delete on public.items, public.lists, public.settings to authenticated;
|
||||
|
||||
create or replace function public.azuu_profile_guard()
|
||||
returns trigger
|
||||
language plpgsql
|
||||
set search_path = ''
|
||||
as $$
|
||||
declare
|
||||
media text := '^https://[a-z0-9-]{1,63}\.supabase\.(co|in)/storage/v1/object/public/profile-media/' || new.id::text || '/[A-Za-z0-9_.-]{1,80}$';
|
||||
begin
|
||||
if tg_op = 'UPDATE' and new.id <> old.id then
|
||||
raise exception 'id is immutable';
|
||||
end if;
|
||||
new.username := lower(trim(new.username));
|
||||
new.display_name := trim(regexp_replace(new.display_name, '[[:cntrl:]]', '', 'g'));
|
||||
new.bio := trim(regexp_replace(new.bio, '[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]', '', 'g'));
|
||||
if new.username in ('admin', 'administrator', 'azuucine', 'support', 'moderator', 'root', 'system', 'null', 'undefined', 'me', 'settings') then
|
||||
raise exception 'username reserved';
|
||||
end if;
|
||||
-- Les images ne peuvent venir que du dossier de l'utilisateur dans le stockage de l'app
|
||||
if new.avatar_url is not null and new.avatar_url !~ media then
|
||||
raise exception 'invalid avatar url';
|
||||
end if;
|
||||
if new.banner_url is not null and new.banner_url !~ media then
|
||||
raise exception 'invalid banner url';
|
||||
end if;
|
||||
new.updated_at := now();
|
||||
return new;
|
||||
end;
|
||||
$$;
|
||||
|
||||
create or replace function public.azuu_item_activity()
|
||||
returns trigger
|
||||
language plpgsql
|
||||
security definer
|
||||
set search_path = ''
|
||||
as $$
|
||||
declare
|
||||
st text;
|
||||
old_st text;
|
||||
recent date := current_date - 7;
|
||||
rw_new int := 0;
|
||||
rw_old int := 0;
|
||||
begin
|
||||
if new.deleted or new.data is null then
|
||||
return new;
|
||||
end if;
|
||||
st := new.data->>'status';
|
||||
if jsonb_typeof(new.data->'rewatchDates') = 'array' then
|
||||
rw_new := jsonb_array_length(new.data->'rewatchDates');
|
||||
end if;
|
||||
if tg_op = 'UPDATE' then
|
||||
if not old.deleted and old.data is not null then
|
||||
old_st := old.data->>'status';
|
||||
if jsonb_typeof(old.data->'rewatchDates') = 'array' then
|
||||
rw_old := jsonb_array_length(old.data->'rewatchDates');
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
if st = 'termine' and old_st is distinct from 'termine'
|
||||
-- Fiche importée sans date : pas d'activité ; changement de statut fait maintenant : aujourd'hui
|
||||
and coalesce(public.azuu_day(new.data->>'endDate'), case when tg_op = 'UPDATE' then current_date end) >= recent then
|
||||
perform public.azuu_log(new.user_id, new.id, 'finished');
|
||||
elsif st = 'en_cours' and old_st is distinct from 'en_cours'
|
||||
and coalesce(public.azuu_day(new.data->>'startDate'), case when tg_op = 'UPDATE' then current_date end) >= recent then
|
||||
perform public.azuu_log(new.user_id, new.id, 'started');
|
||||
elsif st = 'a_voir' and tg_op = 'INSERT' and new.updated_at > now() - interval '2 days' then
|
||||
perform public.azuu_log(new.user_id, new.id, 'added');
|
||||
end if;
|
||||
if tg_op = 'UPDATE' and rw_new > rw_old then
|
||||
perform public.azuu_log(new.user_id, new.id, 'rewatched');
|
||||
end if;
|
||||
return new;
|
||||
end;
|
||||
$$;
|
||||
|
||||
create or replace function public.get_profile(p_username text)
|
||||
returns jsonb
|
||||
language plpgsql
|
||||
stable
|
||||
security definer
|
||||
set search_path = ''
|
||||
as $$
|
||||
declare
|
||||
p public.profiles;
|
||||
me uuid := auth.uid();
|
||||
res jsonb;
|
||||
begin
|
||||
if me is null then
|
||||
return null;
|
||||
end if;
|
||||
select * into p from public.profiles where username = lower(trim(p_username));
|
||||
if not found then
|
||||
return null;
|
||||
end if;
|
||||
res := public.profile_card(p) || jsonb_build_object(
|
||||
'bio', p.bio,
|
||||
'banner_url', p.banner_url,
|
||||
'is_me', p.id = me,
|
||||
'follows_me', exists (select 1 from public.follows where follower_id = p.id and following_id = me and status = 'accepted'),
|
||||
'followers', (select count(*) from public.follows where following_id = p.id and status = 'accepted'),
|
||||
'following', (select count(*) from public.follows where follower_id = p.id and status = 'accepted'),
|
||||
'visible', public.can_view(p.id)
|
||||
);
|
||||
if public.can_view(p.id) then
|
||||
res := res || jsonb_build_object(
|
||||
'stats', (
|
||||
select jsonb_build_object(
|
||||
'total', count(*),
|
||||
'finished', count(*) filter (where data->>'status' = 'termine'),
|
||||
'finished_year', count(*) filter (where data->>'status' = 'termine' and left(data->>'endDate', 4) = to_char(now(), 'YYYY')),
|
||||
'films', count(*) filter (where data->>'status' = 'termine' and data->>'type' = 'film'),
|
||||
'series', count(*) filter (where data->>'status' = 'termine' and data->>'type' <> 'film'),
|
||||
'episodes', coalesce(sum(case when data->>'episodesWatched' ~ '^\d{1,6}$' then (data->>'episodesWatched')::int else 0 end), 0),
|
||||
'rated', count(*) filter (where data ? 'rating')
|
||||
)
|
||||
from public.items where user_id = p.id and not deleted
|
||||
),
|
||||
'top', (
|
||||
select coalesce(jsonb_agg(public.public_item(data) order by data->'top'->>'category', (data->'top'->>'rank')), '[]'::jsonb)
|
||||
from public.items i
|
||||
where i.user_id = p.id and not i.deleted and jsonb_typeof(i.data->'top') = 'object'
|
||||
-- Seulement les catégories de Top 5 que la personne a choisi d'afficher (toutes si rien n'est réglé)
|
||||
and coalesce(
|
||||
(select s.data->'topCategories' ? (i.data->'top'->>'category')
|
||||
from public.settings s where s.user_id = p.id and jsonb_typeof(s.data->'topCategories') = 'array'),
|
||||
true)
|
||||
),
|
||||
'recent', (
|
||||
select coalesce(jsonb_agg(public.public_item(s.data) order by s.k desc nulls last), '[]'::jsonb)
|
||||
from (
|
||||
-- Date de visionnage (pas la date de modification : un import ou une synchro ne doit pas tout faire remonter)
|
||||
select data, coalesce(data->>'endDate', data->>'startDate') as k
|
||||
from public.items
|
||||
where user_id = p.id and not deleted and data->>'status' = 'termine'
|
||||
order by k desc nulls last
|
||||
limit 12
|
||||
) s
|
||||
),
|
||||
-- En cours et « à voir » : ce qu'on voit aussi dans le fil des abonnements
|
||||
'watching', (
|
||||
select coalesce(jsonb_agg(public.public_item(s.data) order by s.k desc nulls last), '[]'::jsonb)
|
||||
from (
|
||||
select data, coalesce(data->>'startDate', left(data->>'updatedAt', 10)) as k
|
||||
from public.items
|
||||
where user_id = p.id and not deleted and data->>'status' = 'en_cours'
|
||||
order by k desc nulls last
|
||||
limit 8
|
||||
) s
|
||||
),
|
||||
'watchlist', (
|
||||
select coalesce(jsonb_agg(public.public_item(s.data) order by s.k desc nulls last), '[]'::jsonb)
|
||||
from (
|
||||
select data, data->>'createdAt' as k
|
||||
from public.items
|
||||
where user_id = p.id and not deleted and data->>'status' = 'a_voir'
|
||||
order by k desc nulls last
|
||||
limit 8
|
||||
) s
|
||||
)
|
||||
);
|
||||
end if;
|
||||
return res;
|
||||
end;
|
||||
$$;
|
||||
|
||||
revoke all on function public.get_profile(text) from public, anon;
|
||||
grant execute on function public.get_profile(text) to authenticated;
|
||||
|
||||
revoke all on public.profiles, public.follows, public.activity from anon, authenticated;
|
||||
grant select, update on public.profiles to authenticated;
|
||||
grant select, insert, update, delete on public.follows to authenticated;
|
||||
grant select on public.activity to authenticated;
|
||||
|
||||
create or replace function public.azuu_media_count()
|
||||
returns integer
|
||||
language sql
|
||||
stable
|
||||
security definer
|
||||
set search_path = ''
|
||||
as $$
|
||||
select count(*)::integer from storage.objects
|
||||
where bucket_id = 'profile-media' and (storage.foldername(name))[1] = (select auth.uid())::text
|
||||
$$;
|
||||
revoke all on function public.azuu_media_count() from public, anon;
|
||||
grant execute on function public.azuu_media_count() to authenticated;
|
||||
|
||||
drop policy if exists "profile media upload own" on storage.objects;
|
||||
create policy "profile media upload own" on storage.objects for insert to authenticated
|
||||
with check (
|
||||
bucket_id = 'profile-media'
|
||||
and (storage.foldername(name))[1] = (select auth.uid())::text
|
||||
and name ~ '^[0-9a-f-]{36}/(avatar|banner)-[0-9]{1,15}\.(jpg|webp|png)$'
|
||||
-- Pas plus de 6 images par compte (l'app supprime les anciennes à chaque changement)
|
||||
and public.azuu_media_count() < 6
|
||||
);
|
||||
|
||||
|
||||
drop index if exists public.profiles_display_name_idx;
|
||||
@@ -0,0 +1 @@
|
||||
{"root":["./src/App.tsx","./src/Root.tsx","./src/main.tsx","./src/store.tsx","./src/types.ts","./src/vite-env.d.ts","./src/components/AccountSection.tsx","./src/components/AuthScreen.tsx","./src/components/Badges.tsx","./src/components/BottomNav.tsx","./src/components/CalendarView.tsx","./src/components/ConfirmDialog.tsx","./src/components/DatabaseSearch.tsx","./src/components/Disagreements.tsx","./src/components/EpisodeList.tsx","./src/components/HomeHero.tsx","./src/components/ItemHero.tsx","./src/components/JournalView.tsx","./src/components/ListsView.tsx","./src/components/MediaCard.tsx","./src/components/MediaForm.tsx","./src/components/Poster.tsx","./src/components/Rating.tsx","./src/components/Recommendations.tsx","./src/components/Roulette.tsx","./src/components/SharePreview.tsx","./src/components/TagInput.tsx","./src/components/TopFive.tsx","./src/components/TopFiveEditor.tsx","./src/components/ui.tsx","./src/components/social/Avatar.tsx","./src/components/social/EditProfile.tsx","./src/components/social/FollowList.tsx","./src/components/social/FriendsFeed.tsx","./src/components/social/ItemPeek.tsx","./src/components/social/PeopleSearch.tsx","./src/components/social/PersonRow.tsx","./src/components/social/ProfileView.tsx","./src/components/social/Sheet.tsx","./src/components/social/SocialProvider.tsx","./src/components/social/WelcomeProfile.tsx","./src/i18n/index.ts","./src/i18n/react.tsx","./src/i18n/locales/de.ts","./src/i18n/locales/en.ts","./src/i18n/locales/es.ts","./src/i18n/locales/fr.ts","./src/i18n/locales/it.ts","./src/i18n/locales/ja.ts","./src/i18n/locales/ko.ts","./src/i18n/locales/pt.ts","./src/i18n/locales/zh.ts","./src/lib/airing.ts","./src/lib/backup.ts","./src/lib/catalogApi.ts","./src/lib/constants.ts","./src/lib/db.ts","./src/lib/dragScroll.ts","./src/lib/escape.ts","./src/lib/franchise.ts","./src/lib/genres.ts","./src/lib/globalReleases.ts","./src/lib/image.ts","./src/lib/legacyImport.ts","./src/lib/onResume.ts","./src/lib/publicRatings.ts","./src/lib/releases.ts","./src/lib/roulette.ts","./src/lib/scope.ts","./src/lib/scrollLock.ts","./src/lib/security.ts","./src/lib/shareCard.ts","./src/lib/stats.ts","./src/lib/theme.ts","./src/lib/timeAgo.ts","./src/lib/utils.ts","./src/lib/cloud/api.ts","./src/lib/cloud/auth.ts","./src/lib/cloud/config.ts","./src/lib/cloud/social.ts","./src/lib/cloud/sync.ts","./src/pages/CatalogPage.tsx","./src/pages/HomePage.tsx","./src/pages/SettingsPage.tsx","./src/pages/StatsPage.tsx","./vite.config.ts"],"version":"5.9.3"}
|
||||
+3
-3
@@ -66,11 +66,11 @@ function contentSecurityPolicy(supabaseUrl: string): Plugin {
|
||||
// remplace base: '/' par base: '/azuucine/'.
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, '.', 'VITE_')
|
||||
// Sur Netlify ou en déploiement VPS (REQUIRE_SUPABASE=1, voir .gitea/workflows/deploy.yml), un build sans
|
||||
// En déploiement (REQUIRE_SUPABASE=1 ou CI, voir .gitea/workflows/deploy.yml), un build sans
|
||||
// Supabase donnerait un site « sans compte » (données invisibles) : on refuse.
|
||||
const full = loadEnv(mode, '.', '')
|
||||
if ((full.NETLIFY || full.REQUIRE_SUPABASE) && (!env.VITE_SUPABASE_URL || !env.VITE_SUPABASE_ANON_KEY)) {
|
||||
throw new Error('VITE_SUPABASE_URL / VITE_SUPABASE_ANON_KEY manquantes (variables Gitea Actions ou Netlify)')
|
||||
if ((full.REQUIRE_SUPABASE || full.CI || full.GITEA_ACTIONS) && (!env.VITE_SUPABASE_URL || !env.VITE_SUPABASE_ANON_KEY)) {
|
||||
throw new Error('VITE_SUPABASE_URL / VITE_SUPABASE_ANON_KEY manquantes (variables Gitea Actions)')
|
||||
}
|
||||
const origin = (env.VITE_SUPABASE_URL ?? '').trim().replace(/^(https?:\/\/[^/]+).*$/, '$1')
|
||||
const supabaseUrl = /^https:\/\/[a-z0-9-]+\.supabase\.(co|in)$/i.test(origin) ? origin : ''
|
||||
|
||||
Reference in new issue
Block a user