Revisionnage : revoir un film ou une série déjà terminés
- Bloc « Revoir » sur la fiche d'un titre terminé, avec le nombre de visionnages (« Vu 3 fois »). - Film : « Revu le … » à la date choisie (aujourd'hui par défaut), annulable. - Série : « Commencer un revisionnage » avec sa propre progression d'épisodes (Reprendre, +1, liste d'épisodes), badge « Revisionnage » sur l'accueil. Le premier visionnage reste intact (statut, dates, note, notes de saison). Au dernier épisode, le revisionnage se termine et rejoint l'historique ; on peut aussi le terminer d'un coup ou l'arrêter. - Les épisodes revus comptent pour les défis ; le temps des revisionnages de séries compte dans les stats et le journal. - Données dans la fiche (champ rewatch), synchronisées et sauvegardées, rien côté SQL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
This commit is contained in:
29 files changed
+644
-39
No files matched your search
@@ -9,6 +9,7 @@ import { genreLabel } from '../lib/genres'
|
||||
import { backdropSrcSet, tmdbSized } from '../lib/tmdbImage'
|
||||
import { cx, formatDate } from '../lib/utils'
|
||||
import { useMedia } from '../store'
|
||||
import { useToast } from './Toast'
|
||||
import type { MediaItem } from '../types'
|
||||
|
||||
/** Où j'en suis : « S2 · É3 » (épisode suivant à voir) */
|
||||
@@ -27,9 +28,23 @@ export function waitingLabel(item: MediaItem): string {
|
||||
return date ? t('hero.nextOn', { date: formatDate(date) }) : t('hero.upToDate')
|
||||
}
|
||||
|
||||
/** +1 depuis l'accueil : saison (ou série) finie → on ouvre la fiche sur la note ; revisionnage fini → petit message. */
|
||||
function usePlusOne(onOpen: (item: MediaItem, focus?: Completion) => void) {
|
||||
const { incrementEpisode } = useMedia()
|
||||
const toast = useToast()
|
||||
return (item: MediaItem) => {
|
||||
const cap = episodeCap(item)
|
||||
const endsRewatch = !!item.rewatch && !!cap && item.rewatch.episodes + 1 >= cap
|
||||
return incrementEpisode(item.id).then((done) => {
|
||||
if (done) onOpen(item, done)
|
||||
else if (endsRewatch) toast.show(t('rewatch.finishedToast', { title: item.title }))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/** Grande bannière de l'accueil : défile entre les titres que je regarde en ce moment (ou le prochain à voir). */
|
||||
export default function HomeHero({ items, onOpen }: { items: MediaItem[]; onOpen: (item: MediaItem, focus?: Completion) => void }) {
|
||||
const { incrementEpisode } = useMedia()
|
||||
const plusOne = usePlusOne(onOpen)
|
||||
// On retient le titre affiché (et pas sa position) : la liste se réordonne quand on avance un épisode
|
||||
const [currentId, setCurrentId] = useState<string>()
|
||||
const [pausedAt, setPausedAt] = useState(0)
|
||||
@@ -99,7 +114,7 @@ export default function HomeHero({ items, onOpen }: { items: MediaItem[]; onOpen
|
||||
<span className="absolute inset-0 bg-bg/50" />
|
||||
</button>
|
||||
<div className="pointer-events-none absolute inset-x-0 bottom-0 p-5 lg:p-10">
|
||||
<p className="eyebrow text-ink-2">{item.status === 'en_cours' ? t('homeHero.continue') : t('homeHero.next')}</p>
|
||||
<p className="eyebrow text-ink-2">{item.rewatch ? t('rewatch.badge') : item.status === 'en_cours' ? t('homeHero.continue') : t('homeHero.next')}</p>
|
||||
<h2 className="mt-1.5 line-clamp-2 text-[1.9rem] font-bold leading-[1.1] lg:text-5xl">{item.title}</h2>
|
||||
{meta && <p className="mt-1.5 text-xs text-ink-2">{meta}</p>}
|
||||
<div className="pointer-events-auto mt-4 flex items-center gap-2">
|
||||
@@ -108,7 +123,7 @@ export default function HomeHero({ items, onOpen }: { items: MediaItem[]; onOpen
|
||||
onClick={() => {
|
||||
setPausedAt(Date.now())
|
||||
// Saison (ou série) terminée : on ouvre la fiche sur la note
|
||||
void incrementEpisode(item.id).then((done) => done && onOpen(item, done))
|
||||
void plusOne(item)
|
||||
}}
|
||||
className="btn btn-primary px-5"
|
||||
>
|
||||
@@ -143,7 +158,7 @@ export default function HomeHero({ items, onOpen }: { items: MediaItem[]; onOpen
|
||||
|
||||
/** Carte horizontale « Reprendre » : image, barre de progression, prochain épisode. */
|
||||
export function ContinueCard({ item, onOpen }: { item: MediaItem; onOpen: (item: MediaItem, focus?: Completion) => void }) {
|
||||
const { incrementEpisode } = useMedia()
|
||||
const plusOne = usePlusOne(onOpen)
|
||||
const image = item.backdrop ?? item.poster
|
||||
const next = nextEpisodeLabel(item)
|
||||
|
||||
@@ -155,7 +170,7 @@ export function ContinueCard({ item, onOpen }: { item: MediaItem; onOpen: (item:
|
||||
</button>
|
||||
{next && (
|
||||
<button
|
||||
onClick={() => void incrementEpisode(item.id).then((done) => done && onOpen(item, done))}
|
||||
onClick={() => void plusOne(item)}
|
||||
className="absolute bottom-3 end-2 flex h-8 items-center gap-0.5 rounded-full bg-accent-fill px-3 text-xs font-semibold text-on-accent transition active:scale-90"
|
||||
aria-label={t('card.plusOne', { title: item.title })}
|
||||
>
|
||||
@@ -165,7 +180,10 @@ export function ContinueCard({ item, onOpen }: { item: MediaItem; onOpen: (item:
|
||||
</div>
|
||||
<button onClick={() => onOpen(item)} className="mt-2 block w-full text-start">
|
||||
<span className="block truncate text-sm font-semibold">{item.title}</span>
|
||||
<span className="block text-xs text-ink-3">{next ? t('homeHero.nextUp', { ep: next }) : waitingLabel(item)}</span>
|
||||
<span className="block text-xs text-ink-3">
|
||||
{item.rewatch && <span className="font-medium text-accent">{t('rewatch.badge')} · </span>}
|
||||
{next ? t('homeHero.nextUp', { ep: next }) : waitingLabel(item)}
|
||||
</span>
|
||||
</button>
|
||||
</article>
|
||||
)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { locale, t } from '../i18n'
|
||||
import { Star } from 'lucide-react'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { DEFAULT_FILM_MINUTES, TYPE_BY_VALUE } from '../lib/constants'
|
||||
import { watchMinutes } from '../lib/stats'
|
||||
import { oneViewMinutes, rewatchMinutes, watchMinutes } from '../lib/stats'
|
||||
import { cx, formatDuration, formatRating } from '../lib/utils'
|
||||
import { useMedia } from '../store'
|
||||
import type { MediaItem } from '../types'
|
||||
@@ -28,13 +27,11 @@ function buildEntries(items: MediaItem[]): Entry[] {
|
||||
if (item.status === 'termine' && item.endDate) out.push({ date: item.endDate, item, kind: 'fini', minutes: watchMinutes(item) - rewatchMinutes(item) })
|
||||
else if ((item.status === 'en_cours' || item.status === 'pause') && item.startDate) out.push({ date: item.startDate, item, kind: 'commence', minutes: 0 })
|
||||
else if (item.status === 'abandonne' && (item.endDate || item.startDate)) out.push({ date: (item.endDate || item.startDate)!, item, kind: 'abandonne', minutes: 0 })
|
||||
for (const d of item.rewatchDates ?? []) out.push({ date: d, item, kind: 'revu', minutes: TYPE_BY_VALUE[item.type].episodic ? 0 : item.duration || DEFAULT_FILM_MINUTES })
|
||||
for (const d of item.rewatchDates ?? []) out.push({ date: d, item, kind: 'revu', minutes: oneViewMinutes(item) })
|
||||
}
|
||||
return out.sort((a, b) => b.date.localeCompare(a.date) || a.item.title.localeCompare(b.item.title, locale()))
|
||||
}
|
||||
|
||||
const rewatchMinutes = (i: MediaItem) => (TYPE_BY_VALUE[i.type].episodic ? 0 : (i.rewatchDates?.length ?? 0) * (i.duration || DEFAULT_FILM_MINUTES))
|
||||
|
||||
/** Onglet « Journal » du catalogue : chronologie groupée par mois. */
|
||||
export default function JournalView({ onOpen }: { onOpen: (item: MediaItem) => void }) {
|
||||
const { items, settings } = useMedia()
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Heart, Plus } from 'lucide-react'
|
||||
import { TYPE_BY_VALUE } from '../lib/constants'
|
||||
import { canWatchMore } from '../lib/airing'
|
||||
import { episodeCap, seasonPosition } from '../lib/franchise'
|
||||
import { progressView } from '../lib/rewatch'
|
||||
import { useMedia } from '../store'
|
||||
import type { MediaItem } from '../types'
|
||||
import { StatusPill, TypeBadge } from './Badges'
|
||||
@@ -38,10 +39,12 @@ function Progress({ item }: { item: MediaItem }) {
|
||||
/** Carte verticale (grille du catalogue). */
|
||||
export function MediaCard({ item, onOpen }: { item: MediaItem; onOpen: (item: MediaItem) => void }) {
|
||||
const { settings, incrementEpisode } = useMedia()
|
||||
// Revisionnage en cours : la progression montrée est celle du revisionnage
|
||||
const view = progressView(item)
|
||||
const canIncrement =
|
||||
TYPE_BY_VALUE[item.type].episodic &&
|
||||
item.status === 'en_cours' &&
|
||||
canWatchMore(item)
|
||||
view.status === 'en_cours' &&
|
||||
canWatchMore(view)
|
||||
|
||||
return (
|
||||
<article>
|
||||
@@ -69,7 +72,7 @@ export function MediaCard({ item, onOpen }: { item: MediaItem; onOpen: (item: Me
|
||||
<StatusPill status={item.status} />
|
||||
<RatingBadge value={item.rating} scale={settings.ratingScale} />
|
||||
</div>
|
||||
<Progress item={item} />
|
||||
<Progress item={view} />
|
||||
</button>
|
||||
</article>
|
||||
)
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
import { Check, RotateCcw } from 'lucide-react'
|
||||
import { useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { episodeCap } from '../../lib/franchise'
|
||||
import { addRewatchDate, canTrackRewatch, MAX_REWATCHES, startRewatch, stopRewatch, viewCount } from '../../lib/rewatch'
|
||||
import { formatDate, todayISO } from '../../lib/utils'
|
||||
import type { MediaInput, MediaItem } from '../../types'
|
||||
|
||||
/**
|
||||
* « Revoir » (titre terminé) : un film se note revu à une date ; une série se revoit épisode par épisode
|
||||
* (progression à part, le premier visionnage ne bouge pas) ou se note revue d'un coup.
|
||||
*/
|
||||
export default function RewatchPanel({
|
||||
item,
|
||||
justFinished,
|
||||
onChange,
|
||||
onUndoable,
|
||||
}: {
|
||||
item: MediaItem
|
||||
/** Le revisionnage vient de se terminer (dernier épisode coché) */
|
||||
justFinished: boolean
|
||||
onChange: (patch: Partial<MediaInput>) => void
|
||||
/** Changement annulable (« Annuler » dans le toast) */
|
||||
onUndoable: (patch: Partial<MediaInput>, message: string) => void
|
||||
}) {
|
||||
const [adding, setAdding] = useState(false)
|
||||
const [date, setDate] = useState(todayISO())
|
||||
const views = viewCount(item)
|
||||
const full = (item.rewatchDates?.length ?? 0) >= MAX_REWATCHES
|
||||
const trackable = canTrackRewatch(item)
|
||||
const cap = episodeCap(item)
|
||||
|
||||
const addDate = () => {
|
||||
if (!date || date > todayISO() || full) return
|
||||
onUndoable(addRewatchDate(item, date), t('rewatch.added', { title: item.title }))
|
||||
setAdding(false)
|
||||
setDate(todayISO())
|
||||
}
|
||||
|
||||
const dateForm = (
|
||||
<div className="flex items-end gap-2">
|
||||
<label className="block min-w-0 flex-1">
|
||||
<span className="label">{t('form.rewatchDate')}</span>
|
||||
<input className="field" type="date" value={date} max={todayISO()} onChange={(e) => setDate(e.target.value)} />
|
||||
</label>
|
||||
<button onClick={addDate} disabled={!date || full} className="btn btn-primary shrink-0 px-4 py-2.5 text-sm">
|
||||
<Check size={16} /> {t('rewatch.add')}
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
|
||||
return (
|
||||
<section className="card mx-4 mt-4 p-4" aria-label={t('rewatch.title')}>
|
||||
<div className="mb-3 flex items-baseline justify-between gap-3">
|
||||
<h3 className="eyebrow text-ink-2">{t('rewatch.title')}</h3>
|
||||
{views > 1 && <span className="text-xs font-medium text-ink-2">{t('rewatch.views', { count: views })}</span>}
|
||||
</div>
|
||||
|
||||
{justFinished && !item.rewatch && (
|
||||
<p className="mb-3 flex items-center gap-2 rounded-xl bg-surface-2 px-3 py-2.5 text-sm" role="status">
|
||||
<Check size={16} className="shrink-0 text-accent" /> {t('rewatch.finished', { count: views })}
|
||||
</p>
|
||||
)}
|
||||
|
||||
{item.rewatch ? (
|
||||
<div>
|
||||
<p className="text-sm">
|
||||
<span className="font-semibold text-accent">{t('rewatch.badge')}</span>
|
||||
<span className="text-ink-3"> · {t('rewatch.since', { date: formatDate(item.rewatch.startDate) })}</span>
|
||||
</p>
|
||||
{cap ? (
|
||||
<>
|
||||
<p className="mt-1 text-xs text-ink-3">{t('rewatch.progress', { seen: item.rewatch.episodes, total: cap })}</p>
|
||||
<div className="mt-2 h-1 rounded-full bg-surface-2">
|
||||
<div className="h-full rounded-full bg-accent" style={{ width: `${Math.min(100, (item.rewatch.episodes / cap) * 100)}%` }} />
|
||||
</div>
|
||||
</>
|
||||
) : null}
|
||||
<p className="mt-3 text-xs text-ink-3">{t('rewatch.trackingHint')}</p>
|
||||
<div className="mt-3 flex flex-wrap gap-2">
|
||||
<button onClick={() => onUndoable({ ...stopRewatch(), ...addRewatchDate(item) }, t('rewatch.added', { title: item.title }))} className="btn btn-ghost px-4 py-2 text-sm">
|
||||
<Check size={16} /> {t('rewatch.markDone')}
|
||||
</button>
|
||||
<button onClick={() => onUndoable(stopRewatch(), t('rewatch.stopped', { title: item.title }))} className="px-3 py-2 text-sm font-medium text-ink-3">
|
||||
{t('rewatch.stop')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
) : trackable ? (
|
||||
<div>
|
||||
<button onClick={() => onChange(startRewatch())} className="btn btn-primary w-full py-3">
|
||||
<RotateCcw size={17} /> {t('rewatch.start')}
|
||||
</button>
|
||||
<p className="mt-2 text-xs text-ink-3">{t('rewatch.startHint')}</p>
|
||||
{adding ? (
|
||||
<div className="mt-4">{dateForm}</div>
|
||||
) : (
|
||||
<button onClick={() => setAdding(true)} className="mt-3 text-sm font-medium text-ink-2">
|
||||
{t('rewatch.alreadyDone')}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
<p className="mb-3 text-xs text-ink-3">{t('form.rewatchHint')}</p>
|
||||
{dateForm}
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -30,6 +30,8 @@ import EditDetails from './EditDetails'
|
||||
import ReviewEditor from './ReviewEditor'
|
||||
import WhereToWatch from './WhereToWatch'
|
||||
import SeasonRatings from './SeasonRatings'
|
||||
import RewatchPanel from './RewatchPanel'
|
||||
import { progressView, rewatchEpisodesPatch } from '../../lib/rewatch'
|
||||
import { completionOf, hasSeasons, seasonsAverage, type Completion } from '../../lib/seasons'
|
||||
import ReviewComments from '../social/ReviewComments'
|
||||
import SharedListPicker from '../social/SharedListPicker'
|
||||
@@ -233,8 +235,16 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
if (focus && 'final' in focus) ratingRef.current?.scrollIntoView({ behavior: 'smooth', block: 'center' })
|
||||
}, [focus])
|
||||
|
||||
// Revisionnage qui vient de se terminer (dernier épisode coché ici)
|
||||
const [rewatchDone, setRewatchDone] = useState(false)
|
||||
const setEpisodes = (n: number, season?: number) => {
|
||||
if (!item) return
|
||||
// Revisionnage : sa propre progression, le premier visionnage reste tel quel
|
||||
if (item.rewatch) {
|
||||
const { patch, finished } = rewatchEpisodesPatch(item, n)
|
||||
void update(item.id, patch).then(() => finished && setRewatchDone(true))
|
||||
return
|
||||
}
|
||||
const done = completionOf(item, item.episodesWatched, n)
|
||||
void update(item.id, episodesPatch(item, n, season)).then(() => done && setFocus(done))
|
||||
}
|
||||
@@ -244,16 +254,18 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
const airingRef = item ? { id: item.id, type: item.type, externalId: item.externalId } : undefined
|
||||
const aired = airingRef ? airedCount(airingRef, airingCache) : undefined
|
||||
/** Bouton principal des épisodes : « J'ai vu S2 · É3 », « À jour », « Tout vu »… */
|
||||
// Pendant un revisionnage, les épisodes affichés sont ceux du revisionnage
|
||||
const shown = item ? progressView(item) : undefined
|
||||
const nextEpisode = (() => {
|
||||
if (!item || !episodic) return undefined
|
||||
const cap = episodeCap(item)
|
||||
if (cap && item.episodesWatched >= cap) return { label: t('hero.allSeen'), done: true }
|
||||
if (aired != null && item.episodesWatched >= aired) {
|
||||
if (!shown || !episodic) return undefined
|
||||
const cap = episodeCap(shown)
|
||||
if (cap && shown.episodesWatched >= cap) return { label: t('hero.allSeen'), done: true }
|
||||
if (aired != null && shown.episodesWatched >= aired) {
|
||||
const date = airingRef ? nextAirDate(airingRef, airingCache) : undefined
|
||||
return { label: date ? t('hero.nextOn', { date: formatDate(date) }) : t('hero.upToDate'), done: true }
|
||||
}
|
||||
const pos = seasonPosition({ ...item, episodesWatched: item.episodesWatched + 1, season: undefined })
|
||||
const ep = t('episodes.short', { n: pos ? pos.episode : item.episodesWatched + 1 })
|
||||
const pos = seasonPosition({ ...shown, episodesWatched: shown.episodesWatched + 1, season: undefined })
|
||||
const ep = t('episodes.short', { n: pos ? pos.episode : shown.episodesWatched + 1 })
|
||||
return { label: t('hero.seenEp', { ep: pos ? `${t('episodes.seasonShort', { n: pos.season })} · ${ep}` : ep }), done: false }
|
||||
})()
|
||||
const hasEpisodeList = !!item && (!!item.seasons || (!!item.externalId && !!item.episodesTotal))
|
||||
@@ -453,12 +465,29 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
)}
|
||||
</section>
|
||||
|
||||
{/* Revoir (titre terminé) */}
|
||||
{item && item.status === 'termine' && (
|
||||
<RewatchPanel
|
||||
item={item}
|
||||
justFinished={rewatchDone}
|
||||
onChange={(patch) => {
|
||||
setRewatchDone(false)
|
||||
void update(item.id, patch)
|
||||
}}
|
||||
onUndoable={(patch, message) => {
|
||||
const before = item
|
||||
setRewatchDone(false)
|
||||
void update(item.id, patch).then(() => actions.offerUndo(message, [before]))
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Épisodes */}
|
||||
{item && episodic && (
|
||||
{item && shown && episodic && (
|
||||
<section className="mx-4 mt-4">
|
||||
{nextEpisode && (
|
||||
<button
|
||||
onClick={nextEpisode.done ? undefined : () => setEpisodes(item.episodesWatched + 1)}
|
||||
onClick={nextEpisode.done ? undefined : () => setEpisodes(shown.episodesWatched + 1)}
|
||||
disabled={nextEpisode.done}
|
||||
className={cx('btn mb-3 w-full py-3', nextEpisode.done ? 'btn-ghost' : 'btn-primary')}
|
||||
>
|
||||
@@ -467,29 +496,29 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
</button>
|
||||
)}
|
||||
{hasEpisodeList ? (
|
||||
<EpisodeList form={item} aired={aired} onChange={setEpisodes} />
|
||||
<EpisodeList form={shown} aired={aired} onChange={setEpisodes} />
|
||||
) : (
|
||||
<div className="card p-4">
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<div>
|
||||
<span className="eyebrow">{t('home.episodesSeen')}</span>
|
||||
<p className="mt-1 text-2xl font-bold tabular-nums">
|
||||
{item.episodesWatched}
|
||||
{episodeCap(item) ? <span className="text-base font-normal text-ink-3"> / {episodeCap(item)}</span> : null}
|
||||
{shown.episodesWatched}
|
||||
{episodeCap(shown) ? <span className="text-base font-normal text-ink-3"> / {episodeCap(shown)}</span> : null}
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<button onClick={() => setEpisodes(item.episodesWatched - 1)} className="grid size-11 place-items-center rounded-full border border-line-strong text-ink-2" aria-label={t('form.minusEp')}>
|
||||
<button onClick={() => setEpisodes(shown.episodesWatched - 1)} className="grid size-11 place-items-center rounded-full border border-line-strong text-ink-2" aria-label={t('form.minusEp')}>
|
||||
<Minus size={18} />
|
||||
</button>
|
||||
<button onClick={() => setEpisodes(item.episodesWatched + 1)} className="grid size-11 place-items-center rounded-full bg-accent-fill text-on-accent" aria-label={t('form.plusEp')}>
|
||||
<button onClick={() => setEpisodes(shown.episodesWatched + 1)} className="grid size-11 place-items-center rounded-full bg-accent-fill text-on-accent" aria-label={t('form.plusEp')}>
|
||||
<Plus size={18} strokeWidth={2.5} />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{episodeCap(item) ? (
|
||||
{episodeCap(shown) ? (
|
||||
<div className="mt-3 h-1 rounded-full bg-surface-2">
|
||||
<div className="h-full rounded-full bg-accent" style={{ width: `${Math.min(100, (item.episodesWatched / episodeCap(item)!) * 100)}%` }} />
|
||||
<div className="h-full rounded-full bg-accent" style={{ width: `${Math.min(100, (shown.episodesWatched / episodeCap(shown)!) * 100)}%` }} />
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
@@ -869,12 +898,7 @@ function Tracking({ item, lists, tagSuggestions, onChange }: { item: MediaItem;
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
<button
|
||||
onClick={() => rewatches.length < 100 && onChange({ rewatchDates: [todayISO(), ...rewatches].sort().reverse() })}
|
||||
className="btn btn-ghost py-2 text-sm"
|
||||
>
|
||||
<Plus size={16} /> {t('title.rewatchedToday')}
|
||||
</button>
|
||||
{!rewatches.length && <p className="text-xs text-ink-3">{t('rewatch.historyEmpty')}</p>}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user