Fiche : « Valider » aussi pour un titre déjà dans la bibliothèque, image du haut au format 16/9 sur téléphone
deploy / deploy (push) Successful in 39s
deploy / deploy (push) Successful in 39s
- Le bouton « Valider » s'affiche dès que la fiche est ouverte depuis la recherche, que le titre vienne d'être ajouté ou qu'il soit déjà dans la bibliothèque - Sur téléphone, l'image du haut garde son format 16/9 au lieu d'être recadrée (et agrandie) dans un cadre plus haut ; certaines images TMDB ne font que ~950 px de large et restaient floues Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
This commit is contained in:
2 files changed
+8
-8
No files matched your search
+1
-1
@@ -136,7 +136,7 @@ export default function App() {
|
||||
onGoToSettings={toSettings}
|
||||
onOpenPerson={openPerson}
|
||||
focus={l.item ? l.focus : undefined}
|
||||
onDone={backHome}
|
||||
onDone={adding ? backHome : undefined}
|
||||
/>
|
||||
) : (
|
||||
<PersonSheet
|
||||
|
||||
@@ -51,7 +51,7 @@ interface Props {
|
||||
onOpenPerson?: (p: { id: string; name?: string; photo?: string }) => void
|
||||
/** Ouverte après un +1 qui termine une saison (ou la série) : on amène l'utilisateur à la note */
|
||||
focus?: Completion
|
||||
/** « Valider » après un ajout depuis la recherche : ferme tout et revient à l'accueil */
|
||||
/** Fiche ouverte depuis la recherche : « Valider » ferme tout et revient à l'accueil */
|
||||
onDone?: () => void
|
||||
}
|
||||
|
||||
@@ -361,10 +361,10 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
<img
|
||||
src={tmdbSized(heroImage, 'w1280')}
|
||||
srcSet={backdropSrcSet(heroImage)}
|
||||
// Image en largeur 16/9 recadrée dans un cadre plus haut sur téléphone : il faut une image plus large que l'écran pour rester nette
|
||||
sizes="(orientation: portrait) 80vh, 100vw"
|
||||
sizes="100vw"
|
||||
alt=""
|
||||
className="hero-fade h-[42vh] min-h-56 w-full object-cover object-[center_25%] lg:h-[72vh] lg:max-h-[48rem]"
|
||||
// Téléphone : l'image garde son format 16/9 (avant, recadrée dans un cadre plus haut, elle était agrandie et floue)
|
||||
className="hero-fade aspect-video w-full object-cover object-[center_25%] lg:aspect-auto lg:h-[72vh] lg:max-h-[48rem]"
|
||||
/>
|
||||
) : (
|
||||
<div className="h-6" />
|
||||
@@ -649,8 +649,8 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Titre ajouté depuis la recherche : un seul geste pour tout fermer et revenir à l'accueil */}
|
||||
{seed && item && onDone && (
|
||||
{/* Fiche ouverte depuis la recherche (titre ajouté ou déjà dans ma bibliothèque) : un seul geste pour tout fermer */}
|
||||
{item && onDone && (
|
||||
<div className="safe-bottom border-t border-line bg-bg">
|
||||
<div className="mx-auto max-w-2xl px-4 py-3">
|
||||
<button onClick={onDone} className="btn btn-primary w-full">
|
||||
@@ -661,7 +661,7 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
)}
|
||||
|
||||
{toast && (
|
||||
<div role="status" className={cx('safe-bottom pointer-events-none fixed inset-x-0 z-[70] flex justify-center px-4', seed && item && onDone ? 'bottom-24' : 'bottom-4')}>
|
||||
<div role="status" className={cx('safe-bottom pointer-events-none fixed inset-x-0 z-[70] flex justify-center px-4', item && onDone ? 'bottom-24' : 'bottom-4')}>
|
||||
<span className="rounded-md bg-ink px-4 py-2 text-sm font-medium text-bg">{toast}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user