Bibliothèque : tags perso, actions groupées et « Annuler »
- Tags personnels libres sur chaque titre (fiche → Mon suivi), affichés discrètement dans la fiche, filtre par tag dans le catalogue, suggestions = tags déjà utilisés. Synchronisés avec la fiche (JSON), inclus dans l'export/import (et repris des tags de l'ancienne appli). Privés : retirés par public_item (migration) et côté client. - Actions groupées dans le catalogue : appui long (mobile), case au survol (ordinateur) ou bouton « Sélectionner » ; tout sélectionner, compteur ; statut, listes (ajout / retrait), tag (ajout / retrait), suppression avec confirmation. Échap / retour quittent. - Toast global accessible (role=status) avec « Annuler » (~6 s) après suppression, changement de statut, retrait d'une liste, actions groupées. La restauration remet la fiche à l'identique avec un updatedAt plus récent que la suppression : la synchro LWW recrée bien la fiche côté serveur. - Store : updateMany, removeMany, restore. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
This commit is contained in:
35 files changed
+1795
-22
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { SocialProvider } from './components/social/SocialProvider'
|
||||
import { ToastProvider } from './components/Toast'
|
||||
import { useEffect, useState } from 'react'
|
||||
import BottomNav, { type Tab } from './components/BottomNav'
|
||||
import SideNav from './components/SideNav'
|
||||
@@ -67,6 +68,7 @@ export default function App() {
|
||||
}
|
||||
|
||||
return (
|
||||
<ToastProvider>
|
||||
<SocialProvider onOpenOwnItem={openItem}>
|
||||
<SideNav current={navTab} onChange={go} onAdd={openNew} />
|
||||
<div className="mx-auto min-h-dvh max-w-2xl lg:max-w-none lg:ps-60">
|
||||
@@ -116,5 +118,6 @@ export default function App() {
|
||||
)}
|
||||
</div>
|
||||
</SocialProvider>
|
||||
</ToastProvider>
|
||||
)
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import ConfirmDialog from './ConfirmDialog'
|
||||
import { MediaCard } from './MediaCard'
|
||||
import Poster from './Poster'
|
||||
import { EmptyState } from './ui'
|
||||
import { useLibraryActions } from './library/useLibraryActions'
|
||||
|
||||
/** Mosaïque 2×2 des premières affiches d'une liste. */
|
||||
function Mosaic({ items }: { items: MediaItem[] }) {
|
||||
@@ -60,6 +61,7 @@ export function NewListForm({ onCreated, autoFocus }: { onCreated?: (list: Custo
|
||||
|
||||
function ListDetail({ list, onBack, onOpen }: { list: CustomList; onBack: () => void; onOpen: (item: MediaItem) => void }) {
|
||||
const { items, renameList, deleteList, toggleInList } = useMedia()
|
||||
const actions = useLibraryActions()
|
||||
const [renaming, setRenaming] = useState(false)
|
||||
const [name, setName] = useState(list.name)
|
||||
const [adding, setAdding] = useState(false)
|
||||
@@ -130,7 +132,7 @@ function ListDetail({ list, onBack, onOpen }: { list: CustomList; onBack: () =>
|
||||
const inList = item.listIds?.includes(list.id)
|
||||
return (
|
||||
<li key={item.id}>
|
||||
<button onClick={() => toggleInList(item.id, list.id)} className="flex w-full items-center gap-3 py-2.5 text-start">
|
||||
<button onClick={() => (inList ? void actions.removeFromList([item.id], list.id) : void toggleInList(item.id, list.id))} className="flex w-full items-center gap-3 py-2.5 text-start">
|
||||
<div className="w-9 shrink-0">
|
||||
<Poster src={item.poster} title={item.title} />
|
||||
</div>
|
||||
|
||||
@@ -12,10 +12,12 @@ interface Props {
|
||||
display?: (value: string) => string
|
||||
/** Valeur enregistrée à partir du texte saisi (ex. nom de référence d'un genre) */
|
||||
normalize?: (input: string) => string
|
||||
/** Propose aussi les suggestions avant de taper (ex. tags perso déjà utilisés) */
|
||||
showAll?: boolean
|
||||
}
|
||||
|
||||
/** Saisie de tags libres ; des suggestions apparaissent quand on commence à taper. */
|
||||
export default function TagInput({ value, onChange, suggestions, placeholder, display = (v) => v, normalize = (v) => v }: Props) {
|
||||
export default function TagInput({ value, onChange, suggestions, placeholder, display = (v) => v, normalize = (v) => v, showAll = false }: Props) {
|
||||
const [text, setText] = useState('')
|
||||
|
||||
const add = (raw: string) => {
|
||||
@@ -30,9 +32,9 @@ export default function TagInput({ value, onChange, suggestions, placeholder, di
|
||||
const q = normalizeText(text)
|
||||
const taken = new Set(value.map((v) => normalizeText(display(v))))
|
||||
// Suggestions seulement pendant la saisie (pas de rangée de genres affichée en permanence)
|
||||
if (!q) return []
|
||||
if (!q && !showAll) return []
|
||||
return suggestions.filter((s) => !taken.has(normalizeText(s)) && normalizeText(s).includes(q)).slice(0, 12)
|
||||
}, [text, value, suggestions])
|
||||
}, [text, value, suggestions, showAll])
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
import { t } from '../i18n'
|
||||
import { Undo2, X } from 'lucide-react'
|
||||
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, type ReactNode } from 'react'
|
||||
|
||||
/**
|
||||
* Petits messages en bas de l'écran (« Supprimé · Annuler »), au-dessus de la barre de navigation.
|
||||
* Un seul à la fois : un nouveau message remplace le précédent (dont l'annulation n'est plus proposée).
|
||||
*/
|
||||
export interface ToastOptions {
|
||||
/** Bouton « Annuler » : remet les choses comme avant. */
|
||||
undo?: () => void | Promise<void>
|
||||
/** Durée d'affichage en ms (6 s avec « Annuler », 3 s sinon). */
|
||||
duration?: number
|
||||
}
|
||||
|
||||
interface ToastApi {
|
||||
show: (message: string, opts?: ToastOptions) => void
|
||||
dismiss: () => void
|
||||
}
|
||||
|
||||
interface ToastState extends ToastOptions {
|
||||
id: number
|
||||
message: string
|
||||
}
|
||||
|
||||
const ToastContext = createContext<ToastApi | null>(null)
|
||||
|
||||
export function ToastProvider({ children }: { children: ReactNode }) {
|
||||
const [toast, setToast] = useState<ToastState | null>(null)
|
||||
const seq = useRef(0)
|
||||
|
||||
const dismiss = useCallback(() => setToast(null), [])
|
||||
const show = useCallback((message: string, opts: ToastOptions = {}) => {
|
||||
seq.current += 1
|
||||
setToast({ id: seq.current, message, ...opts })
|
||||
}, [])
|
||||
|
||||
const api = useMemo(() => ({ show, dismiss }), [show, dismiss])
|
||||
|
||||
return (
|
||||
<ToastContext.Provider value={api}>
|
||||
{children}
|
||||
<ToastViewport toast={toast} onDismiss={dismiss} onShow={show} />
|
||||
</ToastContext.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
/** Accès aux messages. Hors du fournisseur (tests, aperçu), les appels ne font rien. */
|
||||
export function useToast(): ToastApi {
|
||||
return useContext(ToastContext) ?? NOOP
|
||||
}
|
||||
const NOOP: ToastApi = { show: () => {}, dismiss: () => {} }
|
||||
|
||||
function ToastViewport({ toast, onDismiss, onShow }: { toast: ToastState | null; onDismiss: () => void; onShow: ToastApi['show'] }) {
|
||||
const [paused, setPaused] = useState(false)
|
||||
const [undoing, setUndoing] = useState(false)
|
||||
const remaining = useRef(0)
|
||||
const startedAt = useRef(0)
|
||||
|
||||
// Nouveau message : compte à rebours complet
|
||||
useEffect(() => {
|
||||
if (!toast) return
|
||||
remaining.current = toast.duration ?? (toast.undo ? 6000 : 3000)
|
||||
setUndoing(false)
|
||||
}, [toast])
|
||||
|
||||
// Le compte à rebours s'arrête tant que le doigt / la souris / le clavier est sur le message
|
||||
useEffect(() => {
|
||||
if (!toast || paused) return
|
||||
startedAt.current = Date.now()
|
||||
const id = setTimeout(onDismiss, remaining.current)
|
||||
return () => {
|
||||
clearTimeout(id)
|
||||
remaining.current = Math.max(1500, remaining.current - (Date.now() - startedAt.current))
|
||||
}
|
||||
}, [toast, paused, onDismiss])
|
||||
|
||||
const undo = async () => {
|
||||
if (!toast?.undo || undoing) return
|
||||
setUndoing(true)
|
||||
try {
|
||||
await toast.undo()
|
||||
onShow(t('toast.undone'))
|
||||
} catch {
|
||||
onShow(t('toast.undoFailed'))
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
role="status"
|
||||
aria-live="polite"
|
||||
aria-atomic="true"
|
||||
className="pointer-events-none fixed inset-x-0 bottom-[calc(5.25rem+env(safe-area-inset-bottom))] z-[80] flex justify-center px-4 lg:bottom-6 lg:ps-64"
|
||||
>
|
||||
{toast && (
|
||||
<div
|
||||
key={toast.id}
|
||||
className="sheet-in pointer-events-auto flex w-full max-w-md items-center gap-3 rounded-2xl bg-ink py-2.5 ps-4 pe-2 text-bg shadow-lg"
|
||||
onPointerEnter={() => setPaused(true)}
|
||||
onPointerLeave={() => setPaused(false)}
|
||||
onFocus={() => setPaused(true)}
|
||||
onBlur={() => setPaused(false)}
|
||||
>
|
||||
<p className="min-w-0 flex-1 text-sm font-medium leading-snug">{toast.message}</p>
|
||||
{toast.undo && (
|
||||
<button
|
||||
onClick={() => void undo()}
|
||||
disabled={undoing}
|
||||
className="inline-flex shrink-0 items-center gap-1.5 rounded-full border border-bg/30 px-3 py-1.5 text-sm font-semibold transition active:scale-95 disabled:opacity-50"
|
||||
>
|
||||
<Undo2 size={15} /> {t('toast.undo')}
|
||||
</button>
|
||||
)}
|
||||
<button onClick={onDismiss} className="grid size-8 shrink-0 place-items-center rounded-full opacity-70" aria-label={t('common.close')}>
|
||||
<X size={16} />
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
import { t } from '../../i18n'
|
||||
import { Check } from 'lucide-react'
|
||||
import { useRef, type ReactNode } from 'react'
|
||||
import { cx } from '../../lib/utils'
|
||||
|
||||
interface Props {
|
||||
title: string
|
||||
selecting: boolean
|
||||
selected: boolean
|
||||
onToggle: () => void
|
||||
/** Appui long (téléphone) ou case à cocher (ordinateur) : entre en mode sélection avec ce titre. */
|
||||
onStartSelect: () => void
|
||||
children: ReactNode
|
||||
}
|
||||
|
||||
const LONG_PRESS_MS = 450
|
||||
|
||||
/**
|
||||
* Enveloppe d'une carte du catalogue pour la sélection multiple :
|
||||
* - téléphone : appui long sur la carte ;
|
||||
* - ordinateur : case à cocher au survol ;
|
||||
* - en mode sélection, toucher la carte la coche / décoche (au lieu d'ouvrir la fiche).
|
||||
*/
|
||||
export default function SelectableCard({ title, selecting, selected, onToggle, onStartSelect, children }: Props) {
|
||||
const timer = useRef<ReturnType<typeof setTimeout>>(undefined)
|
||||
const origin = useRef<{ x: number; y: number }>(undefined)
|
||||
const fired = useRef(false)
|
||||
|
||||
const cancel = () => {
|
||||
clearTimeout(timer.current)
|
||||
timer.current = undefined
|
||||
origin.current = undefined
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className="group relative select-none [-webkit-touch-callout:none]"
|
||||
onPointerDown={(e) => {
|
||||
fired.current = false
|
||||
if (selecting || e.pointerType === 'mouse') return
|
||||
origin.current = { x: e.clientX, y: e.clientY }
|
||||
timer.current = setTimeout(() => {
|
||||
fired.current = true
|
||||
timer.current = undefined
|
||||
navigator.vibrate?.(12)
|
||||
onStartSelect()
|
||||
}, LONG_PRESS_MS)
|
||||
}}
|
||||
onPointerMove={(e) => {
|
||||
// Le doigt glisse (défilement) : ce n'est pas un appui long
|
||||
if (origin.current && Math.hypot(e.clientX - origin.current.x, e.clientY - origin.current.y) > 10) cancel()
|
||||
}}
|
||||
onPointerUp={cancel}
|
||||
onPointerCancel={cancel}
|
||||
onPointerLeave={cancel}
|
||||
onContextMenu={(e) => {
|
||||
// Pas de menu « Enregistrer l'image » pendant l'appui long
|
||||
if (fired.current || timer.current) e.preventDefault()
|
||||
}}
|
||||
onClickCapture={(e) => {
|
||||
// Le « clic » qui suit un appui long ne doit pas ouvrir la fiche
|
||||
if (fired.current) {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
fired.current = false
|
||||
}
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
|
||||
{selecting ? (
|
||||
<button
|
||||
type="button"
|
||||
onClick={onToggle}
|
||||
aria-pressed={selected}
|
||||
aria-label={t('select.toggle', { title })}
|
||||
className={cx('absolute -inset-1 z-10 rounded-2xl transition-colors', selected ? 'bg-accent-fill/15 ring-2 ring-accent' : 'active:bg-ink/5')}
|
||||
>
|
||||
<span
|
||||
className={cx(
|
||||
'absolute end-3 top-3 grid size-7 place-items-center rounded-full border-2 transition-colors',
|
||||
selected ? 'border-accent-fill bg-accent-fill text-on-accent' : 'border-ink/70 bg-bg/70 text-transparent',
|
||||
)}
|
||||
>
|
||||
<Check size={15} strokeWidth={3} />
|
||||
</span>
|
||||
</button>
|
||||
) : (
|
||||
// Ordinateur : case à cocher au survol (ou au clavier) pour commencer une sélection
|
||||
<button
|
||||
type="button"
|
||||
onClick={onStartSelect}
|
||||
aria-label={t('select.toggle', { title })}
|
||||
className="absolute end-2 top-2 z-10 hidden size-7 place-items-center rounded-full border-2 border-ink/70 bg-bg/85 text-transparent opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100 pointer-fine:grid"
|
||||
>
|
||||
<Check size={15} strokeWidth={3} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
import { t } from '../../i18n'
|
||||
import { CircleDot, ListPlus, Minus, Plus, Tag, Trash2, X } from 'lucide-react'
|
||||
import { useMemo, useState, type ReactNode } from 'react'
|
||||
import { useBackToClose } from '../../lib/backNav'
|
||||
import { allTags, cleanTag, hasTag } from '../../lib/bulk'
|
||||
import { STATUSES } from '../../lib/constants'
|
||||
import { useEscape } from '../../lib/escape'
|
||||
import { cx, normalizeText } from '../../lib/utils'
|
||||
import { useMedia } from '../../store'
|
||||
import type { MediaItem, WatchStatus } from '../../types'
|
||||
import { StatusDot } from '../Badges'
|
||||
import ConfirmDialog from '../ConfirmDialog'
|
||||
import { NewListForm } from '../ListsView'
|
||||
import { useLibraryActions } from './useLibraryActions'
|
||||
|
||||
type Panel = null | 'status' | 'list' | 'tag' | 'delete'
|
||||
|
||||
interface Props {
|
||||
/** Fiches sélectionnées */
|
||||
selected: MediaItem[]
|
||||
/** Action terminée : on quitte le mode sélection */
|
||||
onDone: () => void
|
||||
}
|
||||
|
||||
/** Barre d'actions groupées (en bas, à la place de la barre de navigation). */
|
||||
export default function SelectionBar({ selected, onDone }: Props) {
|
||||
const actions = useLibraryActions()
|
||||
const [panel, setPanel] = useState<Panel>(null)
|
||||
const ids = selected.map((i) => i.id)
|
||||
const none = selected.length === 0
|
||||
|
||||
const run = async (fn: () => Promise<void>) => {
|
||||
setPanel(null)
|
||||
await fn()
|
||||
onDone()
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="safe-bottom fixed inset-x-0 bottom-0 z-40 border-t border-line bg-bg/95 backdrop-blur-md lg:start-60 lg:bottom-6 lg:mx-auto lg:max-w-xl lg:rounded-2xl lg:border lg:pb-0">
|
||||
<div className="mx-auto grid max-w-2xl grid-cols-4 px-2" role="toolbar" aria-label={t('select.actions')}>
|
||||
<BarButton icon={<CircleDot size={21} />} label={t('select.status')} onClick={() => setPanel('status')} disabled={none} />
|
||||
<BarButton icon={<ListPlus size={21} />} label={t('select.list')} onClick={() => setPanel('list')} disabled={none} />
|
||||
<BarButton icon={<Tag size={21} />} label={t('select.tag')} onClick={() => setPanel('tag')} disabled={none} />
|
||||
<BarButton icon={<Trash2 size={21} />} label={t('common.delete')} onClick={() => setPanel('delete')} disabled={none} danger />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{panel === 'status' && (
|
||||
<PickerSheet title={t('select.statusTitle', { count: selected.length })} onClose={() => setPanel(null)}>
|
||||
{STATUSES.map((s) => {
|
||||
const already = selected.every((i) => i.status === s.value)
|
||||
return (
|
||||
<button
|
||||
key={s.value}
|
||||
onClick={() => void run(() => actions.setStatus(ids, s.value as WatchStatus))}
|
||||
disabled={already}
|
||||
className="flex w-full items-center gap-3 rounded-xl px-3 py-3.5 text-start text-[15px] text-ink active:bg-surface-2 disabled:opacity-40"
|
||||
>
|
||||
<StatusDot status={s.value} className="size-2.5" />
|
||||
{s.label}
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
</PickerSheet>
|
||||
)}
|
||||
|
||||
{panel === 'list' && <ListPicker selected={selected} onClose={() => setPanel(null)} run={run} />}
|
||||
{panel === 'tag' && <TagPicker selected={selected} onClose={() => setPanel(null)} run={run} />}
|
||||
|
||||
<ConfirmDialog
|
||||
open={panel === 'delete'}
|
||||
title={t('confirm.title')}
|
||||
message={t('select.deleteConfirm', { count: selected.length })}
|
||||
confirmLabel={t('common.delete')}
|
||||
onConfirm={() => void run(() => actions.deleteItems(ids))}
|
||||
onCancel={() => setPanel(null)}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
function BarButton({ icon, label, onClick, disabled, danger }: { icon: ReactNode; label: string; onClick: () => void; disabled?: boolean; danger?: boolean }) {
|
||||
return (
|
||||
<button
|
||||
onClick={onClick}
|
||||
disabled={disabled}
|
||||
className={cx('flex flex-col items-center gap-1 pb-2 pt-2.5 text-[11px] font-medium transition-colors disabled:opacity-35', danger ? 'text-accent' : 'text-ink')}
|
||||
>
|
||||
{icon}
|
||||
{label}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
/** Petite feuille en bas de l'écran ; Échap ou le geste retour la ferment sans quitter la sélection. */
|
||||
function PickerSheet({ title, onClose, children }: { title: string; onClose: () => void; children: ReactNode }) {
|
||||
useEscape(onClose)
|
||||
useBackToClose(onClose)
|
||||
return (
|
||||
<div className="fixed inset-0 z-[60] flex items-end justify-center bg-black/70 sm:items-center" onClick={onClose}>
|
||||
<div
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label={title}
|
||||
className="sheet-in safe-bottom max-h-[85dvh] w-full max-w-md overflow-y-auto overscroll-contain rounded-t-3xl border border-line-strong bg-surface p-3 sm:rounded-3xl"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<div className="mb-1 flex items-center justify-between gap-2 ps-3">
|
||||
<h2 className="text-base font-semibold">{title}</h2>
|
||||
<button onClick={onClose} className="grid size-10 place-items-center rounded-full text-ink-3" aria-label={t('common.close')}>
|
||||
<X size={20} />
|
||||
</button>
|
||||
</div>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
type Run = (fn: () => Promise<void>) => Promise<void>
|
||||
|
||||
function ListPicker({ selected, onClose, run }: { selected: MediaItem[]; onClose: () => void; run: Run }) {
|
||||
const { lists } = useMedia()
|
||||
const actions = useLibraryActions()
|
||||
const ids = selected.map((i) => i.id)
|
||||
return (
|
||||
<PickerSheet title={t('select.listTitle', { count: selected.length })} onClose={onClose}>
|
||||
{lists.length === 0 && <p className="px-3 pb-3 text-sm text-ink-3">{t('select.noLists')}</p>}
|
||||
<ul className="divide-y divide-line">
|
||||
{lists.map((l) => {
|
||||
const inside = selected.filter((i) => i.listIds?.includes(l.id)).length
|
||||
return (
|
||||
<li key={l.id} className="flex items-center gap-2 px-3 py-2.5">
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="truncate text-[15px]">{l.name}</p>
|
||||
<p className="text-xs text-ink-3">{t('select.inList', { n: inside, total: selected.length })}</p>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => void run(() => actions.removeFromList(ids, l.id))}
|
||||
disabled={inside === 0}
|
||||
className="grid size-9 place-items-center rounded-full border border-line text-ink-2 disabled:opacity-30"
|
||||
aria-label={t('select.removeFrom', { list: l.name })}
|
||||
>
|
||||
<Minus size={16} />
|
||||
</button>
|
||||
<button
|
||||
onClick={() => void run(() => actions.addToList(ids, l.id))}
|
||||
disabled={inside === selected.length}
|
||||
className="grid size-9 place-items-center rounded-full bg-accent-fill text-on-accent disabled:opacity-30"
|
||||
aria-label={t('select.addTo', { list: l.name })}
|
||||
>
|
||||
<Plus size={16} />
|
||||
</button>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
<div className="mt-2 px-1 pb-1">
|
||||
<NewListForm onCreated={(l) => void run(() => actions.addToList(ids, l.id, l.name))} />
|
||||
</div>
|
||||
</PickerSheet>
|
||||
)
|
||||
}
|
||||
|
||||
function TagPicker({ selected, onClose, run }: { selected: MediaItem[]; onClose: () => void; run: Run }) {
|
||||
const { items } = useMedia()
|
||||
const actions = useLibraryActions()
|
||||
const ids = selected.map((i) => i.id)
|
||||
const existing = useMemo(() => allTags(items), [items])
|
||||
// Tags déjà portés par au moins une fiche sélectionnée (pour les retirer)
|
||||
const present = useMemo(() => allTags(selected), [selected])
|
||||
const [text, setText] = useState('')
|
||||
const q = normalizeText(text)
|
||||
const suggestions = existing.filter((tag) => !selected.every((i) => hasTag(i, tag)) && (!q || normalizeText(tag).includes(q))).slice(0, 16)
|
||||
const add = (raw: string) => {
|
||||
const tag = cleanTag(raw, existing)
|
||||
if (tag) void run(() => actions.addTag(ids, tag))
|
||||
}
|
||||
|
||||
return (
|
||||
<PickerSheet title={t('select.tagTitle', { count: selected.length })} onClose={onClose}>
|
||||
<form
|
||||
className="flex gap-2 px-1"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault()
|
||||
add(text)
|
||||
}}
|
||||
>
|
||||
<input className="field" value={text} onChange={(e) => setText(e.target.value)} placeholder={t('tags.placeholder')} maxLength={40} autoFocus enterKeyHint="done" aria-label={t('tags.label')} />
|
||||
<button disabled={!cleanTag(text)} className="btn btn-light shrink-0 px-4 text-sm">
|
||||
{t('common.add')}
|
||||
</button>
|
||||
</form>
|
||||
{suggestions.length > 0 && (
|
||||
<div className="mt-3 flex flex-wrap gap-1.5 px-1">
|
||||
{suggestions.map((tag) => (
|
||||
<button key={tag} onClick={() => add(tag)} className="chip py-1! text-xs">
|
||||
+ {tag}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{present.length > 0 && (
|
||||
<div className="mt-5 border-t border-line px-1 pt-3">
|
||||
<span className="label">{t('select.removeTag')}</span>
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
{present.map((tag) => (
|
||||
<button key={tag} onClick={() => void run(() => actions.removeTag(ids, tag))} className="chip py-1! text-xs" aria-label={t('common.removeX', { name: tag })}>
|
||||
#{tag} <X size={13} />
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<p className="mt-4 px-1 pb-1 text-xs text-ink-3">{t('tags.private')}</p>
|
||||
</PickerSheet>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
import { t } from '../../i18n'
|
||||
import { useCallback, useMemo } from 'react'
|
||||
import { STATUS_BY_VALUE } from '../../lib/constants'
|
||||
import { hasTag, statusPatch } from '../../lib/bulk'
|
||||
import { LIMITS } from '../../lib/security'
|
||||
import { normalizeText } from '../../lib/utils'
|
||||
import { useMedia } from '../../store'
|
||||
import type { MediaItem, WatchStatus } from '../../types'
|
||||
import { useToast } from '../Toast'
|
||||
|
||||
/**
|
||||
* Actions sur la bibliothèque qui proposent « Annuler » (suppression, statut, listes, tags).
|
||||
* L'annulation remet les fiches exactement comme avant (voir `restore` dans le store).
|
||||
*/
|
||||
export function useLibraryActions() {
|
||||
const { items, lists, updateMany, removeMany, restore } = useMedia()
|
||||
const toast = useToast()
|
||||
|
||||
const pick = useCallback((ids: Iterable<string>) => {
|
||||
const wanted = new Set(ids)
|
||||
return items.filter((i) => wanted.has(i.id))
|
||||
}, [items])
|
||||
|
||||
const undoable = useCallback(
|
||||
(message: string, snapshots: MediaItem[]) => toast.show(message, { undo: () => restore(snapshots) }),
|
||||
[toast, restore],
|
||||
)
|
||||
|
||||
const listName = useCallback((id: string) => lists.find((l) => l.id === id)?.name ?? '', [lists])
|
||||
|
||||
return useMemo(
|
||||
() => ({
|
||||
/** Supprime des fiches (avec « Annuler »). */
|
||||
async deleteItems(ids: Iterable<string>) {
|
||||
const snapshots = pick(ids)
|
||||
if (!snapshots.length) return
|
||||
await removeMany(snapshots.map((i) => i.id))
|
||||
undoable(
|
||||
snapshots.length === 1 ? t('toast.deleted', { title: snapshots[0].title }) : t('toast.deletedMany', { count: snapshots.length }),
|
||||
snapshots,
|
||||
)
|
||||
},
|
||||
|
||||
/** Change le statut (dates et épisodes suivent, comme sur la fiche). */
|
||||
async setStatus(ids: Iterable<string>, status: WatchStatus) {
|
||||
const snapshots = pick(ids).filter((i) => i.status !== status)
|
||||
if (!snapshots.length) return
|
||||
await updateMany(snapshots.map((i) => ({ id: i.id, patch: statusPatch(i, status) })))
|
||||
const label = STATUS_BY_VALUE[status].label
|
||||
undoable(
|
||||
snapshots.length === 1 ? t('toast.status', { title: snapshots[0].title, status: label }) : t('toast.statusMany', { count: snapshots.length, status: label }),
|
||||
snapshots,
|
||||
)
|
||||
},
|
||||
|
||||
async addToList(ids: Iterable<string>, listId: string, name?: string) {
|
||||
const snapshots = pick(ids).filter((i) => !i.listIds?.includes(listId))
|
||||
if (!snapshots.length) return
|
||||
await updateMany(snapshots.map((i) => ({ id: i.id, patch: { listIds: [...(i.listIds ?? []), listId] } })))
|
||||
undoable(t('toast.addedToList', { count: snapshots.length, list: name ?? listName(listId) }), snapshots)
|
||||
},
|
||||
|
||||
async removeFromList(ids: Iterable<string>, listId: string) {
|
||||
const snapshots = pick(ids).filter((i) => i.listIds?.includes(listId))
|
||||
if (!snapshots.length) return
|
||||
await updateMany(snapshots.map((i) => ({ id: i.id, patch: { listIds: i.listIds!.filter((x) => x !== listId) } })))
|
||||
undoable(
|
||||
snapshots.length === 1 ? t('toast.removedFromList', { title: snapshots[0].title, list: listName(listId) }) : t('toast.removedFromListMany', { count: snapshots.length, list: listName(listId) }),
|
||||
snapshots,
|
||||
)
|
||||
},
|
||||
|
||||
async addTag(ids: Iterable<string>, tag: string) {
|
||||
const snapshots = pick(ids).filter((i) => !hasTag(i, tag) && (i.tags?.length ?? 0) < LIMITS.tags)
|
||||
if (!snapshots.length || !tag) return
|
||||
await updateMany(snapshots.map((i) => ({ id: i.id, patch: { tags: [...(i.tags ?? []), tag] } })))
|
||||
undoable(t('toast.tagged', { count: snapshots.length, tag }), snapshots)
|
||||
},
|
||||
|
||||
async removeTag(ids: Iterable<string>, tag: string) {
|
||||
const key = normalizeText(tag)
|
||||
const snapshots = pick(ids).filter((i) => hasTag(i, tag))
|
||||
if (!snapshots.length) return
|
||||
await updateMany(
|
||||
snapshots.map((i) => {
|
||||
const tags = i.tags!.filter((x) => normalizeText(x) !== key)
|
||||
return { id: i.id, patch: { tags: tags.length ? tags : undefined } }
|
||||
}),
|
||||
)
|
||||
undoable(t('toast.untagged', { count: snapshots.length, tag }), snapshots)
|
||||
},
|
||||
|
||||
/** « Annuler » pour un changement fait ailleurs (fiche) : remet ces copies. */
|
||||
offerUndo: undoable,
|
||||
}),
|
||||
[pick, removeMany, updateMany, undoable, listName],
|
||||
)
|
||||
}
|
||||
@@ -15,6 +15,9 @@ import { backdropSrcSet, tmdbSized } from '../../lib/tmdbImage'
|
||||
import { renderItemCard, slug } from '../../lib/shareCard'
|
||||
import { cx, formatDate, formatDuration, formatRating, todayISO } from '../../lib/utils'
|
||||
import { useMedia } from '../../store'
|
||||
import { allTags, cleanTag } from '../../lib/bulk'
|
||||
import { useLibraryActions } from '../library/useLibraryActions'
|
||||
import TagInput from '../TagInput'
|
||||
import type { MediaInput, MediaItem, RatingScale, WatchStatus } from '../../types'
|
||||
import ConfirmDialog from '../ConfirmDialog'
|
||||
import EpisodeList from '../EpisodeList'
|
||||
@@ -43,7 +46,8 @@ interface Props {
|
||||
* Vu / En cours / À voir, note, coup de cœur, avis, épisodes, casting et note moyenne du public.
|
||||
*/
|
||||
export default function TitleSheet({ item: initial, seed, onClose, onGoToSettings }: Props) {
|
||||
const { items, settings, add, update, remove, lists, patchMany } = useMedia()
|
||||
const { items, settings, add, update, lists, patchMany } = useMedia()
|
||||
const actions = useLibraryActions()
|
||||
const social = useSocial()
|
||||
useScrollLock()
|
||||
useEscape(onClose)
|
||||
@@ -183,7 +187,11 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
const cap = episodeCap(item ?? { episodesTotal: data.episodesTotal, seasons: data.seasons })
|
||||
if (episodic && cap) patch.episodesWatched = cap
|
||||
}
|
||||
void save(patch)
|
||||
// Changement de statut d'un titre déjà suivi : « Annuler » remet la fiche telle quelle (dates, épisodes…)
|
||||
const before = item
|
||||
void save(patch).then(() => {
|
||||
if (before) actions.offerUndo(t('toast.status', { title: before.title, status: STATUS_BY_VALUE[s].label }), [before])
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -254,13 +262,25 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
}
|
||||
}
|
||||
|
||||
const onDelete = async () => {
|
||||
const onDelete = () => {
|
||||
if (!item) return
|
||||
setConfirmDelete(false)
|
||||
await remove(item.id)
|
||||
// Le message « Supprimé · Annuler » reste affiché après la fermeture de la fiche
|
||||
void actions.deleteItems([item.id])
|
||||
onClose()
|
||||
}
|
||||
|
||||
/** Suivi modifié ; retirer le titre d'une liste propose « Annuler ». */
|
||||
const changeTracking = (patch: Partial<MediaInput>) => {
|
||||
if (!item) return
|
||||
const before = item
|
||||
const removed = patch.listIds ? (before.listIds ?? []).filter((id) => !patch.listIds!.includes(id)) : []
|
||||
void update(before.id, patch).then(() => {
|
||||
const list = removed.length === 1 ? lists.find((l) => l.id === removed[0]) : undefined
|
||||
if (list) actions.offerUndo(t('toast.removedFromList', { title: before.title, list: list.name }), [before])
|
||||
})
|
||||
}
|
||||
|
||||
const heroImage = backdrop ?? extras?.backdrop
|
||||
const average = extras?.average ?? data.publicRating
|
||||
const source = externalId?.startsWith('anilist:') ? 'AniList' : externalId ? 'TMDB' : undefined
|
||||
@@ -324,6 +344,16 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
<Check size={13} className="text-accent" /> {t('title.inLibrary')} · {STATUS_BY_VALUE[status].label}
|
||||
</p>
|
||||
)}
|
||||
{/* Mes tags perso : discrets, visibles par moi seul */}
|
||||
{item?.tags && item.tags.length > 0 && (
|
||||
<ul className="mt-2 flex flex-wrap gap-1.5" aria-label={t('tags.label')}>
|
||||
{item.tags.map((tag) => (
|
||||
<li key={tag} className="rounded-full border border-line px-2 py-0.5 text-[11px] text-ink-3">
|
||||
#{tag}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -492,7 +522,7 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
)}
|
||||
|
||||
{/* Mon suivi : dates, plateforme, listes, revisionnages */}
|
||||
{item && <Tracking item={item} lists={lists} onChange={(patch) => void update(item.id, patch)} />}
|
||||
{item && <Tracking item={item} lists={lists} tagSuggestions={allTags(items)} onChange={changeTracking} />}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -685,7 +715,7 @@ function Synopsis({ text }: { text: string }) {
|
||||
}
|
||||
|
||||
/** Dates, plateforme, listes et revisionnages : enregistrés dès qu'on les change. */
|
||||
function Tracking({ item, lists, onChange }: { item: MediaItem; lists: { id: string; name: string }[]; onChange: (p: Partial<MediaInput>) => void }) {
|
||||
function Tracking({ item, lists, tagSuggestions, onChange }: { item: MediaItem; lists: { id: string; name: string }[]; tagSuggestions: string[]; onChange: (p: Partial<MediaInput>) => void }) {
|
||||
const [open, setOpen] = useState(false)
|
||||
// Plus récent en premier (la sauvegarde les range dans l'autre sens)
|
||||
const rewatches = [...(item.rewatchDates ?? [])].sort().reverse()
|
||||
@@ -737,6 +767,18 @@ function Tracking({ item, lists, onChange }: { item: MediaItem; lists: { id: str
|
||||
)}
|
||||
<NewListForm onCreated={(l) => onChange({ listIds: [...(item.listIds ?? []), l.id] })} />
|
||||
</div>
|
||||
<div>
|
||||
<span className="label">{t('tags.label')}</span>
|
||||
<TagInput
|
||||
value={item.tags ?? []}
|
||||
onChange={(tags) => onChange({ tags: tags.length ? tags.slice(0, 30) : undefined })}
|
||||
suggestions={tagSuggestions}
|
||||
placeholder={t('tags.placeholder')}
|
||||
normalize={(v) => cleanTag(v, tagSuggestions)}
|
||||
showAll
|
||||
/>
|
||||
<p className="mt-1.5 text-xs text-ink-3">{t('tags.private')}</p>
|
||||
</div>
|
||||
<div>
|
||||
<span className="label">{t('form.rewatches')}</span>
|
||||
{rewatches.length > 0 && (
|
||||
|
||||
@@ -1035,6 +1035,87 @@ const dict: Translations = {
|
||||
'sync.pending_two': "تعديلان في الانتظار",
|
||||
'sync.pending_few': "{count} تعديلات في الانتظار",
|
||||
'sync.pending_many': "{count} تعديلًا في الانتظار",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "وسوم شخصية",
|
||||
"tags.placeholder": "مريح، هالوين، لإعادة المشاهدة مع ليا…",
|
||||
"tags.private": "مرئية لك وحدك، ولا تظهر أبدًا في ملفك الشخصي.",
|
||||
"tags.filter": "وسوم شخصية",
|
||||
"select.start": "تحديد",
|
||||
"select.exit": "إنهاء التحديد",
|
||||
"select.all": "تحديد الكل",
|
||||
"select.none": "إلغاء تحديد الكل",
|
||||
"select.toggle": "تحديد «{title}»",
|
||||
"select.actions": "إجراءات التحديد",
|
||||
"select.status": "الحالة",
|
||||
"select.list": "قائمة",
|
||||
"select.tag": "وسم",
|
||||
"select.noLists": "لا توجد قوائم بعد — أنشئ واحدة أدناه.",
|
||||
"select.inList": "موجودة بالفعل: {n}/{total}",
|
||||
"select.addTo": "إضافة إلى «{list}»",
|
||||
"select.removeFrom": "إزالة من «{list}»",
|
||||
"select.removeTag": "إزالة وسم",
|
||||
"toast.undo": "تراجع",
|
||||
"toast.undone": "تم التراجع",
|
||||
"toast.undoFailed": "تعذّر التراجع",
|
||||
"toast.deleted": "تم حذف «{title}»",
|
||||
"toast.status": "«{title}»: {status}",
|
||||
"toast.removedFromList": "تمت إزالة «{title}» من «{list}»",
|
||||
"select.count_zero": "لم يُحدَّد أي عنوان",
|
||||
"select.count_one": "تم تحديد عنوان واحد",
|
||||
"select.count_two": "تم تحديد عنوانين",
|
||||
"select.count_few": "تم تحديد {count} عناوين",
|
||||
"select.count_many": "تم تحديد {count} عنوانًا",
|
||||
"select.count_other": "تم تحديد {count} عنوان",
|
||||
"select.statusTitle_one": "حالة عنوان واحد",
|
||||
"select.statusTitle_two": "حالة عنوانان",
|
||||
"select.statusTitle_few": "حالة {count} عناوين",
|
||||
"select.statusTitle_many": "حالة {count} عنوانًا",
|
||||
"select.statusTitle_other": "حالة {count} عنوان",
|
||||
"select.listTitle_one": "القوائم · عنوان واحد",
|
||||
"select.listTitle_two": "القوائم · عنوانان",
|
||||
"select.listTitle_few": "القوائم · {count} عناوين",
|
||||
"select.listTitle_many": "القوائم · {count} عنوانًا",
|
||||
"select.listTitle_other": "القوائم · {count} عنوان",
|
||||
"select.tagTitle_one": "وسم · عنوان واحد",
|
||||
"select.tagTitle_two": "وسم · عنوانان",
|
||||
"select.tagTitle_few": "وسم · {count} عناوين",
|
||||
"select.tagTitle_many": "وسم · {count} عنوانًا",
|
||||
"select.tagTitle_other": "وسم · {count} عنوان",
|
||||
"select.deleteConfirm_one": "حذف عنوان واحد من مكتبتك؟",
|
||||
"select.deleteConfirm_two": "حذف عنوانين من مكتبتك؟",
|
||||
"select.deleteConfirm_few": "حذف {count} عناوين من مكتبتك؟",
|
||||
"select.deleteConfirm_many": "حذف {count} عنوانًا من مكتبتك؟",
|
||||
"select.deleteConfirm_other": "حذف {count} عنوان من مكتبتك؟",
|
||||
"toast.deletedMany_one": "تم حذف عنوان واحد",
|
||||
"toast.deletedMany_two": "تم حذف عنوانين",
|
||||
"toast.deletedMany_few": "تم حذف {count} عناوين",
|
||||
"toast.deletedMany_many": "تم حذف {count} عنوانًا",
|
||||
"toast.deletedMany_other": "تم حذف {count} عنوان",
|
||||
"toast.statusMany_one": "عنوان واحد: {status}",
|
||||
"toast.statusMany_two": "عنوانان: {status}",
|
||||
"toast.statusMany_few": "{count} عناوين: {status}",
|
||||
"toast.statusMany_many": "{count} عنوانًا: {status}",
|
||||
"toast.statusMany_other": "{count} عنوان: {status}",
|
||||
"toast.addedToList_one": "تمت إضافة عنوان واحد إلى «{list}»",
|
||||
"toast.addedToList_two": "تمت إضافة عنوانين إلى «{list}»",
|
||||
"toast.addedToList_few": "تمت إضافة {count} عناوين إلى «{list}»",
|
||||
"toast.addedToList_many": "تمت إضافة {count} عنوانًا إلى «{list}»",
|
||||
"toast.addedToList_other": "تمت إضافة {count} عنوان إلى «{list}»",
|
||||
"toast.removedFromListMany_one": "تمت إزالة عنوان واحد من «{list}»",
|
||||
"toast.removedFromListMany_two": "تمت إزالة عنوانين من «{list}»",
|
||||
"toast.removedFromListMany_few": "تمت إزالة {count} عناوين من «{list}»",
|
||||
"toast.removedFromListMany_many": "تمت إزالة {count} عنوانًا من «{list}»",
|
||||
"toast.removedFromListMany_other": "تمت إزالة {count} عنوان من «{list}»",
|
||||
"toast.tagged_one": "تمت إضافة #{tag} إلى عنوان واحد",
|
||||
"toast.tagged_two": "تمت إضافة #{tag} إلى عنوانين",
|
||||
"toast.tagged_few": "تمت إضافة #{tag} إلى {count} عناوين",
|
||||
"toast.tagged_many": "تمت إضافة #{tag} إلى {count} عنوانًا",
|
||||
"toast.tagged_other": "تمت إضافة #{tag} إلى {count} عنوان",
|
||||
"toast.untagged_one": "تمت إزالة #{tag} من عنوان واحد",
|
||||
"toast.untagged_two": "تمت إزالة #{tag} من عنوانين",
|
||||
"toast.untagged_few": "تمت إزالة #{tag} من {count} عناوين",
|
||||
"toast.untagged_many": "تمت إزالة #{tag} من {count} عنوانًا",
|
||||
"toast.untagged_other": "تمت إزالة #{tag} من {count} عنوان",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} Änderung ausstehend",
|
||||
'sync.pending_other': "{count} Änderungen ausstehend",
|
||||
'sync.now': "Jetzt synchronisieren",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Eigene Tags",
|
||||
"tags.placeholder": "comfort, halloween, mit Lea nochmal schauen…",
|
||||
"tags.private": "Nur für dich sichtbar, nie auf deinem Profil.",
|
||||
"tags.filter": "Eigene Tags",
|
||||
"select.start": "Auswählen",
|
||||
"select.exit": "Auswahl beenden",
|
||||
"select.all": "Alle auswählen",
|
||||
"select.none": "Auswahl aufheben",
|
||||
"select.toggle": "„{title}“ auswählen",
|
||||
"select.actions": "Aktionen für die Auswahl",
|
||||
"select.status": "Status",
|
||||
"select.list": "Liste",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Noch keine Listen – erstelle unten eine.",
|
||||
"select.inList": "Schon drin: {n}/{total}",
|
||||
"select.addTo": "Zu „{list}“ hinzufügen",
|
||||
"select.removeFrom": "Aus „{list}“ entfernen",
|
||||
"select.removeTag": "Tag entfernen",
|
||||
"toast.undo": "Rückgängig",
|
||||
"toast.undone": "Rückgängig gemacht",
|
||||
"toast.undoFailed": "Rückgängig machen fehlgeschlagen",
|
||||
"toast.deleted": "„{title}“ gelöscht",
|
||||
"toast.status": "„{title}“ → {status}",
|
||||
"toast.removedFromList": "„{title}“ aus „{list}“ entfernt",
|
||||
"select.count_zero": "Kein Titel ausgewählt",
|
||||
"select.count_one": "{count} ausgewählt",
|
||||
"select.count_other": "{count} ausgewählt",
|
||||
"select.statusTitle_one": "Status von {count} Titel",
|
||||
"select.statusTitle_other": "Status von {count} Titeln",
|
||||
"select.listTitle_one": "Listen · {count} Titel",
|
||||
"select.listTitle_other": "Listen · {count} Titel",
|
||||
"select.tagTitle_one": "Tag · {count} Titel",
|
||||
"select.tagTitle_other": "Tag · {count} Titel",
|
||||
"select.deleteConfirm_one": "{count} Titel aus deiner Bibliothek löschen?",
|
||||
"select.deleteConfirm_other": "{count} Titel aus deiner Bibliothek löschen?",
|
||||
"toast.deletedMany_one": "{count} Titel gelöscht",
|
||||
"toast.deletedMany_other": "{count} Titel gelöscht",
|
||||
"toast.statusMany_one": "{count} Titel → {status}",
|
||||
"toast.statusMany_other": "{count} Titel → {status}",
|
||||
"toast.addedToList_one": "{count} Titel zu „{list}“ hinzugefügt",
|
||||
"toast.addedToList_other": "{count} Titel zu „{list}“ hinzugefügt",
|
||||
"toast.removedFromListMany_one": "{count} Titel aus „{list}“ entfernt",
|
||||
"toast.removedFromListMany_other": "{count} Titel aus „{list}“ entfernt",
|
||||
"toast.tagged_one": "#{tag} zu {count} Titel hinzugefügt",
|
||||
"toast.tagged_other": "#{tag} zu {count} Titeln hinzugefügt",
|
||||
"toast.untagged_one": "#{tag} von {count} Titel entfernt",
|
||||
"toast.untagged_other": "#{tag} von {count} Titeln entfernt",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} change waiting",
|
||||
'sync.pending_other': "{count} changes waiting",
|
||||
'sync.now': "Sync now",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Personal tags",
|
||||
"tags.placeholder": "comfort, halloween, rewatch with Lea…",
|
||||
"tags.private": "Only you can see them, never on your profile.",
|
||||
"tags.filter": "Personal tags",
|
||||
"select.start": "Select",
|
||||
"select.exit": "Exit selection",
|
||||
"select.all": "Select all",
|
||||
"select.none": "Deselect all",
|
||||
"select.toggle": "Select “{title}”",
|
||||
"select.actions": "Selection actions",
|
||||
"select.status": "Status",
|
||||
"select.list": "List",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "No lists yet — create one below.",
|
||||
"select.inList": "Already in: {n}/{total}",
|
||||
"select.addTo": "Add to “{list}”",
|
||||
"select.removeFrom": "Remove from “{list}”",
|
||||
"select.removeTag": "Remove a tag",
|
||||
"toast.undo": "Undo",
|
||||
"toast.undone": "Undone",
|
||||
"toast.undoFailed": "Couldn’t undo",
|
||||
"toast.deleted": "“{title}” deleted",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "“{title}” removed from “{list}”",
|
||||
"select.count_zero": "No titles selected",
|
||||
"select.count_one": "{count} selected",
|
||||
"select.count_other": "{count} selected",
|
||||
"select.statusTitle_one": "Status of {count} title",
|
||||
"select.statusTitle_other": "Status of {count} titles",
|
||||
"select.listTitle_one": "Lists · {count} title",
|
||||
"select.listTitle_other": "Lists · {count} titles",
|
||||
"select.tagTitle_one": "Tag · {count} title",
|
||||
"select.tagTitle_other": "Tag · {count} titles",
|
||||
"select.deleteConfirm_one": "Delete {count} title from your library?",
|
||||
"select.deleteConfirm_other": "Delete {count} titles from your library?",
|
||||
"toast.deletedMany_one": "{count} title deleted",
|
||||
"toast.deletedMany_other": "{count} titles deleted",
|
||||
"toast.statusMany_one": "{count} title → {status}",
|
||||
"toast.statusMany_other": "{count} titles → {status}",
|
||||
"toast.addedToList_one": "{count} title added to “{list}”",
|
||||
"toast.addedToList_other": "{count} titles added to “{list}”",
|
||||
"toast.removedFromListMany_one": "{count} title removed from “{list}”",
|
||||
"toast.removedFromListMany_other": "{count} titles removed from “{list}”",
|
||||
"toast.tagged_one": "#{tag} added to {count} title",
|
||||
"toast.tagged_other": "#{tag} added to {count} titles",
|
||||
"toast.untagged_one": "#{tag} removed from {count} title",
|
||||
"toast.untagged_other": "#{tag} removed from {count} titles",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} cambio pendiente",
|
||||
'sync.pending_other': "{count} cambios pendientes",
|
||||
'sync.now': "Sincronizar",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Etiquetas personales",
|
||||
"tags.placeholder": "comfort, halloween, volver a ver con Lea…",
|
||||
"tags.private": "Solo tú las ves, nunca en tu perfil.",
|
||||
"tags.filter": "Etiquetas personales",
|
||||
"select.start": "Seleccionar",
|
||||
"select.exit": "Salir de la selección",
|
||||
"select.all": "Seleccionar todo",
|
||||
"select.none": "Deseleccionar todo",
|
||||
"select.toggle": "Seleccionar «{title}»",
|
||||
"select.actions": "Acciones de la selección",
|
||||
"select.status": "Estado",
|
||||
"select.list": "Lista",
|
||||
"select.tag": "Etiqueta",
|
||||
"select.noLists": "Aún no hay listas: crea una abajo.",
|
||||
"select.inList": "Ya incluidos: {n}/{total}",
|
||||
"select.addTo": "Añadir a «{list}»",
|
||||
"select.removeFrom": "Quitar de «{list}»",
|
||||
"select.removeTag": "Quitar una etiqueta",
|
||||
"toast.undo": "Deshacer",
|
||||
"toast.undone": "Deshecho",
|
||||
"toast.undoFailed": "No se pudo deshacer",
|
||||
"toast.deleted": "«{title}» eliminado",
|
||||
"toast.status": "«{title}» → {status}",
|
||||
"toast.removedFromList": "«{title}» quitado de «{list}»",
|
||||
"select.count_zero": "Ningún título seleccionado",
|
||||
"select.count_one": "{count} seleccionado",
|
||||
"select.count_other": "{count} seleccionados",
|
||||
"select.statusTitle_one": "Estado de {count} título",
|
||||
"select.statusTitle_other": "Estado de {count} títulos",
|
||||
"select.listTitle_one": "Listas · {count} título",
|
||||
"select.listTitle_other": "Listas · {count} títulos",
|
||||
"select.tagTitle_one": "Etiqueta · {count} título",
|
||||
"select.tagTitle_other": "Etiqueta · {count} títulos",
|
||||
"select.deleteConfirm_one": "¿Eliminar {count} título de tu biblioteca?",
|
||||
"select.deleteConfirm_other": "¿Eliminar {count} títulos de tu biblioteca?",
|
||||
"toast.deletedMany_one": "{count} título eliminado",
|
||||
"toast.deletedMany_other": "{count} títulos eliminados",
|
||||
"toast.statusMany_one": "{count} título → {status}",
|
||||
"toast.statusMany_other": "{count} títulos → {status}",
|
||||
"toast.addedToList_one": "{count} título añadido a «{list}»",
|
||||
"toast.addedToList_other": "{count} títulos añadidos a «{list}»",
|
||||
"toast.removedFromListMany_one": "{count} título quitado de «{list}»",
|
||||
"toast.removedFromListMany_other": "{count} títulos quitados de «{list}»",
|
||||
"toast.tagged_one": "#{tag} añadida a {count} título",
|
||||
"toast.tagged_other": "#{tag} añadida a {count} títulos",
|
||||
"toast.untagged_one": "#{tag} quitada de {count} título",
|
||||
"toast.untagged_other": "#{tag} quitada de {count} títulos",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -899,6 +899,54 @@ const dict = {
|
||||
'sync.pending_one': "{count} modification en attente",
|
||||
'sync.pending_other': "{count} modifications en attente",
|
||||
'sync.now': "Synchroniser",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Tags perso",
|
||||
"tags.placeholder": "comfort, halloween, à revoir avec Léa…",
|
||||
"tags.private": "Visibles par vous seul, jamais sur votre profil.",
|
||||
"tags.filter": "Tags perso",
|
||||
"select.start": "Sélectionner",
|
||||
"select.exit": "Quitter la sélection",
|
||||
"select.all": "Tout sélectionner",
|
||||
"select.none": "Tout désélectionner",
|
||||
"select.toggle": "Sélectionner « {title} »",
|
||||
"select.actions": "Actions sur la sélection",
|
||||
"select.status": "Statut",
|
||||
"select.list": "Liste",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Aucune liste pour l’instant : créez-en une ci-dessous.",
|
||||
"select.inList": "Déjà dedans : {n}/{total}",
|
||||
"select.addTo": "Ajouter à « {list} »",
|
||||
"select.removeFrom": "Retirer de « {list} »",
|
||||
"select.removeTag": "Retirer un tag",
|
||||
"toast.undo": "Annuler",
|
||||
"toast.undone": "Action annulée",
|
||||
"toast.undoFailed": "Impossible d’annuler",
|
||||
"toast.deleted": "« {title} » supprimé",
|
||||
"toast.status": "« {title} » → {status}",
|
||||
"toast.removedFromList": "« {title} » retiré de « {list} »",
|
||||
"select.count_zero": "Aucun titre sélectionné",
|
||||
"select.count_one": "{count} sélectionné",
|
||||
"select.count_other": "{count} sélectionnés",
|
||||
"select.statusTitle_one": "Statut de {count} titre",
|
||||
"select.statusTitle_other": "Statut de {count} titres",
|
||||
"select.listTitle_one": "Listes · {count} titre",
|
||||
"select.listTitle_other": "Listes · {count} titres",
|
||||
"select.tagTitle_one": "Tag · {count} titre",
|
||||
"select.tagTitle_other": "Tag · {count} titres",
|
||||
"select.deleteConfirm_one": "Supprimer {count} titre de votre bibliothèque ?",
|
||||
"select.deleteConfirm_other": "Supprimer {count} titres de votre bibliothèque ?",
|
||||
"toast.deletedMany_one": "{count} titre supprimé",
|
||||
"toast.deletedMany_other": "{count} titres supprimés",
|
||||
"toast.statusMany_one": "{count} titre → {status}",
|
||||
"toast.statusMany_other": "{count} titres → {status}",
|
||||
"toast.addedToList_one": "{count} titre ajouté à « {list} »",
|
||||
"toast.addedToList_other": "{count} titres ajoutés à « {list} »",
|
||||
"toast.removedFromListMany_one": "{count} titre retiré de « {list} »",
|
||||
"toast.removedFromListMany_other": "{count} titres retirés de « {list} »",
|
||||
"toast.tagged_one": "#{tag} ajouté à {count} titre",
|
||||
"toast.tagged_other": "#{tag} ajouté à {count} titres",
|
||||
"toast.untagged_one": "#{tag} retiré de {count} titre",
|
||||
"toast.untagged_other": "#{tag} retiré de {count} titres",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} बदलाव बाकी",
|
||||
'sync.pending_other': "{count} बदलाव बाकी",
|
||||
'sync.now': "अभी सिंक करें",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "निजी टैग",
|
||||
"tags.placeholder": "comfort, हैलोवीन, लेआ के साथ फिर देखें…",
|
||||
"tags.private": "सिर्फ़ आपको दिखते हैं, प्रोफ़ाइल पर कभी नहीं।",
|
||||
"tags.filter": "निजी टैग",
|
||||
"select.start": "चुनें",
|
||||
"select.exit": "चयन बंद करें",
|
||||
"select.all": "सभी चुनें",
|
||||
"select.none": "सभी का चयन हटाएँ",
|
||||
"select.toggle": "“{title}” चुनें",
|
||||
"select.actions": "चयन पर कार्रवाई",
|
||||
"select.status": "स्थिति",
|
||||
"select.list": "सूची",
|
||||
"select.tag": "टैग",
|
||||
"select.noLists": "अभी कोई सूची नहीं — नीचे एक बनाएँ।",
|
||||
"select.inList": "पहले से शामिल: {n}/{total}",
|
||||
"select.addTo": "“{list}” में जोड़ें",
|
||||
"select.removeFrom": "“{list}” से हटाएँ",
|
||||
"select.removeTag": "टैग हटाएँ",
|
||||
"toast.undo": "पूर्ववत करें",
|
||||
"toast.undone": "पूर्ववत किया गया",
|
||||
"toast.undoFailed": "पूर्ववत नहीं हो सका",
|
||||
"toast.deleted": "“{title}” हटाया गया",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "“{title}” को “{list}” से हटाया गया",
|
||||
"select.count_zero": "कोई टाइटल नहीं चुना गया",
|
||||
"select.count_one": "{count} चुना गया",
|
||||
"select.count_other": "{count} चुने गए",
|
||||
"select.statusTitle_one": "{count} टाइटल की स्थिति",
|
||||
"select.statusTitle_other": "{count} टाइटल की स्थिति",
|
||||
"select.listTitle_one": "सूचियाँ · {count} टाइटल",
|
||||
"select.listTitle_other": "सूचियाँ · {count} टाइटल",
|
||||
"select.tagTitle_one": "टैग · {count} टाइटल",
|
||||
"select.tagTitle_other": "टैग · {count} टाइटल",
|
||||
"select.deleteConfirm_one": "अपनी लाइब्रेरी से {count} टाइटल हटाएँ?",
|
||||
"select.deleteConfirm_other": "अपनी लाइब्रेरी से {count} टाइटल हटाएँ?",
|
||||
"toast.deletedMany_one": "{count} टाइटल हटाया गया",
|
||||
"toast.deletedMany_other": "{count} टाइटल हटाए गए",
|
||||
"toast.statusMany_one": "{count} टाइटल → {status}",
|
||||
"toast.statusMany_other": "{count} टाइटल → {status}",
|
||||
"toast.addedToList_one": "{count} टाइटल “{list}” में जोड़ा गया",
|
||||
"toast.addedToList_other": "{count} टाइटल “{list}” में जोड़े गए",
|
||||
"toast.removedFromListMany_one": "{count} टाइटल “{list}” से हटाया गया",
|
||||
"toast.removedFromListMany_other": "{count} टाइटल “{list}” से हटाए गए",
|
||||
"toast.tagged_one": "#{tag} {count} टाइटल में जोड़ा गया",
|
||||
"toast.tagged_other": "#{tag} {count} टाइटल में जोड़ा गया",
|
||||
"toast.untagged_one": "#{tag} {count} टाइटल से हटाया गया",
|
||||
"toast.untagged_other": "#{tag} {count} टाइटल से हटाया गया",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} perubahan menunggu",
|
||||
'sync.pending_other': "{count} perubahan menunggu",
|
||||
'sync.now': "Sinkronkan",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Tag pribadi",
|
||||
"tags.placeholder": "comfort, halloween, tonton ulang bareng Lea…",
|
||||
"tags.private": "Hanya terlihat olehmu, tidak pernah di profil.",
|
||||
"tags.filter": "Tag pribadi",
|
||||
"select.start": "Pilih",
|
||||
"select.exit": "Keluar dari pilihan",
|
||||
"select.all": "Pilih semua",
|
||||
"select.none": "Batalkan semua pilihan",
|
||||
"select.toggle": "Pilih “{title}”",
|
||||
"select.actions": "Tindakan untuk pilihan",
|
||||
"select.status": "Status",
|
||||
"select.list": "Daftar",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Belum ada daftar — buat di bawah.",
|
||||
"select.inList": "Sudah ada: {n}/{total}",
|
||||
"select.addTo": "Tambahkan ke “{list}”",
|
||||
"select.removeFrom": "Hapus dari “{list}”",
|
||||
"select.removeTag": "Hapus tag",
|
||||
"toast.undo": "Urungkan",
|
||||
"toast.undone": "Diurungkan",
|
||||
"toast.undoFailed": "Gagal mengurungkan",
|
||||
"toast.deleted": "“{title}” dihapus",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "“{title}” dihapus dari “{list}”",
|
||||
"select.count_zero": "Belum ada judul dipilih",
|
||||
"select.count_one": "{count} dipilih",
|
||||
"select.count_other": "{count} dipilih",
|
||||
"select.statusTitle_one": "Status {count} judul",
|
||||
"select.statusTitle_other": "Status {count} judul",
|
||||
"select.listTitle_one": "Daftar · {count} judul",
|
||||
"select.listTitle_other": "Daftar · {count} judul",
|
||||
"select.tagTitle_one": "Tag · {count} judul",
|
||||
"select.tagTitle_other": "Tag · {count} judul",
|
||||
"select.deleteConfirm_one": "Hapus {count} judul dari koleksimu?",
|
||||
"select.deleteConfirm_other": "Hapus {count} judul dari koleksimu?",
|
||||
"toast.deletedMany_one": "{count} judul dihapus",
|
||||
"toast.deletedMany_other": "{count} judul dihapus",
|
||||
"toast.statusMany_one": "{count} judul → {status}",
|
||||
"toast.statusMany_other": "{count} judul → {status}",
|
||||
"toast.addedToList_one": "{count} judul ditambahkan ke “{list}”",
|
||||
"toast.addedToList_other": "{count} judul ditambahkan ke “{list}”",
|
||||
"toast.removedFromListMany_one": "{count} judul dihapus dari “{list}”",
|
||||
"toast.removedFromListMany_other": "{count} judul dihapus dari “{list}”",
|
||||
"toast.tagged_one": "#{tag} ditambahkan ke {count} judul",
|
||||
"toast.tagged_other": "#{tag} ditambahkan ke {count} judul",
|
||||
"toast.untagged_one": "#{tag} dihapus dari {count} judul",
|
||||
"toast.untagged_other": "#{tag} dihapus dari {count} judul",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} modifica in attesa",
|
||||
'sync.pending_other': "{count} modifiche in attesa",
|
||||
'sync.now': "Sincronizza",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Tag personali",
|
||||
"tags.placeholder": "comfort, halloween, da rivedere con Lea…",
|
||||
"tags.private": "Visibili solo a te, mai sul tuo profilo.",
|
||||
"tags.filter": "Tag personali",
|
||||
"select.start": "Seleziona",
|
||||
"select.exit": "Esci dalla selezione",
|
||||
"select.all": "Seleziona tutto",
|
||||
"select.none": "Deseleziona tutto",
|
||||
"select.toggle": "Seleziona «{title}»",
|
||||
"select.actions": "Azioni sulla selezione",
|
||||
"select.status": "Stato",
|
||||
"select.list": "Lista",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Ancora nessuna lista: creane una qui sotto.",
|
||||
"select.inList": "Già presenti: {n}/{total}",
|
||||
"select.addTo": "Aggiungi a «{list}»",
|
||||
"select.removeFrom": "Rimuovi da «{list}»",
|
||||
"select.removeTag": "Rimuovi un tag",
|
||||
"toast.undo": "Annulla",
|
||||
"toast.undone": "Annullato",
|
||||
"toast.undoFailed": "Impossibile annullare",
|
||||
"toast.deleted": "«{title}» eliminato",
|
||||
"toast.status": "«{title}» → {status}",
|
||||
"toast.removedFromList": "«{title}» rimosso da «{list}»",
|
||||
"select.count_zero": "Nessun titolo selezionato",
|
||||
"select.count_one": "{count} selezionato",
|
||||
"select.count_other": "{count} selezionati",
|
||||
"select.statusTitle_one": "Stato di {count} titolo",
|
||||
"select.statusTitle_other": "Stato di {count} titoli",
|
||||
"select.listTitle_one": "Liste · {count} titolo",
|
||||
"select.listTitle_other": "Liste · {count} titoli",
|
||||
"select.tagTitle_one": "Tag · {count} titolo",
|
||||
"select.tagTitle_other": "Tag · {count} titoli",
|
||||
"select.deleteConfirm_one": "Eliminare {count} titolo dalla tua libreria?",
|
||||
"select.deleteConfirm_other": "Eliminare {count} titoli dalla tua libreria?",
|
||||
"toast.deletedMany_one": "{count} titolo eliminato",
|
||||
"toast.deletedMany_other": "{count} titoli eliminati",
|
||||
"toast.statusMany_one": "{count} titolo → {status}",
|
||||
"toast.statusMany_other": "{count} titoli → {status}",
|
||||
"toast.addedToList_one": "{count} titolo aggiunto a «{list}»",
|
||||
"toast.addedToList_other": "{count} titoli aggiunti a «{list}»",
|
||||
"toast.removedFromListMany_one": "{count} titolo rimosso da «{list}»",
|
||||
"toast.removedFromListMany_other": "{count} titoli rimossi da «{list}»",
|
||||
"toast.tagged_one": "#{tag} aggiunto a {count} titolo",
|
||||
"toast.tagged_other": "#{tag} aggiunto a {count} titoli",
|
||||
"toast.untagged_one": "#{tag} rimosso da {count} titolo",
|
||||
"toast.untagged_other": "#{tag} rimosso da {count} titoli",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} 件の変更が保留中",
|
||||
'sync.pending_other': "{count} 件の変更が保留中",
|
||||
'sync.now': "今すぐ同期",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "マイタグ",
|
||||
"tags.placeholder": "comfort、ハロウィン、Leaと再視聴…",
|
||||
"tags.private": "自分だけに表示され、プロフィールには出ません。",
|
||||
"tags.filter": "マイタグ",
|
||||
"select.start": "選択",
|
||||
"select.exit": "選択を終了",
|
||||
"select.all": "すべて選択",
|
||||
"select.none": "すべて選択解除",
|
||||
"select.toggle": "「{title}」を選択",
|
||||
"select.actions": "選択した作品の操作",
|
||||
"select.status": "ステータス",
|
||||
"select.list": "リスト",
|
||||
"select.tag": "タグ",
|
||||
"select.noLists": "リストはまだありません。下で作成できます。",
|
||||
"select.inList": "追加済み:{n}/{total}",
|
||||
"select.addTo": "「{list}」に追加",
|
||||
"select.removeFrom": "「{list}」から外す",
|
||||
"select.removeTag": "タグを外す",
|
||||
"toast.undo": "元に戻す",
|
||||
"toast.undone": "元に戻しました",
|
||||
"toast.undoFailed": "元に戻せませんでした",
|
||||
"toast.deleted": "「{title}」を削除しました",
|
||||
"toast.status": "「{title}」→ {status}",
|
||||
"toast.removedFromList": "「{title}」を「{list}」から外しました",
|
||||
"select.count_zero": "未選択",
|
||||
"select.count_one": "{count}件を選択中",
|
||||
"select.count_other": "{count}件を選択中",
|
||||
"select.statusTitle_one": "{count}作品のステータス",
|
||||
"select.statusTitle_other": "{count}作品のステータス",
|
||||
"select.listTitle_one": "リスト · {count}作品",
|
||||
"select.listTitle_other": "リスト · {count}作品",
|
||||
"select.tagTitle_one": "タグ · {count}作品",
|
||||
"select.tagTitle_other": "タグ · {count}作品",
|
||||
"select.deleteConfirm_one": "{count}作品をライブラリから削除しますか?",
|
||||
"select.deleteConfirm_other": "{count}作品をライブラリから削除しますか?",
|
||||
"toast.deletedMany_one": "{count}作品を削除しました",
|
||||
"toast.deletedMany_other": "{count}作品を削除しました",
|
||||
"toast.statusMany_one": "{count}作品 → {status}",
|
||||
"toast.statusMany_other": "{count}作品 → {status}",
|
||||
"toast.addedToList_one": "{count}作品を「{list}」に追加しました",
|
||||
"toast.addedToList_other": "{count}作品を「{list}」に追加しました",
|
||||
"toast.removedFromListMany_one": "{count}作品を「{list}」から外しました",
|
||||
"toast.removedFromListMany_other": "{count}作品を「{list}」から外しました",
|
||||
"toast.tagged_one": "{count}作品に #{tag} を追加しました",
|
||||
"toast.tagged_other": "{count}作品に #{tag} を追加しました",
|
||||
"toast.untagged_one": "{count}作品から #{tag} を外しました",
|
||||
"toast.untagged_other": "{count}作品から #{tag} を外しました",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "변경 {count}개 대기 중",
|
||||
'sync.pending_other': "변경 {count}개 대기 중",
|
||||
'sync.now': "지금 동기화",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "개인 태그",
|
||||
"tags.placeholder": "comfort, 핼러윈, 레아랑 다시 보기…",
|
||||
"tags.private": "나만 볼 수 있으며 프로필에는 표시되지 않아요.",
|
||||
"tags.filter": "개인 태그",
|
||||
"select.start": "선택",
|
||||
"select.exit": "선택 종료",
|
||||
"select.all": "모두 선택",
|
||||
"select.none": "모두 선택 해제",
|
||||
"select.toggle": "“{title}” 선택",
|
||||
"select.actions": "선택 항목 작업",
|
||||
"select.status": "상태",
|
||||
"select.list": "리스트",
|
||||
"select.tag": "태그",
|
||||
"select.noLists": "아직 리스트가 없어요. 아래에서 만들어 보세요.",
|
||||
"select.inList": "이미 포함: {n}/{total}",
|
||||
"select.addTo": "“{list}”에 추가",
|
||||
"select.removeFrom": "“{list}”에서 제거",
|
||||
"select.removeTag": "태그 제거",
|
||||
"toast.undo": "실행 취소",
|
||||
"toast.undone": "실행 취소됨",
|
||||
"toast.undoFailed": "실행 취소할 수 없어요",
|
||||
"toast.deleted": "“{title}” 삭제됨",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "“{title}”을(를) “{list}”에서 제거했어요",
|
||||
"select.count_zero": "선택한 작품 없음",
|
||||
"select.count_one": "{count}개 선택됨",
|
||||
"select.count_other": "{count}개 선택됨",
|
||||
"select.statusTitle_one": "작품 {count}개의 상태",
|
||||
"select.statusTitle_other": "작품 {count}개의 상태",
|
||||
"select.listTitle_one": "리스트 · 작품 {count}개",
|
||||
"select.listTitle_other": "리스트 · 작품 {count}개",
|
||||
"select.tagTitle_one": "태그 · 작품 {count}개",
|
||||
"select.tagTitle_other": "태그 · 작품 {count}개",
|
||||
"select.deleteConfirm_one": "라이브러리에서 작품 {count}개를 삭제할까요?",
|
||||
"select.deleteConfirm_other": "라이브러리에서 작품 {count}개를 삭제할까요?",
|
||||
"toast.deletedMany_one": "작품 {count}개 삭제됨",
|
||||
"toast.deletedMany_other": "작품 {count}개 삭제됨",
|
||||
"toast.statusMany_one": "작품 {count}개 → {status}",
|
||||
"toast.statusMany_other": "작품 {count}개 → {status}",
|
||||
"toast.addedToList_one": "작품 {count}개를 “{list}”에 추가했어요",
|
||||
"toast.addedToList_other": "작품 {count}개를 “{list}”에 추가했어요",
|
||||
"toast.removedFromListMany_one": "작품 {count}개를 “{list}”에서 제거했어요",
|
||||
"toast.removedFromListMany_other": "작품 {count}개를 “{list}”에서 제거했어요",
|
||||
"toast.tagged_one": "작품 {count}개에 #{tag} 추가",
|
||||
"toast.tagged_other": "작품 {count}개에 #{tag} 추가",
|
||||
"toast.untagged_one": "작품 {count}개에서 #{tag} 제거",
|
||||
"toast.untagged_other": "작품 {count}개에서 #{tag} 제거",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} wijziging in wachtrij",
|
||||
'sync.pending_other': "{count} wijzigingen in wachtrij",
|
||||
'sync.now': "Nu synchroniseren",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Eigen tags",
|
||||
"tags.placeholder": "comfort, halloween, opnieuw kijken met Lea…",
|
||||
"tags.private": "Alleen voor jou zichtbaar, nooit op je profiel.",
|
||||
"tags.filter": "Eigen tags",
|
||||
"select.start": "Selecteren",
|
||||
"select.exit": "Selectie sluiten",
|
||||
"select.all": "Alles selecteren",
|
||||
"select.none": "Alles deselecteren",
|
||||
"select.toggle": "‘{title}’ selecteren",
|
||||
"select.actions": "Acties voor de selectie",
|
||||
"select.status": "Status",
|
||||
"select.list": "Lijst",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Nog geen lijsten — maak er hieronder een.",
|
||||
"select.inList": "Er al in: {n}/{total}",
|
||||
"select.addTo": "Toevoegen aan ‘{list}’",
|
||||
"select.removeFrom": "Verwijderen uit ‘{list}’",
|
||||
"select.removeTag": "Tag verwijderen",
|
||||
"toast.undo": "Ongedaan maken",
|
||||
"toast.undone": "Ongedaan gemaakt",
|
||||
"toast.undoFailed": "Ongedaan maken mislukt",
|
||||
"toast.deleted": "‘{title}’ verwijderd",
|
||||
"toast.status": "‘{title}’ → {status}",
|
||||
"toast.removedFromList": "‘{title}’ verwijderd uit ‘{list}’",
|
||||
"select.count_zero": "Geen titels geselecteerd",
|
||||
"select.count_one": "{count} geselecteerd",
|
||||
"select.count_other": "{count} geselecteerd",
|
||||
"select.statusTitle_one": "Status van {count} titel",
|
||||
"select.statusTitle_other": "Status van {count} titels",
|
||||
"select.listTitle_one": "Lijsten · {count} titel",
|
||||
"select.listTitle_other": "Lijsten · {count} titels",
|
||||
"select.tagTitle_one": "Tag · {count} titel",
|
||||
"select.tagTitle_other": "Tag · {count} titels",
|
||||
"select.deleteConfirm_one": "{count} titel uit je bibliotheek verwijderen?",
|
||||
"select.deleteConfirm_other": "{count} titels uit je bibliotheek verwijderen?",
|
||||
"toast.deletedMany_one": "{count} titel verwijderd",
|
||||
"toast.deletedMany_other": "{count} titels verwijderd",
|
||||
"toast.statusMany_one": "{count} titel → {status}",
|
||||
"toast.statusMany_other": "{count} titels → {status}",
|
||||
"toast.addedToList_one": "{count} titel toegevoegd aan ‘{list}’",
|
||||
"toast.addedToList_other": "{count} titels toegevoegd aan ‘{list}’",
|
||||
"toast.removedFromListMany_one": "{count} titel verwijderd uit ‘{list}’",
|
||||
"toast.removedFromListMany_other": "{count} titels verwijderd uit ‘{list}’",
|
||||
"toast.tagged_one": "#{tag} toegevoegd aan {count} titel",
|
||||
"toast.tagged_other": "#{tag} toegevoegd aan {count} titels",
|
||||
"toast.untagged_one": "#{tag} verwijderd van {count} titel",
|
||||
"toast.untagged_other": "#{tag} verwijderd van {count} titels",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -989,6 +989,76 @@ const dict: Translations = {
|
||||
'sync.now': "Synchronizuj",
|
||||
'sync.pending_few': "{count} zmiany oczekują",
|
||||
'sync.pending_many': "{count} zmian oczekuje",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Własne tagi",
|
||||
"tags.placeholder": "comfort, halloween, obejrzeć znów z Leą…",
|
||||
"tags.private": "Widoczne tylko dla ciebie, nigdy na profilu.",
|
||||
"tags.filter": "Własne tagi",
|
||||
"select.start": "Zaznacz",
|
||||
"select.exit": "Zakończ zaznaczanie",
|
||||
"select.all": "Zaznacz wszystko",
|
||||
"select.none": "Odznacz wszystko",
|
||||
"select.toggle": "Zaznacz „{title}”",
|
||||
"select.actions": "Działania na zaznaczonych",
|
||||
"select.status": "Status",
|
||||
"select.list": "Lista",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Brak list — utwórz ją poniżej.",
|
||||
"select.inList": "Już na liście: {n}/{total}",
|
||||
"select.addTo": "Dodaj do „{list}”",
|
||||
"select.removeFrom": "Usuń z „{list}”",
|
||||
"select.removeTag": "Usuń tag",
|
||||
"toast.undo": "Cofnij",
|
||||
"toast.undone": "Cofnięto",
|
||||
"toast.undoFailed": "Nie udało się cofnąć",
|
||||
"toast.deleted": "Usunięto „{title}”",
|
||||
"toast.status": "„{title}” → {status}",
|
||||
"toast.removedFromList": "Usunięto „{title}” z „{list}”",
|
||||
"select.count_zero": "Nic nie zaznaczono",
|
||||
"select.count_one": "Zaznaczono: {count}",
|
||||
"select.count_few": "Zaznaczono: {count}",
|
||||
"select.count_many": "Zaznaczono: {count}",
|
||||
"select.count_other": "Zaznaczono: {count}",
|
||||
"select.statusTitle_one": "Status: {count} tytuł",
|
||||
"select.statusTitle_few": "Status: {count} tytuły",
|
||||
"select.statusTitle_many": "Status: {count} tytułów",
|
||||
"select.statusTitle_other": "Status: {count} tytułu",
|
||||
"select.listTitle_one": "Listy · {count} tytuł",
|
||||
"select.listTitle_few": "Listy · {count} tytuły",
|
||||
"select.listTitle_many": "Listy · {count} tytułów",
|
||||
"select.listTitle_other": "Listy · {count} tytułu",
|
||||
"select.tagTitle_one": "Tag · {count} tytuł",
|
||||
"select.tagTitle_few": "Tag · {count} tytuły",
|
||||
"select.tagTitle_many": "Tag · {count} tytułów",
|
||||
"select.tagTitle_other": "Tag · {count} tytułu",
|
||||
"select.deleteConfirm_one": "Usunąć z biblioteki: {count} tytuł?",
|
||||
"select.deleteConfirm_few": "Usunąć z biblioteki: {count} tytuły?",
|
||||
"select.deleteConfirm_many": "Usunąć z biblioteki: {count} tytułów?",
|
||||
"select.deleteConfirm_other": "Usunąć z biblioteki: {count} tytułu?",
|
||||
"toast.deletedMany_one": "Usunięto: {count} tytuł",
|
||||
"toast.deletedMany_few": "Usunięto: {count} tytuły",
|
||||
"toast.deletedMany_many": "Usunięto: {count} tytułów",
|
||||
"toast.deletedMany_other": "Usunięto: {count} tytułu",
|
||||
"toast.statusMany_one": "{count} tytuł → {status}",
|
||||
"toast.statusMany_few": "{count} tytuły → {status}",
|
||||
"toast.statusMany_many": "{count} tytułów → {status}",
|
||||
"toast.statusMany_other": "{count} tytułu → {status}",
|
||||
"toast.addedToList_one": "Dodano do „{list}”: {count} tytuł",
|
||||
"toast.addedToList_few": "Dodano do „{list}”: {count} tytuły",
|
||||
"toast.addedToList_many": "Dodano do „{list}”: {count} tytułów",
|
||||
"toast.addedToList_other": "Dodano do „{list}”: {count} tytułu",
|
||||
"toast.removedFromListMany_one": "Usunięto z „{list}”: {count} tytuł",
|
||||
"toast.removedFromListMany_few": "Usunięto z „{list}”: {count} tytuły",
|
||||
"toast.removedFromListMany_many": "Usunięto z „{list}”: {count} tytułów",
|
||||
"toast.removedFromListMany_other": "Usunięto z „{list}”: {count} tytułu",
|
||||
"toast.tagged_one": "Dodano #{tag}: {count} tytuł",
|
||||
"toast.tagged_few": "Dodano #{tag}: {count} tytuły",
|
||||
"toast.tagged_many": "Dodano #{tag}: {count} tytułów",
|
||||
"toast.tagged_other": "Dodano #{tag}: {count} tytułu",
|
||||
"toast.untagged_one": "Usunięto #{tag}: {count} tytuł",
|
||||
"toast.untagged_few": "Usunięto #{tag}: {count} tytuły",
|
||||
"toast.untagged_many": "Usunięto #{tag}: {count} tytułów",
|
||||
"toast.untagged_other": "Usunięto #{tag}: {count} tytułu",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} alteração pendente",
|
||||
'sync.pending_other': "{count} alterações pendentes",
|
||||
'sync.now': "Sincronizar",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Tags pessoais",
|
||||
"tags.placeholder": "comfort, halloween, rever com a Lea…",
|
||||
"tags.private": "Só você as vê, nunca no seu perfil.",
|
||||
"tags.filter": "Tags pessoais",
|
||||
"select.start": "Selecionar",
|
||||
"select.exit": "Sair da seleção",
|
||||
"select.all": "Selecionar tudo",
|
||||
"select.none": "Desmarcar tudo",
|
||||
"select.toggle": "Selecionar “{title}”",
|
||||
"select.actions": "Ações da seleção",
|
||||
"select.status": "Status",
|
||||
"select.list": "Lista",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Nenhuma lista ainda — crie uma abaixo.",
|
||||
"select.inList": "Já incluídos: {n}/{total}",
|
||||
"select.addTo": "Adicionar a “{list}”",
|
||||
"select.removeFrom": "Remover de “{list}”",
|
||||
"select.removeTag": "Remover uma tag",
|
||||
"toast.undo": "Desfazer",
|
||||
"toast.undone": "Desfeito",
|
||||
"toast.undoFailed": "Não foi possível desfazer",
|
||||
"toast.deleted": "“{title}” excluído",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "“{title}” removido de “{list}”",
|
||||
"select.count_zero": "Nenhum título selecionado",
|
||||
"select.count_one": "{count} selecionado",
|
||||
"select.count_other": "{count} selecionados",
|
||||
"select.statusTitle_one": "Status de {count} título",
|
||||
"select.statusTitle_other": "Status de {count} títulos",
|
||||
"select.listTitle_one": "Listas · {count} título",
|
||||
"select.listTitle_other": "Listas · {count} títulos",
|
||||
"select.tagTitle_one": "Tag · {count} título",
|
||||
"select.tagTitle_other": "Tag · {count} títulos",
|
||||
"select.deleteConfirm_one": "Excluir {count} título da sua biblioteca?",
|
||||
"select.deleteConfirm_other": "Excluir {count} títulos da sua biblioteca?",
|
||||
"toast.deletedMany_one": "{count} título excluído",
|
||||
"toast.deletedMany_other": "{count} títulos excluídos",
|
||||
"toast.statusMany_one": "{count} título → {status}",
|
||||
"toast.statusMany_other": "{count} títulos → {status}",
|
||||
"toast.addedToList_one": "{count} título adicionado a “{list}”",
|
||||
"toast.addedToList_other": "{count} títulos adicionados a “{list}”",
|
||||
"toast.removedFromListMany_one": "{count} título removido de “{list}”",
|
||||
"toast.removedFromListMany_other": "{count} títulos removidos de “{list}”",
|
||||
"toast.tagged_one": "#{tag} adicionada a {count} título",
|
||||
"toast.tagged_other": "#{tag} adicionada a {count} títulos",
|
||||
"toast.untagged_one": "#{tag} removida de {count} título",
|
||||
"toast.untagged_other": "#{tag} removida de {count} títulos",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -989,6 +989,76 @@ const dict: Translations = {
|
||||
'sync.now': "Синхронизировать",
|
||||
'sync.pending_few': "{count} изменения ожидают",
|
||||
'sync.pending_many': "{count} изменений ожидают",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Личные теги",
|
||||
"tags.placeholder": "comfort, хэллоуин, пересмотреть с Леей…",
|
||||
"tags.private": "Видны только вам, никогда в профиле.",
|
||||
"tags.filter": "Личные теги",
|
||||
"select.start": "Выбрать",
|
||||
"select.exit": "Выйти из выбора",
|
||||
"select.all": "Выбрать все",
|
||||
"select.none": "Снять выбор",
|
||||
"select.toggle": "Выбрать «{title}»",
|
||||
"select.actions": "Действия с выбранным",
|
||||
"select.status": "Статус",
|
||||
"select.list": "Список",
|
||||
"select.tag": "Тег",
|
||||
"select.noLists": "Списков пока нет — создайте ниже.",
|
||||
"select.inList": "Уже в списке: {n}/{total}",
|
||||
"select.addTo": "Добавить в «{list}»",
|
||||
"select.removeFrom": "Убрать из «{list}»",
|
||||
"select.removeTag": "Убрать тег",
|
||||
"toast.undo": "Отменить",
|
||||
"toast.undone": "Отменено",
|
||||
"toast.undoFailed": "Не удалось отменить",
|
||||
"toast.deleted": "«{title}» удалён",
|
||||
"toast.status": "«{title}» → {status}",
|
||||
"toast.removedFromList": "«{title}» убран из «{list}»",
|
||||
"select.count_zero": "Ничего не выбрано",
|
||||
"select.count_one": "Выбран {count}",
|
||||
"select.count_few": "Выбрано {count}",
|
||||
"select.count_many": "Выбрано {count}",
|
||||
"select.count_other": "Выбрано {count}",
|
||||
"select.statusTitle_one": "Статус: {count} тайтл",
|
||||
"select.statusTitle_few": "Статус: {count} тайтла",
|
||||
"select.statusTitle_many": "Статус: {count} тайтлов",
|
||||
"select.statusTitle_other": "Статус: {count} тайтла",
|
||||
"select.listTitle_one": "Списки · {count} тайтл",
|
||||
"select.listTitle_few": "Списки · {count} тайтла",
|
||||
"select.listTitle_many": "Списки · {count} тайтлов",
|
||||
"select.listTitle_other": "Списки · {count} тайтла",
|
||||
"select.tagTitle_one": "Тег · {count} тайтл",
|
||||
"select.tagTitle_few": "Тег · {count} тайтла",
|
||||
"select.tagTitle_many": "Тег · {count} тайтлов",
|
||||
"select.tagTitle_other": "Тег · {count} тайтла",
|
||||
"select.deleteConfirm_one": "Удалить из библиотеки {count} тайтл?",
|
||||
"select.deleteConfirm_few": "Удалить из библиотеки {count} тайтла?",
|
||||
"select.deleteConfirm_many": "Удалить из библиотеки {count} тайтлов?",
|
||||
"select.deleteConfirm_other": "Удалить из библиотеки {count} тайтла?",
|
||||
"toast.deletedMany_one": "Удалено: {count} тайтл",
|
||||
"toast.deletedMany_few": "Удалено: {count} тайтла",
|
||||
"toast.deletedMany_many": "Удалено: {count} тайтлов",
|
||||
"toast.deletedMany_other": "Удалено: {count} тайтла",
|
||||
"toast.statusMany_one": "{count} тайтл → {status}",
|
||||
"toast.statusMany_few": "{count} тайтла → {status}",
|
||||
"toast.statusMany_many": "{count} тайтлов → {status}",
|
||||
"toast.statusMany_other": "{count} тайтла → {status}",
|
||||
"toast.addedToList_one": "Добавлено в «{list}»: {count} тайтл",
|
||||
"toast.addedToList_few": "Добавлено в «{list}»: {count} тайтла",
|
||||
"toast.addedToList_many": "Добавлено в «{list}»: {count} тайтлов",
|
||||
"toast.addedToList_other": "Добавлено в «{list}»: {count} тайтла",
|
||||
"toast.removedFromListMany_one": "Убрано из «{list}»: {count} тайтл",
|
||||
"toast.removedFromListMany_few": "Убрано из «{list}»: {count} тайтла",
|
||||
"toast.removedFromListMany_many": "Убрано из «{list}»: {count} тайтлов",
|
||||
"toast.removedFromListMany_other": "Убрано из «{list}»: {count} тайтла",
|
||||
"toast.tagged_one": "#{tag} добавлен: {count} тайтл",
|
||||
"toast.tagged_few": "#{tag} добавлен: {count} тайтла",
|
||||
"toast.tagged_many": "#{tag} добавлен: {count} тайтлов",
|
||||
"toast.tagged_other": "#{tag} добавлен: {count} тайтла",
|
||||
"toast.untagged_one": "#{tag} убран: {count} тайтл",
|
||||
"toast.untagged_few": "#{tag} убран: {count} тайтла",
|
||||
"toast.untagged_many": "#{tag} убран: {count} тайтлов",
|
||||
"toast.untagged_other": "#{tag} убран: {count} тайтла",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "รอซิงค์ {count} รายการ",
|
||||
'sync.pending_other': "รอซิงค์ {count} รายการ",
|
||||
'sync.now': "ซิงค์ตอนนี้",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "แท็กส่วนตัว",
|
||||
"tags.placeholder": "comfort, ฮาโลวีน, ดูซ้ำกับลีอา…",
|
||||
"tags.private": "เห็นได้เฉพาะคุณ ไม่แสดงในโปรไฟล์",
|
||||
"tags.filter": "แท็กส่วนตัว",
|
||||
"select.start": "เลือก",
|
||||
"select.exit": "ออกจากการเลือก",
|
||||
"select.all": "เลือกทั้งหมด",
|
||||
"select.none": "ยกเลิกการเลือกทั้งหมด",
|
||||
"select.toggle": "เลือก “{title}”",
|
||||
"select.actions": "การทำงานกับรายการที่เลือก",
|
||||
"select.status": "สถานะ",
|
||||
"select.list": "ลิสต์",
|
||||
"select.tag": "แท็ก",
|
||||
"select.noLists": "ยังไม่มีลิสต์ — สร้างได้ด้านล่าง",
|
||||
"select.inList": "อยู่แล้ว: {n}/{total}",
|
||||
"select.addTo": "เพิ่มไปยัง “{list}”",
|
||||
"select.removeFrom": "นำออกจาก “{list}”",
|
||||
"select.removeTag": "ลบแท็ก",
|
||||
"toast.undo": "เลิกทำ",
|
||||
"toast.undone": "เลิกทำแล้ว",
|
||||
"toast.undoFailed": "เลิกทำไม่สำเร็จ",
|
||||
"toast.deleted": "ลบ “{title}” แล้ว",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "นำ “{title}” ออกจาก “{list}” แล้ว",
|
||||
"select.count_zero": "ยังไม่ได้เลือก",
|
||||
"select.count_one": "เลือกแล้ว {count} เรื่อง",
|
||||
"select.count_other": "เลือกแล้ว {count} เรื่อง",
|
||||
"select.statusTitle_one": "สถานะของ {count} เรื่อง",
|
||||
"select.statusTitle_other": "สถานะของ {count} เรื่อง",
|
||||
"select.listTitle_one": "ลิสต์ · {count} เรื่อง",
|
||||
"select.listTitle_other": "ลิสต์ · {count} เรื่อง",
|
||||
"select.tagTitle_one": "แท็ก · {count} เรื่อง",
|
||||
"select.tagTitle_other": "แท็ก · {count} เรื่อง",
|
||||
"select.deleteConfirm_one": "ลบ {count} เรื่องออกจากคลังของคุณ?",
|
||||
"select.deleteConfirm_other": "ลบ {count} เรื่องออกจากคลังของคุณ?",
|
||||
"toast.deletedMany_one": "ลบ {count} เรื่องแล้ว",
|
||||
"toast.deletedMany_other": "ลบ {count} เรื่องแล้ว",
|
||||
"toast.statusMany_one": "{count} เรื่อง → {status}",
|
||||
"toast.statusMany_other": "{count} เรื่อง → {status}",
|
||||
"toast.addedToList_one": "เพิ่ม {count} เรื่องไปยัง “{list}” แล้ว",
|
||||
"toast.addedToList_other": "เพิ่ม {count} เรื่องไปยัง “{list}” แล้ว",
|
||||
"toast.removedFromListMany_one": "นำ {count} เรื่องออกจาก “{list}” แล้ว",
|
||||
"toast.removedFromListMany_other": "นำ {count} เรื่องออกจาก “{list}” แล้ว",
|
||||
"toast.tagged_one": "เพิ่ม #{tag} ให้ {count} เรื่องแล้ว",
|
||||
"toast.tagged_other": "เพิ่ม #{tag} ให้ {count} เรื่องแล้ว",
|
||||
"toast.untagged_one": "ลบ #{tag} จาก {count} เรื่องแล้ว",
|
||||
"toast.untagged_other": "ลบ #{tag} จาก {count} เรื่องแล้ว",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} değişiklik bekliyor",
|
||||
'sync.pending_other': "{count} değişiklik bekliyor",
|
||||
'sync.now': "Şimdi eşitle",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Kişisel etiketler",
|
||||
"tags.placeholder": "comfort, cadılar bayramı, Lea ile tekrar izle…",
|
||||
"tags.private": "Yalnızca sen görürsün, profilinde asla görünmez.",
|
||||
"tags.filter": "Kişisel etiketler",
|
||||
"select.start": "Seç",
|
||||
"select.exit": "Seçimden çık",
|
||||
"select.all": "Tümünü seç",
|
||||
"select.none": "Seçimi kaldır",
|
||||
"select.toggle": "“{title}” seç",
|
||||
"select.actions": "Seçim işlemleri",
|
||||
"select.status": "Durum",
|
||||
"select.list": "Liste",
|
||||
"select.tag": "Etiket",
|
||||
"select.noLists": "Henüz liste yok — aşağıdan oluştur.",
|
||||
"select.inList": "Zaten içinde: {n}/{total}",
|
||||
"select.addTo": "“{list}” listesine ekle",
|
||||
"select.removeFrom": "“{list}” listesinden çıkar",
|
||||
"select.removeTag": "Etiketi kaldır",
|
||||
"toast.undo": "Geri al",
|
||||
"toast.undone": "Geri alındı",
|
||||
"toast.undoFailed": "Geri alınamadı",
|
||||
"toast.deleted": "“{title}” silindi",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "“{title}”, “{list}” listesinden çıkarıldı",
|
||||
"select.count_zero": "Hiçbir yapım seçilmedi",
|
||||
"select.count_one": "{count} seçildi",
|
||||
"select.count_other": "{count} seçildi",
|
||||
"select.statusTitle_one": "{count} yapımın durumu",
|
||||
"select.statusTitle_other": "{count} yapımın durumu",
|
||||
"select.listTitle_one": "Listeler · {count} yapım",
|
||||
"select.listTitle_other": "Listeler · {count} yapım",
|
||||
"select.tagTitle_one": "Etiket · {count} yapım",
|
||||
"select.tagTitle_other": "Etiket · {count} yapım",
|
||||
"select.deleteConfirm_one": "{count} yapım kitaplığından silinsin mi?",
|
||||
"select.deleteConfirm_other": "{count} yapım kitaplığından silinsin mi?",
|
||||
"toast.deletedMany_one": "{count} yapım silindi",
|
||||
"toast.deletedMany_other": "{count} yapım silindi",
|
||||
"toast.statusMany_one": "{count} yapım → {status}",
|
||||
"toast.statusMany_other": "{count} yapım → {status}",
|
||||
"toast.addedToList_one": "{count} yapım “{list}” listesine eklendi",
|
||||
"toast.addedToList_other": "{count} yapım “{list}” listesine eklendi",
|
||||
"toast.removedFromListMany_one": "{count} yapım “{list}” listesinden çıkarıldı",
|
||||
"toast.removedFromListMany_other": "{count} yapım “{list}” listesinden çıkarıldı",
|
||||
"toast.tagged_one": "#{tag}, {count} yapıma eklendi",
|
||||
"toast.tagged_other": "#{tag}, {count} yapıma eklendi",
|
||||
"toast.untagged_one": "#{tag}, {count} yapımdan kaldırıldı",
|
||||
"toast.untagged_other": "#{tag}, {count} yapımdan kaldırıldı",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} thay đổi đang chờ",
|
||||
'sync.pending_other': "{count} thay đổi đang chờ",
|
||||
'sync.now': "Đồng bộ ngay",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Thẻ cá nhân",
|
||||
"tags.placeholder": "comfort, halloween, xem lại với Lea…",
|
||||
"tags.private": "Chỉ mình bạn thấy, không bao giờ hiện trên hồ sơ.",
|
||||
"tags.filter": "Thẻ cá nhân",
|
||||
"select.start": "Chọn",
|
||||
"select.exit": "Thoát chế độ chọn",
|
||||
"select.all": "Chọn tất cả",
|
||||
"select.none": "Bỏ chọn tất cả",
|
||||
"select.toggle": "Chọn “{title}”",
|
||||
"select.actions": "Thao tác với mục đã chọn",
|
||||
"select.status": "Trạng thái",
|
||||
"select.list": "Danh sách",
|
||||
"select.tag": "Thẻ",
|
||||
"select.noLists": "Chưa có danh sách — tạo ở bên dưới.",
|
||||
"select.inList": "Đã có: {n}/{total}",
|
||||
"select.addTo": "Thêm vào “{list}”",
|
||||
"select.removeFrom": "Gỡ khỏi “{list}”",
|
||||
"select.removeTag": "Gỡ thẻ",
|
||||
"toast.undo": "Hoàn tác",
|
||||
"toast.undone": "Đã hoàn tác",
|
||||
"toast.undoFailed": "Không thể hoàn tác",
|
||||
"toast.deleted": "Đã xóa “{title}”",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "Đã gỡ “{title}” khỏi “{list}”",
|
||||
"select.count_zero": "Chưa chọn phim nào",
|
||||
"select.count_one": "Đã chọn {count}",
|
||||
"select.count_other": "Đã chọn {count}",
|
||||
"select.statusTitle_one": "Trạng thái của {count} phim",
|
||||
"select.statusTitle_other": "Trạng thái của {count} phim",
|
||||
"select.listTitle_one": "Danh sách · {count} phim",
|
||||
"select.listTitle_other": "Danh sách · {count} phim",
|
||||
"select.tagTitle_one": "Thẻ · {count} phim",
|
||||
"select.tagTitle_other": "Thẻ · {count} phim",
|
||||
"select.deleteConfirm_one": "Xóa {count} phim khỏi thư viện?",
|
||||
"select.deleteConfirm_other": "Xóa {count} phim khỏi thư viện?",
|
||||
"toast.deletedMany_one": "Đã xóa {count} phim",
|
||||
"toast.deletedMany_other": "Đã xóa {count} phim",
|
||||
"toast.statusMany_one": "{count} phim → {status}",
|
||||
"toast.statusMany_other": "{count} phim → {status}",
|
||||
"toast.addedToList_one": "Đã thêm {count} phim vào “{list}”",
|
||||
"toast.addedToList_other": "Đã thêm {count} phim vào “{list}”",
|
||||
"toast.removedFromListMany_one": "Đã gỡ {count} phim khỏi “{list}”",
|
||||
"toast.removedFromListMany_other": "Đã gỡ {count} phim khỏi “{list}”",
|
||||
"toast.tagged_one": "Đã thêm #{tag} cho {count} phim",
|
||||
"toast.tagged_other": "Đã thêm #{tag} cho {count} phim",
|
||||
"toast.untagged_one": "Đã gỡ #{tag} khỏi {count} phim",
|
||||
"toast.untagged_other": "Đã gỡ #{tag} khỏi {count} phim",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -897,6 +897,54 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} 项更改待上传",
|
||||
'sync.pending_other': "{count} 项更改待上传",
|
||||
'sync.now': "立即同步",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "个人标签",
|
||||
"tags.placeholder": "comfort、万圣节、和 Lea 重温…",
|
||||
"tags.private": "仅自己可见,不会显示在个人主页上。",
|
||||
"tags.filter": "个人标签",
|
||||
"select.start": "选择",
|
||||
"select.exit": "退出选择",
|
||||
"select.all": "全选",
|
||||
"select.none": "取消全选",
|
||||
"select.toggle": "选择《{title}》",
|
||||
"select.actions": "所选作品操作",
|
||||
"select.status": "状态",
|
||||
"select.list": "片单",
|
||||
"select.tag": "标签",
|
||||
"select.noLists": "还没有片单——在下方创建一个。",
|
||||
"select.inList": "已在其中:{n}/{total}",
|
||||
"select.addTo": "添加到“{list}”",
|
||||
"select.removeFrom": "从“{list}”移除",
|
||||
"select.removeTag": "移除标签",
|
||||
"toast.undo": "撤销",
|
||||
"toast.undone": "已撤销",
|
||||
"toast.undoFailed": "无法撤销",
|
||||
"toast.deleted": "已删除《{title}》",
|
||||
"toast.status": "《{title}》→ {status}",
|
||||
"toast.removedFromList": "已将《{title}》从“{list}”移除",
|
||||
"select.count_zero": "未选择任何作品",
|
||||
"select.count_one": "已选择 {count} 部",
|
||||
"select.count_other": "已选择 {count} 部",
|
||||
"select.statusTitle_one": "{count} 部作品的状态",
|
||||
"select.statusTitle_other": "{count} 部作品的状态",
|
||||
"select.listTitle_one": "片单 · {count} 部",
|
||||
"select.listTitle_other": "片单 · {count} 部",
|
||||
"select.tagTitle_one": "标签 · {count} 部",
|
||||
"select.tagTitle_other": "标签 · {count} 部",
|
||||
"select.deleteConfirm_one": "要从片库中删除 {count} 部作品吗?",
|
||||
"select.deleteConfirm_other": "要从片库中删除 {count} 部作品吗?",
|
||||
"toast.deletedMany_one": "已删除 {count} 部作品",
|
||||
"toast.deletedMany_other": "已删除 {count} 部作品",
|
||||
"toast.statusMany_one": "{count} 部作品 → {status}",
|
||||
"toast.statusMany_other": "{count} 部作品 → {status}",
|
||||
"toast.addedToList_one": "已将 {count} 部作品添加到“{list}”",
|
||||
"toast.addedToList_other": "已将 {count} 部作品添加到“{list}”",
|
||||
"toast.removedFromListMany_one": "已将 {count} 部作品从“{list}”移除",
|
||||
"toast.removedFromListMany_other": "已将 {count} 部作品从“{list}”移除",
|
||||
"toast.tagged_one": "已为 {count} 部作品添加 #{tag}",
|
||||
"toast.tagged_other": "已为 {count} 部作品添加 #{tag}",
|
||||
"toast.untagged_one": "已从 {count} 部作品移除 #{tag}",
|
||||
"toast.untagged_other": "已从 {count} 部作品移除 #{tag}",
|
||||
}
|
||||
|
||||
export default dict
|
||||
+18
-1
@@ -18,7 +18,7 @@ import {
|
||||
safeSeasons,
|
||||
safeStringList,
|
||||
} from './security'
|
||||
import { todayISO, uid } from './utils'
|
||||
import { normalizeText, todayISO, uid } from './utils'
|
||||
|
||||
const TYPES = new Set<string>(MEDIA_TYPES.map((t) => t.value))
|
||||
const STATUS_SET = new Set<string>(STATUSES.map((s) => s.value))
|
||||
@@ -62,6 +62,21 @@ function safeDates(v: unknown): string[] | undefined {
|
||||
return out.length ? out : undefined
|
||||
}
|
||||
|
||||
/** Tags perso : texte court, sans doublon (casse et accents ignorés), 30 max. */
|
||||
export function safeTags(v: unknown): string[] | undefined {
|
||||
const seen = new Set<string>()
|
||||
const out: string[] = []
|
||||
for (const tag of safeStringList(v, LIMITS.tags * 2, LIMITS.tagLength)) {
|
||||
const s = tag.replace(/\s+/g, ' ').replace(/^#+/, '').trim()
|
||||
const key = normalizeText(s)
|
||||
if (!s || seen.has(key)) continue
|
||||
seen.add(key)
|
||||
out.push(s)
|
||||
if (out.length >= LIMITS.tags) break
|
||||
}
|
||||
return out.length ? out : undefined
|
||||
}
|
||||
|
||||
/** 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
|
||||
@@ -83,6 +98,7 @@ export function normalizeItem(raw: unknown): MediaItem | null {
|
||||
const cap = episodeCap({ episodesTotal, seasons })
|
||||
if (cap && episodesWatched > cap) episodesWatched = cap
|
||||
const listIds = safeStringList(r.listIds, LIMITS.lists, 64).filter(isSafeId)
|
||||
const tags = safeTags(r.tags)
|
||||
return {
|
||||
id: isSafeId(r.id) ? r.id : uid(),
|
||||
title,
|
||||
@@ -111,6 +127,7 @@ export function normalizeItem(raw: unknown): MediaItem | null {
|
||||
externalId: isSafeExternalId(r.externalId) ? r.externalId : undefined,
|
||||
top: normalizeTop(r.top),
|
||||
listIds: listIds.length ? listIds : undefined,
|
||||
tags,
|
||||
countries: safeCountries(r.countries),
|
||||
rewatchDates: safeDates(r.rewatchDates),
|
||||
publicRating: (() => {
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
import type { MediaInput, MediaItem, WatchStatus } from '../types'
|
||||
import { TYPE_BY_VALUE } from './constants'
|
||||
import { episodeCap } from './franchise'
|
||||
import { LIMITS } from './security'
|
||||
import { normalizeText, todayISO } from './utils'
|
||||
|
||||
/**
|
||||
* Nouveau statut → ce qui change sur la fiche (mêmes règles que les boutons de la fiche) :
|
||||
* « À voir » efface les dates, « Vu » date la fin (et coche tous les épisodes connus)…
|
||||
*/
|
||||
export function statusPatch(item: MediaItem, s: WatchStatus): Partial<MediaInput> {
|
||||
const patch: Partial<MediaInput> = { status: s }
|
||||
const episodic = TYPE_BY_VALUE[item.type].episodic
|
||||
const today = todayISO()
|
||||
if (s === 'a_voir') Object.assign(patch, { startDate: undefined, endDate: undefined })
|
||||
if (s === 'en_cours') Object.assign(patch, { startDate: episodic && !item.episodesWatched ? item.startDate : (item.startDate ?? today), endDate: undefined })
|
||||
if (s === 'termine') {
|
||||
patch.endDate = item.status === 'termine' && item.endDate ? item.endDate : today
|
||||
if (!item.startDate) patch.startDate = episodic && item.episodesWatched ? today : patch.endDate
|
||||
const cap = episodeCap(item)
|
||||
if (episodic && cap) patch.episodesWatched = cap
|
||||
}
|
||||
return patch
|
||||
}
|
||||
|
||||
/** Tag saisi → tag enregistré : sans « # », espaces simplifiés, et même écriture qu'un tag existant. */
|
||||
export function cleanTag(input: string, existing: string[] = []): string {
|
||||
const s = input.replace(/\s+/g, ' ').replace(/^#+/, '').trim().slice(0, LIMITS.tagLength)
|
||||
const key = normalizeText(s)
|
||||
return existing.find((e) => normalizeText(e) === key) ?? s
|
||||
}
|
||||
|
||||
/** Tous les tags utilisés dans la bibliothèque, du plus fréquent au moins fréquent. */
|
||||
export function allTags(items: MediaItem[]): string[] {
|
||||
const count = new Map<string, number>()
|
||||
for (const i of items) for (const tag of i.tags ?? []) count.set(tag, (count.get(tag) ?? 0) + 1)
|
||||
return [...count.entries()].sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0])).map(([tag]) => tag)
|
||||
}
|
||||
|
||||
export const hasTag = (item: MediaItem, tag: string) => {
|
||||
const key = normalizeText(tag)
|
||||
return !!item.tags?.some((x) => normalizeText(x) === key)
|
||||
}
|
||||
+12
-2
@@ -86,8 +86,18 @@ function toCard(raw: unknown): ProfileCard | null {
|
||||
}
|
||||
}
|
||||
|
||||
/** Fiche de quelqu'un d'autre : ses tags et listes perso restent privés (même si un ancien serveur les renvoyait). */
|
||||
function othersItem(v: unknown): MediaItem | null {
|
||||
const item = normalizeItem(v)
|
||||
if (item) {
|
||||
delete item.tags
|
||||
delete item.listIds
|
||||
}
|
||||
return item
|
||||
}
|
||||
|
||||
const toItems = (v: unknown): MediaItem[] =>
|
||||
Array.isArray(v) ? v.slice(0, 200).map(normalizeItem).filter((i): i is MediaItem => i !== null) : []
|
||||
Array.isArray(v) ? v.slice(0, 200).map(othersItem).filter((i): i is MediaItem => i !== null) : []
|
||||
|
||||
function toProfile(raw: unknown): Profile | null {
|
||||
const card = toCard(raw)
|
||||
@@ -163,7 +173,7 @@ export async function getFeed(before?: string): Promise<FeedEntry[]> {
|
||||
const out: FeedEntry[] = []
|
||||
for (const r of raw.slice(0, 50)) {
|
||||
if (!isPlainObject(r) || !isPlainObject(r.user)) continue
|
||||
const item = normalizeItem(r.item)
|
||||
const item = othersItem(r.item)
|
||||
const name = username(r.user.username)
|
||||
const createdAt = safeIso(r.created_at)
|
||||
const kind = r.kind
|
||||
|
||||
@@ -167,7 +167,8 @@ export function convertLegacyBackup(data: LegacyFile): { items: MediaItem[]; ski
|
||||
|
||||
const genres = splitGenres(rawGenres, isFilm)
|
||||
if (isFilm && type === 'film' && countries.includes('JP') && rawGenres.includes('Animation')) genres.unshift('Anime')
|
||||
for (const t of itemTags.get(r.id) ?? []) if (!genres.includes(t) && genres.length < LIMITS.genres) genres.push(t)
|
||||
// Tags perso de l'ancienne appli → tags personnels (privés), plus mélangés aux genres
|
||||
const tags = [...new Set((itemTags.get(r.id) ?? []).map((t) => t.slice(0, LIMITS.tagLength)))].slice(0, LIMITS.tags)
|
||||
|
||||
const note = typeof r.note === 'number' && Number.isFinite(r.note) && r.note > 0 ? Math.min(10, Math.round(r.note * 2 * 2) / 2) : undefined
|
||||
const created = toISO(r.date_added) ?? now
|
||||
@@ -192,6 +193,7 @@ export function convertLegacyBackup(data: LegacyFile): { items: MediaItem[]; ski
|
||||
startDate,
|
||||
endDate,
|
||||
genres,
|
||||
tags: tags.length ? tags : undefined,
|
||||
notes: cleanText(
|
||||
[cleanText(r.comment, LIMITS.notes), cleanText(r.director, LIMITS.shortText) ? `Réalisation : ${cleanText(r.director, LIMITS.shortText)}` : '']
|
||||
.filter(Boolean)
|
||||
|
||||
@@ -26,6 +26,8 @@ export const LIMITS = {
|
||||
notes: 20000,
|
||||
overview: 10000,
|
||||
genres: 40,
|
||||
tags: 30,
|
||||
tagLength: 40,
|
||||
posterDataUrl: 3 * 1024 * 1024, // ~3 Mo par affiche en data URL
|
||||
searchQuery: 200,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { genreLabel, subtypeLabel } from '../lib/genres'
|
||||
import { locale, t } from '../i18n'
|
||||
import { Heart, Search, SlidersHorizontal, X } from 'lucide-react'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { CheckSquare, Hash, Heart, Search, SlidersHorizontal, X } from 'lucide-react'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { StatusDot } from '../components/Badges'
|
||||
import JournalView from '../components/JournalView'
|
||||
import ListsView from '../components/ListsView'
|
||||
@@ -10,6 +10,11 @@ import { EmptyState, PageHeader } from '../components/ui'
|
||||
import { MEDIA_TYPES, STATUSES } from '../lib/constants'
|
||||
import { cx, normalizeText } from '../lib/utils'
|
||||
import { useMedia } from '../store'
|
||||
import SelectableCard from '../components/library/SelectableCard'
|
||||
import SelectionBar from '../components/library/SelectionBar'
|
||||
import { allTags, hasTag } from '../lib/bulk'
|
||||
import { useBackToClose } from '../lib/backNav'
|
||||
import { useEscape } from '../lib/escape'
|
||||
import type { MediaItem, MediaType, WatchStatus } from '../types'
|
||||
|
||||
type SortKey = 'recent' | 'rating' | 'title' | 'watched'
|
||||
@@ -37,6 +42,27 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
const [favOnly, setFavOnly] = useState(false)
|
||||
const [sort, setSort] = useState<SortKey>('recent')
|
||||
const [showFilters, setShowFilters] = useState(false)
|
||||
const [tag, setTag] = useState('')
|
||||
// Sélection multiple (actions groupées) : null = mode normal
|
||||
const [selection, setSelection] = useState<Set<string> | null>(null)
|
||||
const selecting = selection !== null
|
||||
const exitSelection = () => setSelection(null)
|
||||
useEscape(exitSelection, selecting)
|
||||
useBackToClose(exitSelection, selecting)
|
||||
const toggleSelected = (id: string) =>
|
||||
setSelection((prev) => {
|
||||
const next = new Set(prev ?? [])
|
||||
if (next.has(id)) next.delete(id)
|
||||
else next.add(id)
|
||||
return next
|
||||
})
|
||||
const startSelection = (id: string) => setSelection((prev) => new Set([...(prev ?? []), id]))
|
||||
// On quitte la sélection en changeant d'onglet (journal, listes)
|
||||
useEffect(() => {
|
||||
if (view !== 'titles') setSelection(null)
|
||||
}, [view])
|
||||
|
||||
const tags = useMemo(() => allTags(items), [items])
|
||||
|
||||
const allGenres = useMemo(
|
||||
() => [...new Set(items.flatMap((i) => i.genres))].sort((a, b) => a.localeCompare(b, locale())),
|
||||
@@ -59,8 +85,9 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
if (genre && !i.genres.includes(genre)) return false
|
||||
if (minRating && (i.rating ?? 0) < minRating) return false
|
||||
if (favOnly && !i.favorite) return false
|
||||
if (tag && !hasTag(i, tag)) return false
|
||||
if (q) {
|
||||
const haystack = normalizeText([i.title, i.originalTitle, i.subtype, i.subtype && subtypeLabel(i.subtype), i.platform, ...i.genres, ...i.genres.map(genreLabel)].filter(Boolean).join(' '))
|
||||
const haystack = normalizeText([i.title, i.originalTitle, i.subtype, i.subtype && subtypeLabel(i.subtype), i.platform, ...i.genres, ...i.genres.map(genreLabel), ...(i.tags ?? [])].filter(Boolean).join(' '))
|
||||
if (!haystack.includes(q)) return false
|
||||
}
|
||||
return true
|
||||
@@ -71,9 +98,9 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
else if (sort === 'watched')
|
||||
sorted.sort((a, b) => (b.endDate ?? b.startDate ?? '').localeCompare(a.endDate ?? a.startDate ?? ''))
|
||||
return sorted
|
||||
}, [items, query, types, status, genre, minRating, favOnly, sort])
|
||||
}, [items, query, types, status, genre, minRating, favOnly, tag, sort])
|
||||
|
||||
const activeAdvanced = (genre ? 1 : 0) + (minRating ? 1 : 0) + (favOnly ? 1 : 0)
|
||||
const activeAdvanced = (genre ? 1 : 0) + (minRating ? 1 : 0) + (favOnly ? 1 : 0) + (tag ? 1 : 0)
|
||||
const anyFilter = query || types.size || status || activeAdvanced
|
||||
const resetAll = () => {
|
||||
setQuery('')
|
||||
@@ -82,8 +109,13 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
setGenre('')
|
||||
setMinRating(0)
|
||||
setFavOnly(false)
|
||||
setTag('')
|
||||
}
|
||||
|
||||
// Fiches sélectionnées encore présentes (une fiche a pu être supprimée entre-temps)
|
||||
const selected = useMemo(() => (selection ? items.filter((i) => selection.has(i.id)) : []), [items, selection])
|
||||
const allShownSelected = selecting && results.length > 0 && results.every((i) => selection.has(i.id))
|
||||
|
||||
// Options de note minimale selon l'échelle affichée (valeurs internes sur 10)
|
||||
const ratingOptions = settings.ratingScale === '5' ? [2, 4, 6, 8, 9, 10] : [5, 6, 7, 8, 9, 10]
|
||||
|
||||
@@ -123,6 +155,23 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
|
||||
{/* Recherche + filtres (collants en haut) */}
|
||||
<div className="sticky top-0 z-20 -mx-4 space-y-3 bg-bg/90 px-4 pb-3 pt-[max(0.5rem,env(safe-area-inset-top))] backdrop-blur-xl">
|
||||
{selecting && (
|
||||
<div className="flex items-center gap-2 rounded-xl border border-accent bg-surface py-1.5 ps-1.5 pe-2">
|
||||
<button onClick={exitSelection} className="grid size-9 place-items-center rounded-full text-ink-2" aria-label={t('select.exit')}>
|
||||
<X size={19} />
|
||||
</button>
|
||||
<p className="min-w-0 flex-1 truncate text-sm font-semibold" aria-live="polite">
|
||||
{t('select.count', { count: selected.length })}
|
||||
</p>
|
||||
<button
|
||||
onClick={() => setSelection(allShownSelected ? new Set() : new Set([...selection, ...results.map((i) => i.id)]))}
|
||||
className="chip py-1 text-xs"
|
||||
disabled={!results.length}
|
||||
>
|
||||
{allShownSelected ? t('select.none') : t('select.all')}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex gap-2">
|
||||
<div className="relative flex-1">
|
||||
<Search size={18} className="pointer-events-none absolute start-3 top-1/2 -translate-y-1/2 text-ink-3" />
|
||||
@@ -146,6 +195,17 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
<span className="absolute -end-1.5 -top-1.5 grid size-5 place-items-center rounded-full bg-accent-fill text-[10px] text-on-accent">{activeAdvanced}</span>
|
||||
)}
|
||||
</button>
|
||||
{results.length > 0 && (
|
||||
<button
|
||||
onClick={() => (selecting ? exitSelection() : setSelection(new Set()))}
|
||||
className={cx('grid w-12 place-items-center rounded-xl border border-line bg-surface transition-colors', selecting && 'border-ink text-ink')}
|
||||
aria-label={selecting ? t('select.exit') : t('select.start')}
|
||||
aria-pressed={selecting}
|
||||
title={t('select.start')}
|
||||
>
|
||||
<CheckSquare size={18} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="no-scrollbar -mx-4 flex gap-2 overflow-x-auto px-4">
|
||||
@@ -202,6 +262,19 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
))}
|
||||
</select>
|
||||
</label>
|
||||
{tags.length > 0 && (
|
||||
<div className="col-span-2">
|
||||
<span className="label">{t('tags.filter')}</span>
|
||||
<div className="no-scrollbar -mx-3 flex gap-1.5 overflow-x-auto px-3">
|
||||
{tags.map((tg) => (
|
||||
<button key={tg} onClick={() => setTag(tag === tg ? '' : tg)} className={cx('chip py-1 text-xs', tag === tg && 'chip-on')} aria-pressed={tag === tg}>
|
||||
<Hash size={12} />
|
||||
{tg}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<button onClick={() => setFavOnly((v) => !v)} className={cx('chip justify-center', favOnly && 'chip-on')}>
|
||||
<Heart size={14} className={favOnly ? 'fill-accent-fill text-accent-fill' : ''} /> {t('catalog.favorites')}
|
||||
</button>
|
||||
@@ -227,10 +300,20 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
) : (
|
||||
<div className="mt-3 grid grid-cols-2 gap-x-3.5 gap-y-6 sm:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-8">
|
||||
{results.map((item) => (
|
||||
<MediaCard key={item.id} item={item} onOpen={onOpen} />
|
||||
<SelectableCard
|
||||
key={item.id}
|
||||
title={item.title}
|
||||
selecting={selecting}
|
||||
selected={!!selection?.has(item.id)}
|
||||
onToggle={() => toggleSelected(item.id)}
|
||||
onStartSelect={() => startSelection(item.id)}
|
||||
>
|
||||
<MediaCard item={item} onOpen={onOpen} />
|
||||
</SelectableCard>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{selecting && <SelectionBar selected={selected} onDone={exitSelection} />}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
||||
+62
-2
@@ -58,6 +58,16 @@ interface MediaStore {
|
||||
clearAll: () => Promise<void>
|
||||
/** Met à jour plusieurs fiches d'un coup (sans changer leur date de modification). */
|
||||
patchMany: (patches: { id: string; patch: Partial<MediaInput> }[]) => Promise<void>
|
||||
/** Modification groupée par l'utilisateur (la date de modification avance, comme update). */
|
||||
updateMany: (patches: { id: string; patch: Partial<MediaInput> }[]) => Promise<void>
|
||||
/** Suppression groupée. */
|
||||
removeMany: (ids: string[]) => Promise<void>
|
||||
/**
|
||||
* « Annuler » : remet ces fiches exactement comme elles étaient (dates, épisodes, listes…),
|
||||
* avec une date de modification plus récente que la suppression / le changement, pour que
|
||||
* la synchro (la plus récente gagne) recrée bien la fiche côté serveur.
|
||||
*/
|
||||
restore: (snapshots: MediaItem[]) => Promise<void>
|
||||
|
||||
// Listes perso
|
||||
lists: CustomList[]
|
||||
@@ -253,11 +263,61 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
[save],
|
||||
)
|
||||
|
||||
// Dernière suppression locale de chaque fiche (une restauration doit être strictement plus récente)
|
||||
const removedAtRef = useRef(new Map<string, number>())
|
||||
|
||||
const remove = useCallback(async (id: string) => {
|
||||
await mediaDB.remove(id)
|
||||
removedAtRef.current.set(id, Date.now())
|
||||
setItems((prev) => prev.filter((i) => i.id !== id))
|
||||
}, [])
|
||||
|
||||
const removeMany = useCallback(async (ids: string[]) => {
|
||||
if (!ids.length) return
|
||||
await mediaDB.removeMany(ids)
|
||||
const now = Date.now()
|
||||
for (const id of ids) removedAtRef.current.set(id, now)
|
||||
const gone = new Set(ids)
|
||||
setItems((prev) => prev.filter((i) => !gone.has(i.id)))
|
||||
}, [])
|
||||
|
||||
const updateMany = useCallback(
|
||||
async (patches: { id: string; patch: Partial<MediaInput> }[]) => {
|
||||
const now = new Date().toISOString()
|
||||
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, updatedAt: now }) : null
|
||||
return next ? [next] : []
|
||||
})
|
||||
if (!changed.length) return
|
||||
await mediaDB.putMany(changed)
|
||||
const map = new Map(changed.map((c) => [c.id, c]))
|
||||
setItems((prev) => prev.map((i) => map.get(i.id) ?? i).sort(byUpdatedDesc))
|
||||
},
|
||||
[setItems],
|
||||
)
|
||||
|
||||
const restore = useCallback(
|
||||
async (snapshots: MediaItem[]) => {
|
||||
// Horodatage plus récent que la suppression (ou la modification) qu'on annule : la synchro
|
||||
// envoie alors une version qui gagne sur la « pierre tombale » déjà partie au serveur.
|
||||
const current = new Map(itemsRef.current.map((i) => [i.id, i.updatedAt]))
|
||||
let latest = Date.now()
|
||||
for (const snap of snapshots) {
|
||||
latest = Math.max(latest, (removedAtRef.current.get(snap.id) ?? 0) + 1, (Date.parse(current.get(snap.id) ?? '') || 0) + 1)
|
||||
}
|
||||
const at = new Date(latest).toISOString()
|
||||
const restored = snapshots.map((s) => normalizeItem({ ...s, updatedAt: at })).filter((i): i is MediaItem => i !== null)
|
||||
if (!restored.length) return
|
||||
await mediaDB.putMany(restored)
|
||||
for (const r of restored) removedAtRef.current.delete(r.id)
|
||||
const map = new Map(restored.map((r) => [r.id, r]))
|
||||
setItems((prev) => [...restored, ...prev.filter((i) => !map.has(i.id))].sort(byUpdatedDesc))
|
||||
},
|
||||
[setItems],
|
||||
)
|
||||
|
||||
const incrementEpisode = useCallback(
|
||||
async (id: string, delta = 1) => {
|
||||
const item = itemsRef.current.find((i) => i.id === id)
|
||||
@@ -442,11 +502,11 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
const value = useMemo<MediaStore>(
|
||||
() => ({
|
||||
items, loading, error, settings: exposedSettings, updateSettings, add, update, remove, incrementEpisode, importItems, setTopList, clearAll,
|
||||
patchMany, lists, createList, renameList, deleteList, toggleInList, mergeLists, account,
|
||||
patchMany, updateMany, removeMany, restore, lists, createList, renameList, deleteList, toggleInList, mergeLists, account,
|
||||
}),
|
||||
[
|
||||
items, loading, error, exposedSettings, updateSettings, add, update, remove, incrementEpisode, importItems, setTopList, clearAll,
|
||||
patchMany, lists, createList, renameList, deleteList, toggleInList, mergeLists, account,
|
||||
patchMany, updateMany, removeMany, restore, lists, createList, renameList, deleteList, toggleInList, mergeLists, account,
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ export interface MediaItem {
|
||||
top?: TopEntry
|
||||
/** Listes perso auxquelles appartient la fiche. */
|
||||
listIds?: string[]
|
||||
/** Tags personnels libres (« comfort », « halloween »…). Privés : jamais affichés sur le profil public. */
|
||||
tags?: string[]
|
||||
/** Pays d'origine (codes ISO, ex. ['KR']). */
|
||||
countries?: string[]
|
||||
/** Dates de revisionnage (AAAA-MM-JJ), en plus du premier visionnage. */
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
-- ─────────────────────────────────────────────────────────────────────────────
|
||||
-- Tags personnels (« comfort », « à revoir avec Léa »…) : PRIVÉS.
|
||||
--
|
||||
-- Les tags vivent dans la fiche (colonne JSON `items.data`, champ `tags`) et suivent donc
|
||||
-- la synchronisation existante sans nouvelle colonne. Ils ne doivent jamais apparaître
|
||||
-- chez les autres : la fonction qui prépare une fiche pour un profil / le fil d'abonnements
|
||||
-- les retire, comme les listes perso.
|
||||
--
|
||||
-- Idempotent : peut être relancé sans risque (create or replace + revoke).
|
||||
-- ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
create or replace function public.public_item(d jsonb)
|
||||
returns jsonb
|
||||
language sql
|
||||
immutable
|
||||
set search_path = ''
|
||||
as $$
|
||||
select case when length(coalesce(x->>'poster', '')) > 150000 then x - 'poster' else x end
|
||||
-- Les avis sont publics (comme sur Letterboxd) ; les listes perso et les tags perso restent privés
|
||||
from (select d - 'listIds' - 'notesPublic' - 'tags' as x) s
|
||||
$$;
|
||||
|
||||
-- Outil interne des fonctions de profil : jamais appelable directement depuis l'API
|
||||
revoke all on function public.public_item(jsonb) from public, anon, authenticated;
|
||||
Reference in new issue
Block a user