chore(ui): drop book and author animations (#270)

* chore(ui): drop book and author animations

* chore(ui): remove stale import
This commit is contained in:
Alex
2026-04-22 17:26:56 -04:00
committed by Zach Yale
parent 1799493ed7
commit 09c36dfa0b
9 changed files with 11 additions and 80 deletions
@@ -295,7 +295,7 @@
></app-book-table>
}
@if (currentViewMode === 'grid') {
<virtual-scroller class="virtual-scroller" #scroll [items]="books">
<virtual-scroller class="virtual-scroller" #scroll [items]="books" [bufferAmount]="16">
<div
class="grid"
#container
@@ -5,16 +5,14 @@
(click)="onCardClick($event)"
(keydown.enter)="onCardClick($event)">
<div class="cover-container" [ngClass]="{ 'center-info-btn': _isSeriesViewActive || !hasDigitalFile(), 'loaded': isImageLoaded, 'audiobook-cover': _isAudiobook, 'square-library-cover': useSquareCovers }">
<div class="cover-container" [ngClass]="{ 'center-info-btn': _isSeriesViewActive || !hasDigitalFile(), 'audiobook-cover': _isAudiobook, 'square-library-cover': useSquareCovers }">
<img
[src]="coverImageUrl"
class="book-cover"
[class.loaded]="isImageLoaded"
[class.square-cover]="_isAudiobook || useSquareCovers"
[alt]="('book.card.alt.cover' | transloco: { title: displayTitle })"
loading="lazy"
decoding="async"
(load)="onImageLoad()"/>
decoding="async"/>
<div class="top-left-overlay-stack">
@if ((overlayPreferenceService?.showBookTypePill() ?? true) && getDisplayFormat(); as displayFormat) {
@@ -19,16 +19,6 @@
}
}
@keyframes shimmer {
0% {
background-position: -200% 0;
}
100% {
background-position: 200% 0;
}
}
.cover-container {
position: relative;
width: 100%;
@@ -41,17 +31,6 @@
justify-content: center;
}
.cover-container:not(.loaded) {
background: linear-gradient(
90deg,
var(--surface-ground) 25%,
var(--surface-hover, rgb(255 255 255 / 8%)) 50%,
var(--surface-ground) 75%
);
background-size: 200% 100%;
animation: shimmer 1.5s ease-in-out infinite;
}
.cover-container.audiobook-cover {
aspect-ratio: 5/7;
background-color: var(--surface-ground);
@@ -66,15 +45,10 @@
width: 100%;
height: 100%;
border-radius: 8px 8px 0 0;
opacity: 0;
transition: opacity 0.2s ease-in, transform 0.35s ease;
transition: transform 0.35s ease;
}
.book-cover.loaded {
opacity: 1;
}
.book-card:hover .book-cover.loaded {
.book-card:hover .book-cover {
transform: scale(1.04);
}
@@ -55,10 +55,8 @@ export class BookCardComponent implements OnInit, OnChanges {
@Input() useSquareCovers: boolean = false;
@ViewChild('checkboxElem') checkboxElem!: ElementRef<HTMLInputElement>;
items: MenuItem[] | undefined;
readStatusMenuItems: MenuItem[] = [];
isImageLoaded: boolean = false;
isSubMenuLoading = false;
private additionalFilesLoaded = false;
@@ -254,10 +252,6 @@ export class BookCardComponent implements OnInit, OnChanges {
menu.toggle(event);
}
onImageLoad(): void {
this.isImageLoaded = true;
this.cdr.markForCheck();
}
readBook(book: Book): void {
if (this.forceEbookMode && book.primaryFile?.bookType === 'AUDIOBOOK') {