From 78f60f0c60c5023b39e99f05b73ad7dd9018c003 Mon Sep 17 00:00:00 2001
From: ACX <8075870+acx10@users.noreply.github.com>
Date: Tue, 17 Feb 2026 21:46:36 -0700
Subject: [PATCH] Add visual polish to book card component (#2788)
---
.../book-card/book-card.component.html | 7 +++-
.../book-card/book-card.component.scss | 37 +++++++++++++++++--
.../book-card/book-card.component.ts | 36 ++++++++++++++++++
booklore-ui/src/i18n/en/book.json | 3 +-
booklore-ui/src/i18n/es/book.json | 3 +-
5 files changed, 78 insertions(+), 8 deletions(-)
diff --git a/booklore-ui/src/app/features/book/components/book-browser/book-card/book-card.component.html b/booklore-ui/src/app/features/book/components/book-browser/book-card/book-card.component.html
index 703543d28..7df34472d 100644
--- a/booklore-ui/src/app/features/book/components/book-browser/book-card/book-card.component.html
+++ b/booklore-ui/src/app/features/book/components/book-browser/book-card/book-card.component.html
@@ -39,7 +39,10 @@
}
@if (!_isSeriesViewActive && hasDigitalFile()) {
-
+
}
@if (isCheckboxEnabled) {
@@ -53,7 +56,7 @@
}
@if (hasProgress) {
-
+
@if (_progressPercentage !== null) {
();
@@ -177,6 +180,31 @@ export class BookCardComponent implements OnInit, OnChanges, OnDestroy {
this._seriesCountTooltip = this.t.translate('book.card.alt.seriesCollapsed', { count: this.book.seriesCount });
this._titleTooltip = this.t.translate('book.card.alt.titleTooltip', { title: this._displayTitle });
+
+ const progressParts: string[] = [];
+ if (this._progressPercentage !== null) {
+ progressParts.push(`${this._progressPercentage}% (BookLore)`);
+ }
+ if (this._koProgressPercentage !== null) {
+ progressParts.push(`${this._koProgressPercentage}% (KOReader)`);
+ }
+ if (this._koboProgressPercentage !== null) {
+ progressParts.push(`${this._koboProgressPercentage}% (Kobo)`);
+ }
+ this._progressTooltip = progressParts.join(' | ');
+
+ const maxProgress = Math.max(
+ this._progressPercentage ?? 0,
+ this._koProgressPercentage ?? 0,
+ this._koboProgressPercentage ?? 0
+ );
+ this._isContinueReading = maxProgress > 0 && maxProgress < 100;
+
+ if (this._isAudiobook) {
+ this._readButtonIcon = this._isContinueReading ? 'pi pi-forward' : 'pi pi-play';
+ } else {
+ this._readButtonIcon = this._isContinueReading ? 'pi pi-forward' : 'pi pi-book';
+ }
}
get hasProgress(): boolean {
@@ -195,6 +223,14 @@ export class BookCardComponent implements OnInit, OnChanges, OnDestroy {
return this._readStatusTooltip;
}
+ get progressTooltip(): string {
+ return this._progressTooltip;
+ }
+
+ get readButtonIcon(): string {
+ return this._readButtonIcon;
+ }
+
get displayTitle(): string | undefined {
return this._displayTitle;
}
diff --git a/booklore-ui/src/i18n/en/book.json b/booklore-ui/src/i18n/en/book.json
index 8dd2f6ced..53550251f 100644
--- a/booklore-ui/src/i18n/en/book.json
+++ b/booklore-ui/src/i18n/en/book.json
@@ -133,7 +133,8 @@
"viewDetails": "View book details",
"readBook": "Read book",
"playAudiobook": "Play audiobook",
- "bookMenu": "Book actions menu"
+ "bookMenu": "Book actions menu",
+ "continueReading": "Continue reading"
}
},
"notes": {
diff --git a/booklore-ui/src/i18n/es/book.json b/booklore-ui/src/i18n/es/book.json
index 2ace9fabd..e7d395176 100644
--- a/booklore-ui/src/i18n/es/book.json
+++ b/booklore-ui/src/i18n/es/book.json
@@ -133,7 +133,8 @@
"viewDetails": "Ver detalles del libro",
"readBook": "Leer libro",
"playAudiobook": "Reproducir audiolibro",
- "bookMenu": "MenĂº de acciones del libro"
+ "bookMenu": "MenĂº de acciones del libro",
+ "continueReading": "Continuar leyendo"
}
},
"notes": {