diff --git a/booklore-ui/src/app/book/components/book-browser/book-browser.component.ts b/booklore-ui/src/app/book/components/book-browser/book-browser.component.ts index b191541a4..133c73253 100644 --- a/booklore-ui/src/app/book/components/book-browser/book-browser.component.ts +++ b/booklore-ui/src/app/book/components/book-browser/book-browser.component.ts @@ -127,6 +127,8 @@ export class BookBrowserComponent implements OnInit, AfterViewInit { {label: 'Amazon #', icon: '', field: 'amazonReviewCount', command: () => this.sortBooks('amazonReviewCount')}, {label: 'Goodreads Rating', icon: '', field: 'goodreadsRating', command: () => this.sortBooks('goodreadsRating')}, {label: 'Goodreads #', icon: '', field: 'goodreadsReviewCount', command: () => this.sortBooks('goodreadsReviewCount')}, + {label: 'Hardcover Rating', icon: '', field: 'hardcoverRating', command: () => this.sortBooks('hardcoverRating')}, + {label: 'Hardcover #', icon: '', field: 'hardcoverReviewCount', command: () => this.sortBooks('hardcoverReviewCount')}, {label: 'Pages', icon: '', field: 'pageCount', command: () => this.sortBooks('pageCount')} ]; diff --git a/booklore-ui/src/app/book/components/book-browser/book-table/book-table.component.html b/booklore-ui/src/app/book/components/book-browser/book-table/book-table.component.html index b30fd35f8..865f1a96d 100644 --- a/booklore-ui/src/app/book/components/book-browser/book-table/book-table.component.html +++ b/booklore-ui/src/app/book/components/book-browser/book-table/book-table.component.html @@ -34,8 +34,8 @@ Amz # Goodreads GR # - Rating (L) - Reviews (L) + Hardcover + HC # @@ -109,15 +109,15 @@ + [style.--p-rating-icon-active-color]="getStarColor(metadata.hardcoverRating)"> - ({{ metadata.rating?.toFixed(1) }}) + ({{ metadata.hardcoverRating?.toFixed(1) }}) - {{ metadata.reviewCount }} + {{ metadata.hardcoverReviewCount }} diff --git a/booklore-ui/src/app/book/service/sort.service.ts b/booklore-ui/src/app/book/service/sort.service.ts index 4bb52316e..0b22d61bd 100644 --- a/booklore-ui/src/app/book/service/sort.service.ts +++ b/booklore-ui/src/app/book/service/sort.service.ts @@ -28,6 +28,8 @@ export class SortService { amazonReviewCount: (book) => book.metadata?.amazonReviewCount || null, goodreadsRating: (book) => book.metadata?.goodreadsRating || null, goodreadsReviewCount: (book) => book.metadata?.goodreadsReviewCount || null, + hardcoverRating: (book) => book.metadata?.hardcoverRating || null, + hardcoverReviewCount: (book) => book.metadata?.hardcoverReviewCount || null, locked: (book) => Object.keys(book.metadata ?? {}) .filter((key) => key.endsWith('Locked')) diff --git a/booklore-ui/src/app/settings/view-preferences-parent/view-preferences/view-preferences.component.ts b/booklore-ui/src/app/settings/view-preferences-parent/view-preferences/view-preferences.component.ts index f4c46b1a3..57c1825b6 100644 --- a/booklore-ui/src/app/settings/view-preferences-parent/view-preferences/view-preferences.component.ts +++ b/booklore-ui/src/app/settings/view-preferences-parent/view-preferences/view-preferences.component.ts @@ -43,6 +43,8 @@ export class ViewPreferencesComponent implements OnInit { {label: 'Amazon #', field: 'amazonReviewCount'}, {label: 'Goodreads Rating', field: 'goodreadsRating'}, {label: 'Goodreads #', field: 'goodreadsReviewCount'}, + {label: 'Hardcover Rating', field: 'hardcoverRating'}, + {label: 'Hardcover #', field: 'hardcoverReviewCount'}, {label: 'Pages', field: 'pageCount'} ];