mirror of
https://github.com/immich-app/immich.git
synced 2025-07-03 21:40:00 +02:00
feat(web): improve and refactor thumbnails (#2087)
* feat(web): improve and refactor thumbnails * only play live photos on icon hover
This commit is contained in:
parent
cae37657e9
commit
4e526dfaae
11 changed files with 321 additions and 330 deletions
web/src/lib/components/assets/thumbnail
|
@ -0,0 +1,19 @@
|
|||
<script lang="ts">
|
||||
export let url: string;
|
||||
export let altText: string;
|
||||
export let heightStyle: string;
|
||||
export let widthStyle: string;
|
||||
|
||||
let loading = true;
|
||||
</script>
|
||||
|
||||
<img
|
||||
style:width={widthStyle}
|
||||
style:height={heightStyle}
|
||||
src={url}
|
||||
alt={altText}
|
||||
class="object-cover transition-opacity duration-300"
|
||||
class:opacity-0={loading}
|
||||
draggable="false"
|
||||
on:load|once={() => (loading = false)}
|
||||
/>
|
Loading…
Add table
Add a link
Reference in a new issue