- Fix shelf-library menu

- Fix blur on metadata component
This commit is contained in:
aditya.chandel
2024-12-30 22:33:11 -07:00
parent 0fe9139ddd
commit cf2a60fa80
5 changed files with 11 additions and 4 deletions

View File

@@ -83,6 +83,7 @@ export class BookBrowserComponent implements OnInit {
this.entity$.subscribe(entity => {
this.entity = entity;
this.entityOptions = this.libraryShelfMenuService.initializeLibraryMenuItems(entity);
this.setSelectedSortFromEntity(entity);
});
}
@@ -112,7 +113,6 @@ export class BookBrowserComponent implements OnInit {
private fetchEntity(entityId: number, entityType: EntityType): Observable<Library | Shelf | null> {
if (entityType == EntityType.LIBRARY) {
this.libraryShelfMenuService.initializeLibraryMenuItems(this.entity);
return this.fetchLibrary(entityId);
} else if (EntityType.SHELF) {
this.libraryShelfMenuService.initializeLibraryMenuItems(this.entity);

View File

@@ -1,8 +1,8 @@
<div class="book-metadata-container">
<div class="book-metadata">
<div class="book-header">
<div class="cover-container">
<div class="cover-wrapper">
<div>
<div class="cover-wrapper cover-container">
<img [src]="coverImageSrc(book?.id)" class="book-cover placeholder" alt="Cover of {{ book?.metadata?.title }}" loading="lazy"/>
<div class="overlay" (click)="readBook(book!)">
<p-button icon="pi pi-book" [rounded]="true"></p-button>

View File

@@ -34,7 +34,7 @@
}
.cover-container:hover .book-cover {
filter: blur(2px);
filter: blur(1px);
}
.overlay {

View File

@@ -79,6 +79,7 @@ export class BookMetadataComponent implements OnInit, OnDestroy {
this.dialogRef = this.dialogService.open(BookMetadataDialogComponent, {
header: 'Metadata: Google Books',
modal: true,
closable: true,
width: '65%',
height: '85%',
data: {

View File

@@ -30,6 +30,9 @@ export class LibraryShelfMenuService {
this.confirmationService.confirm({
message: `Are you sure you want to delete library: ${entity?.name}?`,
header: 'Confirmation',
rejectButtonProps: {
label: 'Cancel',
},
accept: () => {
this.libraryService.deleteLibrary(entity?.id!).subscribe({
complete: () => {
@@ -55,6 +58,9 @@ export class LibraryShelfMenuService {
this.confirmationService.confirm({
message: `Are you sure you want to refresh library: ${entity?.name}?`,
header: 'Confirmation',
rejectButtonProps: {
label: 'Cancel',
},
accept: () => {
this.libraryService.refreshLibrary(entity?.id!).subscribe({
complete: () => {