diff --git a/public/404.html b/public/404.html index dd90e74..692c657 100644 --- a/public/404.html +++ b/public/404.html @@ -3,31 +3,18 @@ -Bobinoo — Page introuvable +Page introuvable — Bobinoo - + - +

Cette scène a été coupée au montage

La page que tu cherches n'existe pas ou a été déplacée.

Retour à Bobinoo -

Page not found — back to Bobinoo

+

Page not found — back to Bobinoo

diff --git a/public/credits.html b/public/credits.html new file mode 100644 index 0000000..ca94ce7 --- /dev/null +++ b/public/credits.html @@ -0,0 +1,35 @@ + + + + + +Crédits — Bobinoo + + + + + +
+ Bobinoo + +

Crédits

+

Mise à jour le 28 novembre 2026

+

Données des œuvres

+

Bobinoo ne possède pas sa propre base de films : les fiches viennent de services externes, utilisés directement par l'application (sans réglage à faire).

+ +

Polices, icônes et logiciels

+ + + +
+ + diff --git a/public/fonts/epilogue-LICENSE.txt b/public/fonts/epilogue-LICENSE.txt new file mode 100644 index 0000000..2930220 --- /dev/null +++ b/public/fonts/epilogue-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2020 The Epilogue Project Authors (https://github.com/Etcetera-Type-Co/Epilogue) Epilogue-Italic[wght].ttf: Copyright 2020 The Epilogue Project Authors (https://github.com/Etcetera-Type-Co/Epilogue) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/public/fonts/epilogue.woff2 b/public/fonts/epilogue.woff2 new file mode 100644 index 0000000..334eb96 Binary files /dev/null and b/public/fonts/epilogue.woff2 differ diff --git a/public/legal.html b/public/legal.html index 29043b6..f8eafc0 100644 --- a/public/legal.html +++ b/public/legal.html @@ -3,76 +3,34 @@ -Bobinoo — Mentions légales et conditions d'utilisation +Mentions légales — Bobinoo - + +
-

Kino

-

Mentions légales, conditions d'utilisation et crédits — mise à jour le 9 octobre 2026

- - -

Mentions légales

-

Éditeur

+ Bobinoo + +

Mentions légales

+

Mise à jour le 28 novembre 2026

+

Éditeur

Bobinoo est édité par Romain Dacet, particulier, à titre personnel et non commercial. Directeur de la publication : Romain Dacet. Contact : via rdacet.fr.

-

Hébergement

+

Hébergement

-

Conditions d'utilisation

-

Le service

-

Bobinoo permet de tenir le journal des films, séries, animes et dramas que tu regardes, de les noter, d'écrire des avis et de suivre d'autres membres. Le service est gratuit, sans publicité et sans achat : il n'y a donc ni conditions de vente, ni paiement, ni remboursement.

-

Âge minimum

-

Il faut avoir au moins 15 ans pour créer un compte. En dessous, l'accord d'un parent ou du titulaire de l'autorité parentale est nécessaire.

-

Ton compte

-

Tu es responsable de ton compte et de ton mot de passe. Tu peux exporter tes données ou supprimer ton compte à tout moment depuis Réglages (Sauvegarde, Zone sensible), sans démarche ni justification.

-

Ce que tu publies

-

Ton pseudo, ta photo, ta bio, tes notes et tes avis sont visibles par les autres membres (sauf si ton compte est privé). Tu restes propriétaire de ce que tu écris. Sont interdits : les contenus illégaux, haineux, harcelants, à caractère sexuel, l'usurpation d'identité, le spam et les révélations (spoilers) présentées de façon trompeuse. Un contenu qui ne respecte pas ces règles peut être retiré, et le compte concerné suspendu.

-

Pour signaler un contenu, contacte l'éditeur via rdacet.fr.

-

Informations sur les œuvres

-

Les fiches (titres, affiches, résumés, notes moyennes, casting, dates de sortie) proviennent de TMDB et d'AniList. Elles sont fournies telles quelles et peuvent contenir des erreurs ; les notes moyennes affichées sont celles de ces services, pas un avis de l'éditeur.

-

Disponibilité

-

Bobinoo est un projet personnel, proposé sans garantie de disponibilité permanente. L'éditeur fait de son mieux pour protéger tes données (voir la politique de confidentialité) et te conseille d'exporter régulièrement ta bibliothèque.

-

Droit applicable

-

Ces conditions sont soumises au droit français. Elles peuvent évoluer ; la date de mise à jour figure en haut de cette page.

- -

Crédits et licences

- -

Accessibilité

L'application vise à être utilisable au clavier, avec un lecteur d'écran et avec des contrastes suffisants dans tous les thèmes. Si quelque chose te bloque, signale-le via rdacet.fr.

+
-
- -

Legal notice & terms (English summary)

+

Legal notice & terms (English summary)

Bobinoo is published by Romain Dacet, a private individual, on a personal, non-commercial basis (contact: rdacet.fr). The site is hosted by OVH SAS (2 rue Kellermann, 59100 Roubaix, France); accounts and data are hosted by Supabase Inc. in the European Union (Ireland). The service is free, with no ads and no purchases. You must be at least 15 years old to sign up (or have a parent's consent). You own what you write; illegal, hateful, harassing or sexual content, impersonation and spam are forbidden and may be removed, and the account suspended. Title data comes from TMDB and AniList (streaming availability: JustWatch) and is provided as is. This product uses the TMDB API but is not endorsed or certified by TMDB. French law applies.

-

← Retour à Bobinoo

+
+
diff --git a/public/pages.css b/public/pages.css new file mode 100644 index 0000000..03d0ac9 --- /dev/null +++ b/public/pages.css @@ -0,0 +1,60 @@ +/* Bobinoo — pages publiques (confidentialité, conditions, mentions, crédits, 404) : thème « Encre », clair ou sombre selon l'appareil */ +@font-face { + font-family: 'Epilogue'; + src: url('/fonts/epilogue.woff2') format('woff2'); + font-weight: 100 900; + font-display: swap; +} +:root { + color-scheme: light dark; + --bg: #fefdfb; + --ink: #0d0d0d; + --ink-2: #383838; + --ink-3: #525252; + --line: #dbdbd8; + --accent: #00746d; + --on-accent: #ffffff; +} +@media (prefers-color-scheme: dark) { + :root { + --bg: #090909; + --ink: #f2f2f0; + --ink-2: #c4c4c4; + --ink-3: #989898; + --line: #2b2b2b; + --accent: #53bfb6; + --on-accent: #062b28; + } +} +* { box-sizing: border-box; } +body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 'Epilogue', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; } +main { max-width: 680px; margin: 0 auto; padding: 40px 20px 80px; } +.brand { display: inline-block; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; } +.brand span { color: var(--accent); } +nav.pages { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 20px 0 36px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); font-size: .9rem; } +nav.pages a { color: var(--ink-3); text-decoration: none; } +nav.pages a[aria-current='page'] { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--accent); } +h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 6px; } +.updated { color: var(--ink-3); font-size: .875rem; margin: 0 0 8px; } +h2 { font-size: 1.15rem; margin: 40px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); } +h3 { font-size: 1rem; margin: 22px 0 4px; } +p, li { color: var(--ink-2); } +ul { padding-left: 1.2em; } +li { margin: 6px 0; } +strong { color: var(--ink); } +a { color: var(--accent); } +a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } +.en { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .9rem; } +.en h2 { border: 0; margin-top: 0; font-size: 1rem; } +footer { margin-top: 48px; font-size: .9rem; } +/* Page 404 */ +.notfound { min-height: 100dvh; display: grid; place-items: center; text-align: center; } +.notfound main { padding: 48px 20px; max-width: 520px; } +.code { font-size: clamp(6rem, 28vw, 11rem); font-weight: 800; letter-spacing: -0.06em; line-height: 1; margin: 0; color: var(--line); } +.code span { color: var(--accent); } +.btn { display: inline-block; margin-top: 8px; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600; padding: 12px 22px; border-radius: 2px; } +/* Tableaux (confidentialité) */ +.table-wrap { overflow-x: auto; margin: 12px 0; } +table { width: 100%; border-collapse: collapse; font-size: .9rem; } +th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); } +th { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); } diff --git a/public/privacy.html b/public/privacy.html index e554f0b..aedeca9 100644 --- a/public/privacy.html +++ b/public/privacy.html @@ -3,44 +3,31 @@ -Bobinoo — Confidentialité +Confidentialité — Bobinoo - + +
-

Kino

-

Politique de confidentialité — mise à jour le 9 octobre 2026

- + Bobinoo + +

Confidentialité

+

Mise à jour le 28 novembre 2026

+

Bobinoo est une application gratuite et sans publicité pour tenir le journal des films, séries, animes et dramas que tu regardes. Elle est éditée par Romain Dacet, à titre personnel et non commercial, qui est le responsable du traitement de tes données (contact : rdacet.fr).

Tu peux utiliser Bobinoo sans compte : tout reste alors uniquement sur ton appareil. Un compte n'est utile que pour synchroniser plusieurs appareils et pour la partie sociale.

Ce qui est enregistré (et pourquoi)

- +
-
DonnéePourquoiBase légale
Adresse e-mail, mot de passe (chiffré, jamais visible par l'éditeur), nom si tu te connectes avec GoogleTe connecter et sécuriser ton compteExécution du service (contrat)
Bibliothèque : titres, statuts, épisodes vus, dates, notes, avis, listes, réglagesFaire fonctionner ton journal et le synchroniserContrat
Profil : pseudo, nom affiché, bio, photo, bannière, top 5Te présenter aux autres membresContrat
Abonnements, demandes de suivi, réactions emoji aux avisFonctions socialesContrat
+

Rien d'autre n'est collecté : pas de date de naissance, pas de numéro de téléphone, pas de localisation, pas de contacts.

Qui peut voir quoi

@@ -89,13 +76,13 @@

Sécurité

Les échanges sont chiffrés (HTTPS). Chaque compte ne peut lire et modifier que ses propres données (règles d'accès appliquées par la base de données elle-même). Les mots de passe ne sont jamais stockés en clair.

+
-
- -

Privacy policy (English summary)

+

Privacy policy (English summary)

Bobinoo is a free, ad-free personal watch journal published by Romain Dacet (data controller, contact: rdacet.fr). It works without an account (everything stays on your device). With an account, it stores your email (and your name if you sign in with Google), your library, ratings, reviews, profile, follows and emoji reactions, to provide the service (contract). Your email is never shown to other users; your profile is visible to signed-in users unless you make your account private. Data is hosted by Supabase in the EU (Ireland); the site files are served by OVH (France). Title data and posters come from TMDB and AniList, which see your IP address when your browser loads their images, but never your account data. No cookies, no trackers, no ads, no marketing emails, nothing sold; on-device storage is strictly necessary. Data is kept while your account exists and deleted immediately and completely when you delete it. You must be 15 or older (or have a parent's consent). You can access, correct, export or delete your data from Settings, contact the publisher for any other request, and complain to the CNIL.

-

← Retour à Bobinoo

+
+
diff --git a/public/terms.html b/public/terms.html new file mode 100644 index 0000000..a336b35 --- /dev/null +++ b/public/terms.html @@ -0,0 +1,41 @@ + + + + + +Conditions d'utilisation — Bobinoo + + + + + +
+ Bobinoo + +

Conditions d'utilisation

+

Mise à jour le 28 novembre 2026

+

Le service

+

Bobinoo permet de tenir le journal des films, séries, animes et dramas que tu regardes, de les noter, d'écrire des avis et de suivre d'autres membres. Le service est gratuit, sans publicité et sans achat : il n'y a donc ni conditions de vente, ni paiement, ni remboursement.

+

Âge minimum

+

Il faut avoir au moins 15 ans pour créer un compte. En dessous, l'accord d'un parent ou du titulaire de l'autorité parentale est nécessaire.

+

Ton compte

+

Tu es responsable de ton compte et de ton mot de passe. Tu peux exporter tes données ou supprimer ton compte à tout moment depuis Réglages (Sauvegarde, Zone sensible), sans démarche ni justification.

+

Ce que tu publies

+

Ton pseudo, ta photo, ta bio, tes notes et tes avis sont visibles par les autres membres (sauf si ton compte est privé). Tu restes propriétaire de ce que tu écris. Sont interdits : les contenus illégaux, haineux, harcelants, à caractère sexuel, l'usurpation d'identité, le spam et les révélations (spoilers) présentées de façon trompeuse. Un contenu qui ne respecte pas ces règles peut être retiré, et le compte concerné suspendu.

+

Pour signaler un contenu, contacte l'éditeur via rdacet.fr.

+

Informations sur les œuvres

+

Les fiches (titres, affiches, résumés, notes moyennes, casting, dates de sortie) proviennent de TMDB et d'AniList. Elles sont fournies telles quelles et peuvent contenir des erreurs ; les notes moyennes affichées sont celles de ces services, pas un avis de l'éditeur.

+

Disponibilité

+

Bobinoo est un projet personnel, proposé sans garantie de disponibilité permanente. L'éditeur fait de son mieux pour protéger tes données (voir la politique de confidentialité) et te conseille d'exporter régulièrement ta bibliothèque.

+

Droit applicable

+

Ces conditions sont soumises au droit français. Elles peuvent évoluer ; la date de mise à jour figure en haut de cette page.

+
+ +

Legal notice & terms (English summary)

+

Bobinoo is published by Romain Dacet, a private individual, on a personal, non-commercial basis (contact: rdacet.fr). The site is hosted by OVH SAS (2 rue Kellermann, 59100 Roubaix, France); accounts and data are hosted by Supabase Inc. in the European Union (Ireland). The service is free, with no ads and no purchases. You must be at least 15 years old to sign up (or have a parent's consent). You own what you write; illegal, hateful, harassing or sexual content, impersonation and spam are forbidden and may be removed, and the account suspended. Title data comes from TMDB and AniList (streaming availability: JustWatch) and is provided as is. This product uses the TMDB API but is not endorsed or certified by TMDB. French law applies.

+ +
+ +
+ + diff --git a/src/App.tsx b/src/App.tsx index 2c2f445..e6b8619 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -122,7 +122,7 @@ export default function App() { {route === 'home' && setRoulette(true)} onCalendar={() => setCalendar(true)} onOpenSeed={openSeed} />} {route === 'catalog' && } - {route === 'stats' && } + {route === 'stats' && } {route === 'settings' && go('admin')} />} {route === 'admin' && go('settings')} />} {route === 'notfound' && go('home')} />} diff --git a/src/components/AccountSection.tsx b/src/components/AccountSection.tsx index 8cacec0..bec0ab5 100644 --- a/src/components/AccountSection.tsx +++ b/src/components/AccountSection.tsx @@ -1,14 +1,12 @@ import Avatar from './social/Avatar' import { useSocial } from './social/SocialProvider' import { t } from '../i18n' -import { AlertTriangle, Check, CloudOff, KeyRound, Loader2, LogOut, RefreshCw, UserRound } from 'lucide-react' +import { KeyRound, Loader2, LogOut, UserRound } from 'lucide-react' import { useState, type FormEvent } from 'react' import { PASSWORD_MIN, updatePassword } from '../lib/cloud/auth' -import { timeAgo } from '../lib/timeAgo' import type { AccountApi } from '../store' import ConfirmDialog from './ConfirmDialog' import { SectionTitle } from './ui' -import { cx } from '../lib/utils' /** Réglages → Mon compte : mot de passe, déconnexion. La synchro tourne en arrière-plan. */ export default function AccountSection({ account, onMessage }: { account: AccountApi; onMessage: (kind: 'ok' | 'error', text: string) => void }) { @@ -71,46 +69,6 @@ export default function AccountSection({ account, onMessage }: { account: Accoun - {/* État de la synchronisation : visible, surtout quand quelque chose bloque */} -
- - {sync.state === 'syncing' ? ( - - ) : sync.state === 'offline' ? ( - - ) : sync.state === 'error' ? ( - - ) : ( - - )} - - - - {sync.state === 'syncing' - ? t('sync.syncing') - : sync.state === 'offline' - ? t('sync.offline') - : sync.state === 'error' - ? t('sync.error') - : sync.lastSyncAt - ? t('sync.synced', { when: timeAgo(sync.lastSyncAt) }) - : t('sync.never')} - - {(sync.pending > 0 || (sync.state === 'error' && sync.error)) && ( - - {[sync.pending > 0 ? t('sync.pending', { count: sync.pending }) : '', sync.state === 'error' ? sync.error : ''].filter(Boolean).join(' · ')} - - )} - - -
- - )} - -

{t('settings.installHint')}

- - {showInstall && ( -
setShowInstall(false)}> - -
e.stopPropagation()}> -

{t('install.title')}

-
    - {t(`install.${platform}`).split('\n').map((step, i) => ( -
  1. - {i + 1} - {step} -
  2. - ))} -
-
- {canInstall && ( - - )} - -
-
-
- )} - - - {t('settings.databases')} -
-
-
- AniList - {t('settings.anilistActive')} -
-

{t('settings.noConfig')}

-
- {/* Mode découverte : TMDB passe par le serveur, rien à régler ici */} - {guest ? null : account ? ( -
-
- TMDB - - {proxy === 'ok' - ? t('settings.tmdbActive') - : proxy === 'checking' - ? t('settings.checking') - : proxy === 'offline' - ? t('settings.offline') - : proxy === 'missing-key' - ? t('settings.proxyMissingKey') - : proxy === 'not-deployed' - ? t('settings.proxyNotDeployed') - : t('settings.unavailable')} - -
-

- {proxy === 'missing-key' - ? t('settings.proxyMissingKeyHint') - : proxy === 'not-deployed' - ? t('settings.proxyNotDeployedHint') - : proxy === 'error' - ? t('settings.proxyErrorHint') - : t('settings.proxyOkHint')} -

- {proxy !== 'ok' && proxy !== 'checking' && ( - - )} -
- ) : ( -
-
- TMDB - - {keyState === 'ok' ? t('settings.tmdbActive') : keyState === 'bad' ? t('settings.keyRefused') : keyState === 'testing' ? t('settings.checking') : t('settings.notConfigured')} - -
-

- {t('settings.tmdbHelp')} -

-
-
- { - setKeyDraft(e.target.value) - setKeyState('idle') - }} - placeholder={t('settings.tmdbKey')} - autoComplete="off" - autoCapitalize="off" - spellCheck={false} - /> - -
- -
-

{t('settings.keyLocal')}

-
- )} -
Top 5 -

{t('settings.topHint')}

{TOP_CATEGORIES.map((c) => { const on = settings.topCategories.includes(c.value) @@ -458,9 +276,9 @@ export default function SettingsPage({ onOpenAdmin }: { onOpenAdmin: () => void {( [ ['/privacy.html', t('legal.privacy')], - ['/legal.html#conditions', t('legal.terms')], - ['/legal.html#mentions', t('legal.notice')], - ['/legal.html#credits', t('legal.credits')], + ['/terms.html', t('legal.terms')], + ['/legal.html', t('legal.notice')], + ['/credits.html', t('legal.credits')], ] as const ).map(([href, label]) => ( diff --git a/src/pages/StatsPage.tsx b/src/pages/StatsPage.tsx index aeeff6a..a27a583 100644 --- a/src/pages/StatsPage.tsx +++ b/src/pages/StatsPage.tsx @@ -2,12 +2,11 @@ import { Settings2 } from 'lucide-react' import { useMemo, useState } from 'react' import { t } from '../i18n' import { BarList, Columns, Panel, StatTile } from '../components/stats/Charts' -import Poster from '../components/Poster' import StatsSettings from '../components/stats/StatsSettings' import { EmptyState, PageHeader } from '../components/ui' import { STATUSES, TYPE_BY_VALUE } from '../lib/constants' import { genreLabel } from '../lib/genres' -import { availableYears, computeStats, countries, itemsForPeriod, monthly, records, watchMinutes } from '../lib/stats' +import { availableYears, computeStats, countries, itemsForPeriod, monthly, watchMinutes } from '../lib/stats' import { cx, formatDuration, formatRating } from '../lib/utils' import { useMedia } from '../store' import type { MediaItem, MediaType } from '../types' @@ -24,7 +23,7 @@ const scopeLabel = (s: Scope) => s === 'all' ? t('stats.tabAll') : s === 'film' ? t('typePlural.film') : s === 'series' ? t('typePlural.serie') : s === 'anime' ? t('typePlural.anime') : t('stats.tabOther') /** Statistiques : vue générale, puis films, séries, animes et autres formats. */ -export default function StatsPage({ onOpen }: { onOpen: (item: MediaItem) => void }) { +export default function StatsPage() { const { items, settings } = useMedia() const [scope, setScope] = useState('all') const [year, setYear] = useState('') @@ -42,7 +41,7 @@ export default function StatsPage({ onOpen }: { onOpen: (item: MediaItem) => voi return ( <> - + {/* Filtres : une seule rangée (catégorie + période) */}
@@ -69,7 +68,7 @@ export default function StatsPage({ onOpen }: { onOpen: (item: MediaItem) => voi {list.length === 0 ? ( ) : ( - setSettingsOpen(true)} /> + setSettingsOpen(true)} /> )} {settingsOpen && setSettingsOpen(false)} />} @@ -81,7 +80,6 @@ function StatsBody({ items, year, hiddenMonths, - onOpen, onSettings, }: { scope: Scope @@ -89,16 +87,13 @@ function StatsBody({ year: string /** Mois masqués dans la courbe (paramètres des stats) */ hiddenMonths?: string[] - onOpen: (item: MediaItem) => void onSettings: () => void }) { const hidden = useMemo(() => new Set(hiddenMonths ?? []), [hiddenMonths]) const s = useMemo(() => computeStats(items), [items]) const months = useMemo(() => monthly(items, year), [items, year]) - const rec = useMemo(() => records(items), [items]) const geo = useMemo(() => countries(items), [items]) const isFilm = scope === 'film' - const episodic = scope !== 'all' && scope !== 'film' const films = useMemo(() => items.filter((i) => i.type === 'film' && i.status === 'termine'), [items]) const avgFilm = films.length ? films.reduce((n, f) => n + watchMinutes(f) / (1 + (f.rewatchDates?.length ?? 0)), 0) / films.length : 0 @@ -215,65 +210,7 @@ function StatsBody({ ({ key: String(d), label: `${d} – ${d + 9}`, value: n }))} /> )} - - - x.value > 0).map((x) => ({ key: x.status, label: x.label, value: x.value }))} /> - - - {s.topPlatforms.length > 0 && ( - - ({ key: p.label, label: p.label, value: p.value }))} /> - - )} - - {/* Records */} - {(rec.marathon && (episodic || scope === 'all')) || (rec.longestFilm && (isFilm || scope === 'all')) ? ( - -
- {rec.marathon && (episodic || scope === 'all') && ( - - )} - {rec.longestFilm && (isFilm || scope === 'all') && ( - - )} -
-
- ) : null}
- - {/* Mes mieux notés */} - {rec.bestRated && rec.bestRated.length > 0 && ( - -
    - {rec.bestRated.map((i) => ( -
  • - -
  • - ))} -
-
- )} - -

{t('stats.footnote')}

) } - -function RecordRow({ label, item, value, onOpen }: { label: string; item: MediaItem; value: string; onOpen: (item: MediaItem) => void }) { - return ( - - ) -} diff --git a/vite.config.ts b/vite.config.ts index 2e622eb..f51087f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -111,7 +111,7 @@ export default defineConfig(({ mode }) => { // L'app vit entièrement sur « / » (routes après le #) : toute autre adresse reçoit la page 404 du serveur navigateFallbackAllowlist: [/^\/(?:index\.html)?(?:\?.*)?$/], // Les pages légales sont de vraies pages, pas l'app - navigateFallbackDenylist: [/^\/privacy/, /^\/legal/], + navigateFallbackDenylist: [/^\/privacy/, /^\/legal/, /^\/terms/, /^\/credits/], // Les affiches AniList ne peuvent pas être copiées dans la base (CORS) : // on les garde en cache après le premier affichage pour les voir hors-ligne. runtimeCaching: [