Corrections : faux avis « Réalisation : … », erreurs réseau lisibles, images d'épisodes, date de version
deploy / deploy (push) Successful in 40s

- Import des anciennes sauvegardes : le réalisateur n'est plus collé dans l'avis (public). 123 avis nettoyés en base (copie dans azuu_backup)
- Carte de partage : ne lit plus le réalisateur dans l'avis
- Erreurs réseau (« Load failed », « Failed to fetch »…) : message traduit dans les 18 langues, au lieu du texte brut du navigateur
- Épisodes sans image chez TMDB : vignette de la série assombrie avec le numéro
- Réglages : date de la version affichée (pour voir si l'appareil est à jour)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
This commit is contained in:
Claude committed 2026-11-29 11:14:39 +00:00
1 parent 3dc1021f59
commit a0e8f5ad51
29 files changed
+80 -14

No files matched your search

+10 -1
View File
@@ -3,6 +3,7 @@ import { useEffect, useLayoutEffect, useRef, useState } from 'react'
import { locale, t } from '../i18n' import { locale, t } from '../i18n'
import { getTmdbSeasonEpisodes, type EpisodeInfo } from '../lib/catalogApi' import { getTmdbSeasonEpisodes, type EpisodeInfo } from '../lib/catalogApi'
import { episodeCap, episodesBeforeSeason, seasonPosition } from '../lib/franchise' import { episodeCap, episodesBeforeSeason, seasonPosition } from '../lib/franchise'
import { tmdbSized } from '../lib/tmdbImage'
import { cx, todayISO } from '../lib/utils' import { cx, todayISO } from '../lib/utils'
import { useMedia } from '../store' import { useMedia } from '../store'
import type { MediaInput } from '../types' import type { MediaInput } from '../types'
@@ -13,6 +14,8 @@ interface Props {
aired?: number aired?: number
/** Nouveau nombre d'épisodes vus (et saison choisie) */ /** Nouveau nombre d'épisodes vus (et saison choisie) */
onChange: (episodesWatched: number, season?: number) => void onChange: (episodesWatched: number, season?: number) => void
/** Grande image de la série : vignette des épisodes qui n'ont pas la leur */
fallbackImage?: string
} }
const MAX_GENERIC = 500 const MAX_GENERIC = 500
@@ -21,7 +24,7 @@ const MAX_GENERIC = 500
* Liste des épisodes, saison par saison (façon plateforme de streaming). * Liste des épisodes, saison par saison (façon plateforme de streaming).
* Toucher un épisode le marque comme vu, ainsi que tous ceux d'avant ; retoucher le dernier vu l'annule. * Toucher un épisode le marque comme vu, ainsi que tous ceux d'avant ; retoucher le dernier vu l'annule.
*/ */
export default function EpisodeList({ form, aired, onChange }: Props) { export default function EpisodeList({ form, aired, onChange, fallbackImage }: Props) {
const { settings } = useMedia() const { settings } = useMedia()
const seasons = form.seasons const seasons = form.seasons
const pos = seasonPosition(form) const pos = seasonPosition(form)
@@ -127,6 +130,12 @@ export default function EpisodeList({ form, aired, onChange }: Props) {
<span className="relative aspect-video w-28 shrink-0 overflow-hidden rounded-lg border border-line bg-surface-2"> <span className="relative aspect-video w-28 shrink-0 overflow-hidden rounded-lg border border-line bg-surface-2">
{e.still ? ( {e.still ? (
<img src={e.still} alt="" loading="lazy" className="size-full object-cover" /> <img src={e.still} alt="" loading="lazy" className="size-full object-cover" />
) : fallbackImage ? (
// Pas d'image pour cet épisode : celle de la série, assombrie, avec le numéro par-dessus
<>
<img src={tmdbSized(fallbackImage, 'w300')} alt="" loading="lazy" className="size-full object-cover brightness-50" />
<span className="absolute inset-0 grid place-items-center text-base font-bold text-white">{e.number}</span>
</>
) : ( ) : (
<span className="grid size-full place-items-center text-sm font-semibold text-ink-3">{e.number}</span> <span className="grid size-full place-items-center text-sm font-semibold text-ink-3">{e.number}</span>
)} )}
+1 -1
View File
@@ -517,7 +517,7 @@ export default function TitleSheet({ item: initial, seed, onClose, onOpenPerson,
</button> </button>
)} )}
{hasEpisodeList ? ( {hasEpisodeList ? (
<EpisodeList form={shown} aired={aired} onChange={setEpisodes} /> <EpisodeList form={shown} aired={aired} onChange={setEpisodes} fallbackImage={heroImage} />
) : ( ) : (
<div className="card p-4"> <div className="card p-4">
<div className="flex items-center justify-between gap-3"> <div className="flex items-center justify-between gap-3">
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'حذف', 'common.delete': 'حذف',
'common.all': 'الكل', 'common.all': 'الكل',
'common.offline': 'لا يوجد اتصال بالإنترنت.', 'common.offline': 'لا يوجد اتصال بالإنترنت.',
'common.network': "تعذّر الوصول إلى الخادم. حاول مرة أخرى بعد قليل.",
'common.minutes': '{n} د', 'common.minutes': '{n} د',
'common.hours': '{h} س', 'common.hours': '{h} س',
'common.hoursMinutes': '{h} س {m} د', 'common.hoursMinutes': '{h} س {m} د',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'Löschen', 'common.delete': 'Löschen',
'common.all': 'Alle', 'common.all': 'Alle',
'common.offline': 'Keine Internetverbindung.', 'common.offline': 'Keine Internetverbindung.',
'common.network': "Der Server ist nicht erreichbar. Versuch es gleich noch einmal.",
'common.minutes': '{n} Min.', 'common.minutes': '{n} Min.',
'common.hours': '{h} Std.', 'common.hours': '{h} Std.',
'common.hoursMinutes': '{h} Std. {m} Min.', 'common.hoursMinutes': '{h} Std. {m} Min.',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'Delete', 'common.delete': 'Delete',
'common.all': 'All', 'common.all': 'All',
'common.offline': 'No internet connection.', 'common.offline': 'No internet connection.',
'common.network': "Couldn't reach the server. Try again in a moment.",
'common.minutes': '{n} min', 'common.minutes': '{n} min',
'common.hours': '{h} h', 'common.hours': '{h} h',
'common.hoursMinutes': '{h} h {m}', 'common.hoursMinutes': '{h} h {m}',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'Eliminar', 'common.delete': 'Eliminar',
'common.all': 'Todo', 'common.all': 'Todo',
'common.offline': 'Sin conexión a internet.', 'common.offline': 'Sin conexión a internet.',
'common.network': "No se pudo conectar con el servidor. Inténtalo de nuevo en un momento.",
'common.minutes': '{n} min', 'common.minutes': '{n} min',
'common.hours': '{h} h', 'common.hours': '{h} h',
'common.hoursMinutes': '{h} h {m}', 'common.hoursMinutes': '{h} h {m}',
+1
View File
@@ -14,6 +14,7 @@ const dict = {
'common.delete': 'Supprimer', 'common.delete': 'Supprimer',
'common.all': 'Tout', 'common.all': 'Tout',
'common.offline': 'Pas de connexion internet.', 'common.offline': 'Pas de connexion internet.',
'common.network': "Impossible de joindre le serveur. Réessaie dans un instant.",
'common.minutes': '{n} min', 'common.minutes': '{n} min',
'common.hours': '{h} h', 'common.hours': '{h} h',
'common.hoursMinutes': '{h} h {m}', 'common.hoursMinutes': '{h} h {m}',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'डिलीट करें', 'common.delete': 'डिलीट करें',
'common.all': 'सभी', 'common.all': 'सभी',
'common.offline': 'इंटरनेट कनेक्शन नहीं है।', 'common.offline': 'इंटरनेट कनेक्शन नहीं है।',
'common.network': "सर्वर से कनेक्ट नहीं हो सका। थोड़ी देर में फिर से कोशिश करें।",
'common.minutes': '{n} मिनट', 'common.minutes': '{n} मिनट',
'common.hours': '{h} घं', 'common.hours': '{h} घं',
'common.hoursMinutes': '{h} घं {m}', 'common.hoursMinutes': '{h} घं {m}',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'Hapus', 'common.delete': 'Hapus',
'common.all': 'Semua', 'common.all': 'Semua',
'common.offline': 'Tidak ada koneksi internet.', 'common.offline': 'Tidak ada koneksi internet.',
'common.network': "Tidak dapat menghubungi server. Coba lagi sebentar lagi.",
'common.minutes': '{n} mnt', 'common.minutes': '{n} mnt',
'common.hours': '{h} j', 'common.hours': '{h} j',
'common.hoursMinutes': '{h} j {m} mnt', 'common.hoursMinutes': '{h} j {m} mnt',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'Elimina', 'common.delete': 'Elimina',
'common.all': 'Tutto', 'common.all': 'Tutto',
'common.offline': 'Nessuna connessione internet.', 'common.offline': 'Nessuna connessione internet.',
'common.network': "Impossibile raggiungere il server. Riprova tra un momento.",
'common.minutes': '{n} min', 'common.minutes': '{n} min',
'common.hours': '{h} h', 'common.hours': '{h} h',
'common.hoursMinutes': '{h} h {m}', 'common.hoursMinutes': '{h} h {m}',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': '削除', 'common.delete': '削除',
'common.all': 'すべて', 'common.all': 'すべて',
'common.offline': 'インターネットに接続されていません。', 'common.offline': 'インターネットに接続されていません。',
'common.network': "サーバーに接続できませんでした。少し待ってからもう一度お試しください。",
'common.minutes': '{n}分', 'common.minutes': '{n}分',
'common.hours': '{h}時間', 'common.hours': '{h}時間',
'common.hoursMinutes': '{h}時間{m}分', 'common.hoursMinutes': '{h}時間{m}分',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': '삭제', 'common.delete': '삭제',
'common.all': '전체', 'common.all': '전체',
'common.offline': '인터넷에 연결되어 있지 않아요.', 'common.offline': '인터넷에 연결되어 있지 않아요.',
'common.network': "서버에 연결할 수 없어요. 잠시 후 다시 시도해 주세요.",
'common.minutes': '{n}분', 'common.minutes': '{n}분',
'common.hours': '{h}시간', 'common.hours': '{h}시간',
'common.hoursMinutes': '{h}시간 {m}분', 'common.hoursMinutes': '{h}시간 {m}분',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'Verwijderen', 'common.delete': 'Verwijderen',
'common.all': 'Alles', 'common.all': 'Alles',
'common.offline': 'Geen internetverbinding.', 'common.offline': 'Geen internetverbinding.',
'common.network': "De server is niet bereikbaar. Probeer het zo meteen opnieuw.",
'common.minutes': '{n} min', 'common.minutes': '{n} min',
'common.hours': '{h} u', 'common.hours': '{h} u',
'common.hoursMinutes': '{h} u {m}', 'common.hoursMinutes': '{h} u {m}',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'Usuń', 'common.delete': 'Usuń',
'common.all': 'Wszystko', 'common.all': 'Wszystko',
'common.offline': 'Brak połączenia z internetem.', 'common.offline': 'Brak połączenia z internetem.',
'common.network': "Nie udało się połączyć z serwerem. Spróbuj ponownie za chwilę.",
'common.minutes': '{n} min', 'common.minutes': '{n} min',
'common.hours': '{h} godz.', 'common.hours': '{h} godz.',
'common.hoursMinutes': '{h} godz. {m} min', 'common.hoursMinutes': '{h} godz. {m} min',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'Excluir', 'common.delete': 'Excluir',
'common.all': 'Tudo', 'common.all': 'Tudo',
'common.offline': 'Sem conexão com a internet.', 'common.offline': 'Sem conexão com a internet.',
'common.network': "Não foi possível contactar o servidor. Tenta novamente daqui a pouco.",
'common.minutes': '{n} min', 'common.minutes': '{n} min',
'common.hours': '{h} h', 'common.hours': '{h} h',
'common.hoursMinutes': '{h} h {m}', 'common.hoursMinutes': '{h} h {m}',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'Удалить', 'common.delete': 'Удалить',
'common.all': 'Все', 'common.all': 'Все',
'common.offline': 'Нет подключения к интернету.', 'common.offline': 'Нет подключения к интернету.',
'common.network': "Не удалось связаться с сервером. Попробуй ещё раз чуть позже.",
'common.minutes': '{n} мин', 'common.minutes': '{n} мин',
'common.hours': '{h} ч', 'common.hours': '{h} ч',
'common.hoursMinutes': '{h} ч {m}', 'common.hoursMinutes': '{h} ч {m}',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'ลบ', 'common.delete': 'ลบ',
'common.all': 'ทั้งหมด', 'common.all': 'ทั้งหมด',
'common.offline': 'ไม่มีการเชื่อมต่ออินเทอร์เน็ต', 'common.offline': 'ไม่มีการเชื่อมต่ออินเทอร์เน็ต',
'common.network': "ติดต่อเซิร์ฟเวอร์ไม่ได้ ลองใหม่อีกครั้งในอีกสักครู่",
'common.minutes': '{n} นาที', 'common.minutes': '{n} นาที',
'common.hours': '{h} ชม.', 'common.hours': '{h} ชม.',
'common.hoursMinutes': '{h} ชม. {m} นาที', 'common.hoursMinutes': '{h} ชม. {m} นาที',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'Sil', 'common.delete': 'Sil',
'common.all': 'Tümü', 'common.all': 'Tümü',
'common.offline': 'İnternet bağlantısı yok.', 'common.offline': 'İnternet bağlantısı yok.',
'common.network': "Sunucuya ulaşılamadı. Birazdan tekrar dene.",
'common.minutes': '{n} dk', 'common.minutes': '{n} dk',
'common.hours': '{h} sa', 'common.hours': '{h} sa',
'common.hoursMinutes': '{h} sa {m}', 'common.hoursMinutes': '{h} sa {m}',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': 'Xóa', 'common.delete': 'Xóa',
'common.all': 'Tất cả', 'common.all': 'Tất cả',
'common.offline': 'Không có kết nối internet.', 'common.offline': 'Không có kết nối internet.',
'common.network': "Không thể kết nối tới máy chủ. Hãy thử lại sau giây lát.",
'common.minutes': '{n} phút', 'common.minutes': '{n} phút',
'common.hours': '{h} giờ', 'common.hours': '{h} giờ',
'common.hoursMinutes': '{h} giờ {m}', 'common.hoursMinutes': '{h} giờ {m}',
+1
View File
@@ -12,6 +12,7 @@ const dict: Translations = {
'common.delete': '删除', 'common.delete': '删除',
'common.all': '全部', 'common.all': '全部',
'common.offline': '没有网络连接。', 'common.offline': '没有网络连接。',
'common.network': "无法连接服务器,请稍后再试。",
'common.minutes': '{n}分钟', 'common.minutes': '{n}分钟',
'common.hours': '{h}小时', 'common.hours': '{h}小时',
'common.hoursMinutes': '{h}小时{m}分', 'common.hoursMinutes': '{h}小时{m}分',
+12 -1
View File
@@ -4,6 +4,17 @@ import type { ThemeMode } from '../types'
/** Version de l'app (package.json). */ /** Version de l'app (package.json). */
export const APP_VERSION = __APP_VERSION__ export const APP_VERSION = __APP_VERSION__
/** Date de cette version, courte (« 29/11 12:10 ») : pour voir d'un coup d'œil si l'appareil est à jour. */
export function buildLabel(): string {
const d = new Date(__APP_BUILD__)
if (Number.isNaN(d.getTime())) return ''
try {
return new Intl.DateTimeFormat(getLang(), { day: '2-digit', month: '2-digit', hour: '2-digit', minute: '2-digit' }).format(d)
} catch {
return d.toISOString().slice(0, 16).replace('T', ' ')
}
}
/** Navigateur et système, en clair et sans détail identifiant (« Chrome 129 », « Android 14 »). */ /** Navigateur et système, en clair et sans détail identifiant (« Chrome 129 », « Android 14 »). */
export function browserInfo(ua = navigator.userAgent): { browser: string; os: string } { export function browserInfo(ua = navigator.userAgent): { browser: string; os: string } {
const m = (re: RegExp) => ua.match(re)?.[1]?.split('.')[0] const m = (re: RegExp) => ua.match(re)?.[1]?.split('.')[0]
@@ -47,7 +58,7 @@ export function techInfo(theme: ThemeMode): Record<string, string> {
const { browser, os } = browserInfo() const { browser, os } = browserInfo()
const standalone = window.matchMedia?.('(display-mode: standalone)').matches || (navigator as { standalone?: boolean }).standalone === true const standalone = window.matchMedia?.('(display-mode: standalone)').matches || (navigator as { standalone?: boolean }).standalone === true
return { return {
version: APP_VERSION, version: `${APP_VERSION} (${buildLabel()})`,
browser, browser,
os, os,
lang: getLang(), lang: getLang(),
+1 -1
View File
@@ -48,7 +48,7 @@ function fingerprint(source: ErrorSource, message: string, stack: string): strin
/** Erreurs sans intérêt (réseau coupé, extensions du navigateur, bruit connu des navigateurs). */ /** Erreurs sans intérêt (réseau coupé, extensions du navigateur, bruit connu des navigateurs). */
function isNoise(message: string, stack: string): boolean { function isNoise(message: string, stack: string): boolean {
if (!message || message === 'Script error.' || message === 'Script error') return true if (!message || message === 'Script error.' || message === 'Script error') return true
if (/ResizeObserver loop|AbortError|The operation was aborted|NetworkError when attempting|Failed to fetch$|Load failed$|cancelled|annulé/i.test(message)) return true if (/ResizeObserver loop|AbortError|The operation was aborted|^NetworkError|NetworkError when attempting|Failed to fetch$|Load failed$|cancelled|annulé/i.test(message)) return true
if (/(chrome|moz|safari(-web)?)-extension:\/\//.test(stack)) return true if (/(chrome|moz|safari(-web)?)-extension:\/\//.test(stack)) return true
return false return false
} }
+2 -6
View File
@@ -199,12 +199,8 @@ export function convertLegacyBackup(data: LegacyFile): { items: MediaItem[]; ski
endDate, endDate,
genres, genres,
tags: tags.length ? tags : undefined, tags: tags.length ? tags : undefined,
notes: cleanText( // Seul le commentaire devient l'avis (public) : le réalisateur est déjà affiché sur la fiche (TMDB)
[cleanText(r.comment, LIMITS.notes), cleanText(r.director, LIMITS.shortText) ? `Réalisation : ${cleanText(r.director, LIMITS.shortText)}` : ''] notes: cleanText(r.comment, LIMITS.notes),
.filter(Boolean)
.join('\n\n'),
LIMITS.notes,
),
poster: isSafeTmdbPath(r.poster_path) ? `https://image.tmdb.org/t/p/w342${r.poster_path}` : undefined, poster: isSafeTmdbPath(r.poster_path) ? `https://image.tmdb.org/t/p/w342${r.poster_path}` : undefined,
overview: cleanText(r.overview, LIMITS.overview), overview: cleanText(r.overview, LIMITS.overview),
externalId: (() => { externalId: (() => {
+24
View File
@@ -0,0 +1,24 @@
import { t } from '../i18n'
/**
* Demande réseau qui n'aboutit pas (serveur injoignable, connexion coupée, réponse refusée par le navigateur).
* Le navigateur donne un texte brut en anglais, différent partout (« Load failed » sur iPhone, « Failed to fetch »
* sur Chrome…) : on le remplace par un message traduit. Reste une TypeError, comme l'erreur d'origine.
*/
export class NetworkError extends TypeError {
constructor(cause: unknown) {
super(navigator.onLine ? t('common.network') : t('common.offline'), { cause })
this.name = 'NetworkError'
}
}
/** À appeler une fois au démarrage : toutes les demandes de l'app passent par fetch. */
export function installFriendlyNetworkErrors(): void {
const native = window.fetch.bind(window)
window.fetch = ((input: RequestInfo | URL, init?: RequestInit) =>
native(input, init).catch((e: unknown) => {
// Seules les erreurs réseau (TypeError) sont traduites : une annulation (AbortError, délai dépassé) reste telle quelle
if (e instanceof TypeError && !(e instanceof NetworkError)) throw new NetworkError(e)
throw e
})) as typeof fetch
}
+1 -2
View File
@@ -254,8 +254,7 @@ export async function renderItemCard(item: MediaItem, credits?: CardCredits): Pr
} else if (!episodic && minutes) { } else if (!episodic && minutes) {
rows.push([t('form.duration'), t('share.minutesLong', { n: minutes })]) rows.push([t('form.duration'), t('share.minutesLong', { n: minutes })])
} }
const notesDirector = item.notes?.match(/Réalisation\s*:\s*(.+)/)?.[1] const directors = credits?.directors ?? []
const directors = credits?.directors.length ? credits.directors : notesDirector ? [notesDirector.trim()] : []
if (directors.length) rows.push([episodic ? t('share.createdBy') : t('share.directedBy'), directors.join(' · ')]) if (directors.length) rows.push([episodic ? t('share.createdBy') : t('share.directedBy'), directors.join(' · ')])
if (credits?.producers.length) rows.push([t('share.producedBy'), credits.producers.join(' · ')]) if (credits?.producers.length) rows.push([t('share.producedBy'), credits.producers.join(' · ')])
if (credits?.cast.length) rows.push([t('share.starring'), credits.cast.join(' · ')]) if (credits?.cast.length) rows.push([t('share.starring'), credits.cast.join(' · ')])
+3
View File
@@ -8,6 +8,7 @@ import Root from './Root'
import { applySavedTheme } from './lib/theme' import { applySavedTheme } from './lib/theme'
import ErrorBoundary from './components/ErrorBoundary' import ErrorBoundary from './components/ErrorBoundary'
import { installErrorReporting } from './lib/errorReporter' import { installErrorReporting } from './lib/errorReporter'
import { installFriendlyNetworkErrors } from './lib/netErrors'
// Police embarquée dans l'app (Epilogue, variable) : aucun appel à Google Fonts, fonctionne hors-ligne // Police embarquée dans l'app (Epilogue, variable) : aucun appel à Google Fonts, fonctionne hors-ligne
import '@fontsource-variable/epilogue/wght.css' import '@fontsource-variable/epilogue/wght.css'
import './index.css' import './index.css'
@@ -17,6 +18,8 @@ applySavedTheme()
// Remontée des erreurs (sans donnée perso) : à brancher avant tout le reste // Remontée des erreurs (sans donnée perso) : à brancher avant tout le reste
installErrorReporting() installErrorReporting()
// Erreurs réseau : message traduit au lieu du texte brut du navigateur (« Load failed »…)
installFriendlyNetworkErrors()
// Service worker : cache l'app pour un fonctionnement hors-ligne et la met à jour automatiquement. // Service worker : cache l'app pour un fonctionnement hors-ligne et la met à jour automatiquement.
registerSW({ immediate: true }) registerSW({ immediate: true })
+5 -1
View File
@@ -14,6 +14,7 @@ import { cx } from '../lib/utils'
import { useMedia } from '../store' import { useMedia } from '../store'
import { BugReportRow } from '../components/moderation/BugReport' import { BugReportRow } from '../components/moderation/BugReport'
import { alertsSummary, useAdminAlerts } from '../components/moderation/useAdminAlerts' import { alertsSummary, useAdminAlerts } from '../components/moderation/useAdminAlerts'
import { APP_VERSION, buildLabel } from '../lib/appInfo'
type Message = { kind: 'ok' | 'error'; text: string } type Message = { kind: 'ok' | 'error'; text: string }
@@ -295,7 +296,10 @@ export default function SettingsPage({ onOpenAdmin }: { onOpenAdmin: () => void
</div> </div>
<p className="mt-3 px-1 text-[11px] leading-relaxed text-ink-3">{t('legal.tmdb')}</p> <p className="mt-3 px-1 text-[11px] leading-relaxed text-ink-3">{t('legal.tmdb')}</p>
<p className="mt-10 text-center text-xs text-ink-3">Bobinoo v2.2 · {account ? t('settings.footerCloud') : t('settings.footerLocal')}</p> {/* Date de la version : permet de voir d'un coup d'œil si l'appareil est à jour */}
<p className="mt-10 text-center text-xs text-ink-3">
Bobinoo v{APP_VERSION.split('.').slice(0, 2).join('.')} · {buildLabel()} · {account ? t('settings.footerCloud') : t('settings.footerLocal')}
</p>
<ConfirmDialog <ConfirmDialog
open={confirm === 'reset'} open={confirm === 'reset'}
+2
View File
@@ -15,3 +15,5 @@ interface ImportMeta {
/** Version de l'app (package.json), injectée par vite.config.ts */ /** Version de l'app (package.json), injectée par vite.config.ts */
declare const __APP_VERSION__: string declare const __APP_VERSION__: string
/** Date de construction de cette version (ISO) : permet de voir si l'appareil est à jour */
declare const __APP_BUILD__: string
+1 -1
View File
@@ -77,7 +77,7 @@ export default defineConfig(({ mode }) => {
return { return {
base: '/', base: '/',
// Version de l'app (package.json, fournie par « npm run … »), affichée dans « Signaler un bug » et jointe aux erreurs remontées // Version de l'app (package.json, fournie par « npm run … »), affichée dans « Signaler un bug » et jointe aux erreurs remontées
define: { __APP_VERSION__: JSON.stringify(full.npm_package_version || 'dev') }, define: { __APP_VERSION__: JSON.stringify(full.npm_package_version || 'dev'), __APP_BUILD__: JSON.stringify(new Date().toISOString()) },
// Le serveur de dev n'écoute que sur ce PC (voir « npm run dev:mobile » pour tester sur le téléphone) // Le serveur de dev n'écoute que sur ce PC (voir « npm run dev:mobile » pour tester sur le téléphone)
server: { host: 'localhost', strictPort: false }, server: { host: 'localhost', strictPort: false },
preview: { host: 'localhost' }, preview: { host: 'localhost' },