Merge pull request #1718 from booklore-app/develop

Merge develop into master for release
This commit is contained in:
Aditya Chandel
2025-12-01 20:03:52 -07:00
committed by GitHub
7 changed files with 21 additions and 14 deletions
@@ -234,3 +234,7 @@
::ng-deep .custom-button-padding .p-button { ::ng-deep .custom-button-padding .p-button {
padding-block: 0.25rem !important; padding-block: 0.25rem !important;
} }
::ng-deep .book-details-dialog .p-dialog-header {
padding: 1rem 1.25rem !important;
}
@@ -495,11 +495,16 @@ export class BookCardComponent implements OnInit, OnChanges, OnDestroy {
}); });
} else { } else {
this.dialogService.open(BookMetadataCenterComponent, { this.dialogService.open(BookMetadataCenterComponent, {
width: '85%', width: '90%',
data: {bookId: book.id}, data: {bookId: book.id},
modal: true, modal: true,
dismissableMask: true, dismissableMask: false,
showHeader: false showHeader: true,
closable: true,
closeOnEscape: true,
maximizable: true,
header: 'Book Details',
styleClass: 'book-details-dialog'
}); });
} }
} }
@@ -89,11 +89,11 @@ function getRatingRangeFilters10(rating?: number): { id: string; name: string; s
return idx ? [{id: idx.id, name: idx.label, sortIndex: idx.sortIndex}] : []; return idx ? [{id: idx.id, name: idx.label, sortIndex: idx.sortIndex}] : [];
} }
function extractPublishedYearFilter(book: Book): { id: number; name: string }[] { function extractPublishedYearFilter(book: Book): { id: string; name: string }[] {
const date = book.metadata?.publishedDate; const date = book.metadata?.publishedDate;
if (!date) return []; if (!date) return [];
const year = new Date(date).getFullYear(); const year = new Date(date).getFullYear();
return [{id: year, name: year.toString()}]; return [{id: year.toString(), name: year.toString()}];
} }
function getShelfStatusFilter(book: Book): { id: string; name: string }[] { function getShelfStatusFilter(book: Book): { id: string; name: string }[] {
@@ -14,7 +14,7 @@ export class FilterLabelHelper {
publisher: 'Publisher', publisher: 'Publisher',
readStatus: 'Read Status', readStatus: 'Read Status',
personalRating: 'Personal Rating', personalRating: 'Personal Rating',
publishedYear: 'Year Published', publishedDate: 'Year Published',
matchScore: 'Metadata Match Score', matchScore: 'Metadata Match Score',
language: 'Language', language: 'Language',
bookType: 'Book Type', bookType: 'Book Type',
@@ -93,13 +93,11 @@ export class SideBarFilter implements BookFilter {
return filterValues.some(range => isRatingInRange(book.metadata?.hardcoverRating, range)); return filterValues.some(range => isRatingInRange(book.metadata?.hardcoverRating, range));
case 'personalRating': case 'personalRating':
return filterValues.some(range => isRatingInRange10(book.metadata?.personalRating, range)); return filterValues.some(range => isRatingInRange10(book.metadata?.personalRating, range));
case 'publishedYear':
const bookYear = book.metadata?.publishedDate
? new Date(book.metadata.publishedDate).getFullYear().toString()
: null;
return bookYear ? filterValues.includes(bookYear) : false;
case 'publishedDate': case 'publishedDate':
return filterValues.includes(new Date(book.metadata?.publishedDate || '').getFullYear()); const bookYear = book.metadata?.publishedDate
? new Date(book.metadata.publishedDate).getFullYear()
: null;
return bookYear ? filterValues.some(val => val == bookYear || val == bookYear.toString()) : false;
case 'fileSize': case 'fileSize':
return filterValues.some(range => isFileSizeInRange(book.fileSizeKb, range)); return filterValues.some(range => isFileSizeInRange(book.fileSizeKb, range));
case 'shelfStatus': case 'shelfStatus':
@@ -587,7 +587,7 @@ export class MetadataViewerComponent implements OnInit, OnChanges {
goToPublishedYear(publishedDate: string): void { goToPublishedYear(publishedDate: string): void {
const year = this.extractYear(publishedDate); const year = this.extractYear(publishedDate);
if (year) { if (year) {
this.handleMetadataClick('publishedYear', year); this.handleMetadataClick('publishedDate', year);
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
services: services:
backend: backend:
image: gradle:9-jdk25-alpine image: gradle:8-jdk21-alpine
command: sh -c "cd /booklore-api && ./gradlew bootRun" command: sh -c "cd /booklore-api && ./gradlew bootRun"
ports: ports:
- "${BACKEND_PORT:-8080}:8080" - "${BACKEND_PORT:-8080}:8080"