Automatically detect and set book subtitle from title field (#1146)

This commit is contained in:
Aditya Chandel
2025-09-13 20:26:32 -06:00
committed by GitHub
parent a82d7b45d7
commit 308b710a56
7 changed files with 30 additions and 11 deletions
@@ -42,6 +42,7 @@ export class MetadataPickerComponent implements OnInit {
metadataFieldsTop = [
{label: 'Title', controlName: 'title', lockedKey: 'titleLocked', fetchedKey: 'title'},
{label: 'Subtitle', controlName: 'subtitle', lockedKey: 'subtitleLocked', fetchedKey: 'subtitle'},
{label: 'Publisher', controlName: 'publisher', lockedKey: 'publisherLocked', fetchedKey: 'publisher'},
{label: 'Published', controlName: 'publishedDate', lockedKey: 'publishedDateLocked', fetchedKey: 'publishedDate'}
];
@@ -69,7 +69,7 @@
<div class="flex flex-col items-center md:items-start gap-1">
<div class="flex items-center gap-2 justify-center md:justify-start flex-wrap text-center md:text-left">
<h2 class="text-2xl md:text-3xl font-extrabold leading-tight">
{{ book?.metadata!.title }}
{{ book?.metadata?.title }}@if (book?.metadata?.subtitle) {: {{ book.metadata?.subtitle }}}
</h2>
<i
class="pi align-middle"
@@ -548,7 +548,7 @@
[horizontal]="true">
@for (book of recommendedBooks; track book.book.id) {
<div class="dashboard-scroller-card">
<app-book-card-lite-component [book]="book.book" ></app-book-card-lite-component>
<app-book-card-lite-component [book]="book.book"></app-book-card-lite-component>
</div>
}
</div>