Notes en étoiles uniquement : plus d'échelle sur 10
- Réglage « Notation » retiré, ainsi que le curseur sur 10 et l'affichage « /10 » (fiche, cartes, Top 5, stats, filtres, carte de partage) : tout s'affiche sur 5 étoiles - Les notes restent stockées comme avant (sur 10 en interne) : rien ne change pour les notes existantes - Réglage ratingScale retiré des réglages synchronisés et des sauvegardes ; textes inutiles retirés (18 langues) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
This commit is contained in:
40 files changed
+61
-214
No files matched your search
@@ -4,7 +4,7 @@ import { t } from '../../i18n'
|
||||
import { episodesBeforeSeason } from '../../lib/franchise'
|
||||
import { seasonsAverage } from '../../lib/seasons'
|
||||
import { cx, formatRating } from '../../lib/utils'
|
||||
import type { MediaItem, RatingScale, SeasonRating } from '../../types'
|
||||
import type { MediaItem, SeasonRating } from '../../types'
|
||||
import { RatingInput } from '../Rating'
|
||||
|
||||
/**
|
||||
@@ -14,19 +14,17 @@ import { RatingInput } from '../Rating'
|
||||
*/
|
||||
export default function SeasonRatings({
|
||||
item,
|
||||
scale,
|
||||
highlight,
|
||||
onChange,
|
||||
}: {
|
||||
item: MediaItem
|
||||
scale: RatingScale
|
||||
/** Saison à mettre en avant (on vient de la finir) */
|
||||
highlight?: number
|
||||
onChange: (seasonRatings: MediaItem['seasonRatings']) => void
|
||||
}) {
|
||||
const seasons = item.seasons ?? []
|
||||
const ratings: Record<string, SeasonRating> = item.seasonRatings ?? {}
|
||||
const avg = seasonsAverage(ratings, scale)
|
||||
const avg = seasonsAverage(ratings)
|
||||
|
||||
const set = (n: number, patch: Partial<SeasonRating>) => {
|
||||
const key = String(n)
|
||||
@@ -42,7 +40,7 @@ export default function SeasonRatings({
|
||||
<h3 className="eyebrow text-ink-2">{t('seasons.title')}</h3>
|
||||
{avg != null && (
|
||||
<span className="text-xs text-ink-3">
|
||||
{t('seasons.average')} <span className="font-semibold text-ink">{formatRating(avg, scale)}</span>
|
||||
{t('seasons.average')} <span className="font-semibold text-ink">{formatRating(avg)}</span>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
@@ -59,7 +57,7 @@ export default function SeasonRatings({
|
||||
size={size}
|
||||
seen={seen}
|
||||
value={ratings[String(n)]}
|
||||
scale={scale}
|
||||
|
||||
highlight={highlight === n}
|
||||
onChange={(patch) => set(n, patch)}
|
||||
/>
|
||||
@@ -75,7 +73,6 @@ function SeasonRow({
|
||||
size,
|
||||
seen,
|
||||
value,
|
||||
scale,
|
||||
highlight,
|
||||
onChange,
|
||||
}: {
|
||||
@@ -83,7 +80,6 @@ function SeasonRow({
|
||||
size: number
|
||||
seen: number
|
||||
value?: SeasonRating
|
||||
scale: RatingScale
|
||||
highlight: boolean
|
||||
onChange: (patch: Partial<SeasonRating>) => void
|
||||
}) {
|
||||
@@ -128,7 +124,7 @@ function SeasonRow({
|
||||
|
||||
{started && (
|
||||
<div className="mt-2.5">
|
||||
<RatingInput value={value?.rating} onChange={(rating) => onChange({ rating })} scale={scale} size="sm" label={t('seasons.season', { n })} />
|
||||
<RatingInput value={value?.rating} onChange={(rating) => onChange({ rating })} size="sm" label={t('seasons.season', { n })} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in new issue
Block a user