feat: lazy loading on album/sharing/search (#5696)

* feat(frontend): Lazy loading on album

* feat(frontend): Lazy loading on search & sharing

Issue #5418
This commit is contained in:
Po-Ru, Lin 2023-12-15 00:48:29 +08:00 committed by GitHub
parent 9bb6befc92
commit 8e39d389b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 6 deletions

View file

@ -14,6 +14,7 @@
export let isSharingView = false;
export let showItemCount = true;
export let showContextMenu = true;
export let preload = false;
let showVerticalDots = false;
$: imageData = album.albumThumbnailAssetId
@ -83,6 +84,7 @@
<div class={`relative aspect-square`}>
<img
loading={preload ? 'eager' : 'lazy'}
src={imageData}
alt={album.id}
class={`z-0 h-full w-full rounded-3xl object-cover transition-all duration-300 hover:shadow-lg`}