mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat(web): show assets without thumbs (#2561)
* feat(web): show assets without thumbnails * chore: open api
This commit is contained in:
parent
d827a6182b
commit
1613ae9185
10 changed files with 86 additions and 19 deletions
|
|
@ -10,6 +10,7 @@
|
|||
import ArchiveArrowDownOutline from 'svelte-material-icons/ArchiveArrowDownOutline.svelte';
|
||||
import ImageThumbnail from './image-thumbnail.svelte';
|
||||
import VideoThumbnail from './video-thumbnail.svelte';
|
||||
import ImageBrokenVariant from 'svelte-material-icons/ImageBrokenVariant.svelte';
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
|
|
@ -101,7 +102,7 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
class="bg-gray-100 dark:bg-immich-dark-gray absolute select-none transition-transform"
|
||||
class="h-full w-full bg-gray-100 dark:bg-immich-dark-gray absolute select-none transition-transform"
|
||||
class:scale-[0.85]={selected}
|
||||
>
|
||||
<!-- Gradient overlay on hover -->
|
||||
|
|
@ -121,12 +122,19 @@
|
|||
<ArchiveArrowDownOutline size="24" class="text-white" />
|
||||
</div>
|
||||
{/if}
|
||||
<ImageThumbnail
|
||||
url={api.getAssetThumbnailUrl(asset.id, format, publicSharedKey)}
|
||||
altText={asset.originalFileName}
|
||||
widthStyle="{width}px"
|
||||
heightStyle="{height}px"
|
||||
/>
|
||||
|
||||
{#if asset.resizePath}
|
||||
<ImageThumbnail
|
||||
url={api.getAssetThumbnailUrl(asset.id, format, publicSharedKey)}
|
||||
altText={asset.originalFileName}
|
||||
widthStyle="{width}px"
|
||||
heightStyle="{height}px"
|
||||
/>
|
||||
{:else}
|
||||
<div class="w-full h-full p-4 flex items-center justify-center">
|
||||
<ImageBrokenVariant size="48" />
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if asset.type === AssetTypeEnum.Video}
|
||||
<div class="absolute w-full h-full top-0">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue