From c945c95e1789b89c9f27b50b428220da7fa3078a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sz=C3=BCcs?= <127139797+balazs-szucs@users.noreply.github.com> Date: Tue, 9 Dec 2025 21:25:26 +0100 Subject: [PATCH] fix(book-card): indicate collapse series number on the library tooltip (#1800) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Balázs Szücs --- .../book-browser/book-browser.component.html | 31 ++++++++++++------- .../book-card/book-card.component.html | 4 +-- .../book-card/book-card.component.scss | 12 ++++--- 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/booklore-ui/src/app/features/book/components/book-browser/book-browser.component.html b/booklore-ui/src/app/features/book/components/book-browser/book-browser.component.html index 1c5a228d0..b62c3eb7d 100644 --- a/booklore-ui/src/app/features/book/components/book-browser/book-browser.component.html +++ b/booklore-ui/src/app/features/book/components/book-browser/book-browser.component.html @@ -4,21 +4,28 @@
@if (entityType$ | async; as entityType) { -

- @if (entityType === EntityType.ALL_BOOKS) { - @if (currentFilterLabel && rawFilterParamFromUrl) { - {{ currentFilterLabel }} - } @else if (isFilterActive || hasSearchTerm) { - {{ computedFilterLabel }} +

+

+ @if (entityType === EntityType.ALL_BOOKS) { + @if (currentFilterLabel && rawFilterParamFromUrl) { + {{ currentFilterLabel }} + } @else if (isFilterActive || hasSearchTerm) { + {{ computedFilterLabel }} + } @else { + All Books + } + } @else if (entityType === EntityType.UNSHELVED) { + {{ (isFilterActive || hasSearchTerm) ? 'Unshelved Books (Filtered)' : 'Unshelved Books' }} } @else { - All Books + {{ entityType }}: {{ (entity$ | async)?.name }}{{ (isFilterActive || hasSearchTerm) ? ' (Filtered)' : '' }} } - } @else if (entityType === EntityType.UNSHELVED) { - {{ (isFilterActive || hasSearchTerm) ? 'Unshelved Books (Filtered)' : 'Unshelved Books' }} - } @else { - {{ entityType }}: {{ (entity$ | async)?.name }}{{ (isFilterActive || hasSearchTerm) ? ' (Filtered)' : '' }} +

+ @if (seriesCollapseFilter.isSeriesCollapsed && (bookState$ | async)?.books; as books) { +

+ Showing {{ books.length }} {{ books.length === 1 ? 'item' : 'items' }} (series collapsed) +

} -

+
@if (userService.userState$ | async; as userState) { @if (entityType !== EntityType.ALL_BOOKS && entityType !== EntityType.UNSHELVED && 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 06dc11927..f8414191c 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 @@ -27,8 +27,8 @@ } @if (book.seriesCount && book.seriesCount! >= 1) { -
- {{ book.seriesCount }} +
+ {{ book.seriesCount }}
} diff --git a/booklore-ui/src/app/features/book/components/book-browser/book-card/book-card.component.scss b/booklore-ui/src/app/features/book/components/book-browser/book-card/book-card.component.scss index 665ffaaca..773da19dc 100644 --- a/booklore-ui/src/app/features/book/components/book-browser/book-card/book-card.component.scss +++ b/booklore-ui/src/app/features/book/components/book-browser/book-card/book-card.component.scss @@ -165,14 +165,18 @@ background-color: var(--primary-color); color: var(--primary-text-color-dark); font-size: 0.75rem; - padding: 1px 6px; - border-radius: 3px; + padding: 3px 8px; + border-radius: 4px; z-index: 3; white-space: nowrap; user-select: none; - font-weight: 600; + font-weight: 700; text-align: center; - box-shadow: 0 0 4px rgba(0, 0, 0, 0.15); + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); + border: 1px solid rgba(255, 255, 255, 0.2); + display: flex; + align-items: center; + gap: 2px; } .read-status-indicator {