Bring back metadata search button. Phew..
This commit is contained in:
+36
-19
@@ -1,21 +1,38 @@
|
||||
<div *ngIf="!isLoading && bookMetadataList.length > 0" class="metadata-list">
|
||||
<div *ngFor="let metadata of bookMetadataList" class="book-metadata">
|
||||
<div class="metadata-header">
|
||||
<div class="book-image-container">
|
||||
<img class="book-image" src="{{ metadata.thumbnail }}" alt="Book Cover" />
|
||||
<p-button class="select-button" (click)="selectMetadata(metadata)">Select</p-button>
|
||||
</div>
|
||||
<div>
|
||||
<h3>
|
||||
{{ metadata.title }}<span *ngIf="metadata.subtitle">: {{ metadata.subtitle }}</span>
|
||||
</h3>
|
||||
<p><strong>Authors:</strong> {{ metadata.authors.join(', ') || 'No authors available' }}</p>
|
||||
<p><strong>Publisher:</strong> {{ metadata.publisher }}</p>
|
||||
<p><strong>Published Date:</strong> {{ metadata.publishedDate }}</p>
|
||||
<p><strong>ISBN:</strong> {{ metadata.isbn10 }}</p>
|
||||
<p><strong>Description:</strong> {{ truncateDescription(metadata.description) }}</p>
|
||||
<p><strong>Page Count:</strong> {{ metadata.pageCount }}</p>
|
||||
</div>
|
||||
<div *ngIf="!isLoading && bookMetadataList.length > 0" class="search-container">
|
||||
<div class="input-group">
|
||||
<input type="text" [(ngModel)]="searchText" placeholder="Enter book title"/>
|
||||
<p-button severity="success" (click)="populateTitle()">Search</p-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="isLoading" class="loading">
|
||||
Loading metadata...
|
||||
</div>
|
||||
|
||||
<div *ngIf="errorMessage" class="error">
|
||||
{{ errorMessage }}
|
||||
</div>
|
||||
|
||||
<div *ngIf="!isLoading && bookMetadataList.length > 0" class="metadata-list">
|
||||
<div *ngFor="let metadata of bookMetadataList" class="book-metadata">
|
||||
<div class="metadata-header">
|
||||
<div class="book-image-container">
|
||||
<img class="book-image" src="{{ metadata.thumbnail }}" alt="Book Cover"/>
|
||||
<p-button class="select-button" (click)="selectMetadata(metadata)">Select</p-button>
|
||||
</div>
|
||||
<div>
|
||||
<h3>{{ metadata.title }}<span *ngIf="metadata.subtitle">: {{ metadata.subtitle }}</span></h3>
|
||||
<p><strong>Authors:</strong> {{ metadata.authors.join(', ') || 'No authors available' }}</p>
|
||||
<p><strong>Publisher:</strong> {{ metadata.publisher }}</p>
|
||||
<p><strong>Published Date:</strong> {{ metadata.publishedDate }}</p>
|
||||
<p><strong>ISBN:</strong> {{ metadata.isbn10 }}</p>
|
||||
<p><strong>Description:</strong> {{ truncateDescription(metadata.description) }}</p>
|
||||
<p><strong>Page Count:</strong> {{ metadata.pageCount }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="!isLoading && bookMetadataList.length === 0" class="no-metadata">
|
||||
No metadata found for this book.
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user