Skip to content

Commit

Permalink
enable lazy loading for pictures past 10 in an album (#2633)
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria authored and aSouchereau committed Nov 9, 2024
1 parent 65f6c62 commit e944e9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/js/components/gallery/PhotoThumbPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
:is-selected="props.selectedPhotos.includes(photo.id)"
:photo="photo"
:album="props.album"
:is-lazy="idx > 10"
/>
</template>
</div>
Expand Down
2 changes: 2 additions & 0 deletions resources/js/components/gallery/thumbs/PhotoThumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"
data-overlay="false"
draggable="false"
:loading="props.isLazy ? 'lazy' : 'eager'"
/>
</span>
<div class="overlay w-full absolute bottom-0 m-0 bg-gradient-to-t from-[#00000066] text-shadow-sm" :class="cssOverlay">
Expand Down Expand Up @@ -57,6 +58,7 @@ import Constants from "@/services/constants";
const props = defineProps<{
isSelected: boolean;
isLazy: boolean;
album:
| App.Http.Resources.Models.AlbumResource
| App.Http.Resources.Models.TagAlbumResource
Expand Down

0 comments on commit e944e9d

Please sign in to comment.