- 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$.subscribe(entity => {
|
||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
|
this.entityOptions = this.libraryShelfMenuService.initializeLibraryMenuItems(entity);
|
||||||
this.setSelectedSortFromEntity(entity);
|
this.setSelectedSortFromEntity(entity);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -112,7 +113,6 @@ export class BookBrowserComponent implements OnInit {
|
|||||||
|
|
||||||
private fetchEntity(entityId: number, entityType: EntityType): Observable<Library | Shelf | null> {
|
private fetchEntity(entityId: number, entityType: EntityType): Observable<Library | Shelf | null> {
|
||||||
if (entityType == EntityType.LIBRARY) {
|
if (entityType == EntityType.LIBRARY) {
|
||||||
this.libraryShelfMenuService.initializeLibraryMenuItems(this.entity);
|
|
||||||
return this.fetchLibrary(entityId);
|
return this.fetchLibrary(entityId);
|
||||||
} else if (EntityType.SHELF) {
|
} else if (EntityType.SHELF) {
|
||||||
this.libraryShelfMenuService.initializeLibraryMenuItems(this.entity);
|
this.libraryShelfMenuService.initializeLibraryMenuItems(this.entity);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<div class="book-metadata-container">
|
<div class="book-metadata-container">
|
||||||
<div class="book-metadata">
|
<div class="book-metadata">
|
||||||
<div class="book-header">
|
<div class="book-header">
|
||||||
<div class="cover-container">
|
<div>
|
||||||
<div class="cover-wrapper">
|
<div class="cover-wrapper cover-container">
|
||||||
<img [src]="coverImageSrc(book?.id)" class="book-cover placeholder" alt="Cover of {{ book?.metadata?.title }}" loading="lazy"/>
|
<img [src]="coverImageSrc(book?.id)" class="book-cover placeholder" alt="Cover of {{ book?.metadata?.title }}" loading="lazy"/>
|
||||||
<div class="overlay" (click)="readBook(book!)">
|
<div class="overlay" (click)="readBook(book!)">
|
||||||
<p-button icon="pi pi-book" [rounded]="true"></p-button>
|
<p-button icon="pi pi-book" [rounded]="true"></p-button>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cover-container:hover .book-cover {
|
.cover-container:hover .book-cover {
|
||||||
filter: blur(2px);
|
filter: blur(1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.overlay {
|
.overlay {
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ export class BookMetadataComponent implements OnInit, OnDestroy {
|
|||||||
this.dialogRef = this.dialogService.open(BookMetadataDialogComponent, {
|
this.dialogRef = this.dialogService.open(BookMetadataDialogComponent, {
|
||||||
header: 'Metadata: Google Books',
|
header: 'Metadata: Google Books',
|
||||||
modal: true,
|
modal: true,
|
||||||
|
closable: true,
|
||||||
width: '65%',
|
width: '65%',
|
||||||
height: '85%',
|
height: '85%',
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ export class LibraryShelfMenuService {
|
|||||||
this.confirmationService.confirm({
|
this.confirmationService.confirm({
|
||||||
message: `Are you sure you want to delete library: ${entity?.name}?`,
|
message: `Are you sure you want to delete library: ${entity?.name}?`,
|
||||||
header: 'Confirmation',
|
header: 'Confirmation',
|
||||||
|
rejectButtonProps: {
|
||||||
|
label: 'Cancel',
|
||||||
|
},
|
||||||
accept: () => {
|
accept: () => {
|
||||||
this.libraryService.deleteLibrary(entity?.id!).subscribe({
|
this.libraryService.deleteLibrary(entity?.id!).subscribe({
|
||||||
complete: () => {
|
complete: () => {
|
||||||
@@ -55,6 +58,9 @@ export class LibraryShelfMenuService {
|
|||||||
this.confirmationService.confirm({
|
this.confirmationService.confirm({
|
||||||
message: `Are you sure you want to refresh library: ${entity?.name}?`,
|
message: `Are you sure you want to refresh library: ${entity?.name}?`,
|
||||||
header: 'Confirmation',
|
header: 'Confirmation',
|
||||||
|
rejectButtonProps: {
|
||||||
|
label: 'Cancel',
|
||||||
|
},
|
||||||
accept: () => {
|
accept: () => {
|
||||||
this.libraryService.refreshLibrary(entity?.id!).subscribe({
|
this.libraryService.refreshLibrary(entity?.id!).subscribe({
|
||||||
complete: () => {
|
complete: () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user