添加图片预览api
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import { page } from '$app/state';
|
||||
import { getPhoto, getPhotoFileUrl, getAlbumPhotos } from '$lib/api/client';
|
||||
import { getPhoto, getPhotoFileUrl, getAlbumPhotos, getPhotoPreviewUrl } from '$lib/api/client';
|
||||
import { m, loading } from '$lib/paraglide/messages';
|
||||
|
||||
/** @type {import('$lib/api/types').Photo|null} */
|
||||
@@ -120,7 +120,7 @@
|
||||
<source src={getPhotoFileUrl(photo.id)} type={photo.mimeType} />
|
||||
</video>
|
||||
{:else}
|
||||
<img src={getPhotoFileUrl(photo.id)} alt={photo.fileName} />
|
||||
<img src={getPhotoPreviewUrl(photo.id)} alt={photo.fileName} />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user