mirror of
https://github.com/booklore-app/booklore.git
synced 2025-12-23 22:28:11 -05:00
- Fix shelf-library menu
- Fix blur on metadata component
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
.cover-container:hover .book-cover {
|
||||
filter: blur(2px);
|
||||
filter: blur(1px);
|
||||
}
|
||||
|
||||
.overlay {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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: () => {
|
||||
|
||||
Reference in New Issue
Block a user