From 3998d65694b36daf2d1dcddcf66509f1324caac2 Mon Sep 17 00:00:00 2001 From: Froidefond Julien Date: Sun, 29 Mar 2026 18:03:38 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20aligner=20la=20page=20livre=20sur=20le?= =?UTF-8?q?=20layout=20de=20la=20page=20s=C3=A9rie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Cover w-48 → w-40 (cohérent avec la page série) - Titre séparé, auteur + série + statut de lecture regroupés en badges - Métadonnées (format, pages, langue, ISBN, date) en ligne texte au lieu de pills (style série) - Toolbar d'actions groupée en bas (Edit, MarkRead, Convert, Delete) - Tous les boutons d'action (MarkBookRead, Convert, Delete) alignés en py-1.5 au lieu de Button size=sm (h-9) Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/backoffice/app/(app)/books/[id]/page.tsx | 73 ++++++++----------- .../app/components/ConvertButton.tsx | 8 +- .../app/components/DeleteBookButton.tsx | 10 +-- .../app/components/MarkBookReadButton.tsx | 16 ++-- 4 files changed, 48 insertions(+), 59 deletions(-) diff --git a/apps/backoffice/app/(app)/books/[id]/page.tsx b/apps/backoffice/app/(app)/books/[id]/page.tsx index 3721e86..2ccca37 100644 --- a/apps/backoffice/app/(app)/books/[id]/page.tsx +++ b/apps/backoffice/app/(app)/books/[id]/page.tsx @@ -94,13 +94,13 @@ export default async function BookDetailPage({
{/* Cover */}
-
+
{t("bookDetail.coverOf",
@@ -108,36 +108,24 @@ export default async function BookDetailPage({ {/* Info */}
-
-
-

{book.title}

- {book.author && ( -

{book.author}

- )} -
- -
+ {/* Title */} +

{book.title}

- {/* Series + Volume link */} - {book.series && ( -
+ {/* Author + Series + Volume + Reading status badges */} +
+ {book.author && ( +

{book.author}

+ )} + {book.series && ( {book.series} + {book.volume != null && Vol. {book.volume}} - {book.volume != null && ( - - Vol. {book.volume} - - )} -
- )} - - {/* Reading status + actions */} -
- + )} + {statusLabel} {book.reading_status === "reading" && book.reading_current_page != null && ` · p. ${book.reading_current_page}`} @@ -146,35 +134,24 @@ export default async function BookDetailPage({ {new Date(book.reading_last_read_at).toLocaleDateString(locale)} )} - - {book.file_format === "cbr" && } -
- {/* Metadata pills */} -
- + {/* Metadata stats */} +
+ {formatBadge} {book.page_count && ( - - {book.page_count} {t("dashboard.pages").toLowerCase()} - + {book.page_count} {t("dashboard.pages").toLowerCase()} )} {book.language && ( - - {book.language.toUpperCase()} - + {book.language.toUpperCase()} )} {book.isbn && ( - - ISBN {book.isbn} - + ISBN {book.isbn} )} {book.publish_date && ( - - {book.publish_date} - + {book.publish_date} )}
@@ -182,6 +159,14 @@ export default async function BookDetailPage({ {book.summary && ( )} + + {/* Action buttons toolbar */} +
+ + + {book.file_format === "cbr" && } + +
diff --git a/apps/backoffice/app/components/ConvertButton.tsx b/apps/backoffice/app/components/ConvertButton.tsx index 1130274..74cb05e 100644 --- a/apps/backoffice/app/components/ConvertButton.tsx +++ b/apps/backoffice/app/components/ConvertButton.tsx @@ -61,13 +61,13 @@ export function ConvertButton({ bookId }: ConvertButtonProps) { } return ( - + ); } diff --git a/apps/backoffice/app/components/DeleteBookButton.tsx b/apps/backoffice/app/components/DeleteBookButton.tsx index d1dd475..5a0501b 100644 --- a/apps/backoffice/app/components/DeleteBookButton.tsx +++ b/apps/backoffice/app/components/DeleteBookButton.tsx @@ -26,15 +26,15 @@ export function DeleteBookButton({ bookId, libraryId }: { bookId: string; librar return ( <> - + {t("bookDetail.delete")} + setShowConfirm(false)} maxWidth="sm">
diff --git a/apps/backoffice/app/components/MarkBookReadButton.tsx b/apps/backoffice/app/components/MarkBookReadButton.tsx index 548aa0a..9df8fd1 100644 --- a/apps/backoffice/app/components/MarkBookReadButton.tsx +++ b/apps/backoffice/app/components/MarkBookReadButton.tsx @@ -40,11 +40,15 @@ export function MarkBookReadButton({ bookId, currentStatus }: MarkBookReadButton }; return ( - + ); }