feat(web): make assets cachable (#1724)

This commit is contained in:
Michel Heusschen 2023-02-10 23:01:35 +01:00 committed by GitHub
parent 74cd3d66c6
commit d91cc3616b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 91 additions and 82 deletions

View file

@ -1,13 +1,14 @@
<script lang="ts">
import { AlbumResponseDto, api, ThumbnailFormat, UserResponseDto } from '@api';
import { fade } from 'svelte/transition';
import noThumbnailUrl from '$lib/assets/no-thumbnail.png';
export let album: AlbumResponseDto;
export let user: UserResponseDto;
const loadImageData = async (thubmnailId: string | null) => {
if (thubmnailId == null) {
return '/no-thumbnail.png';
return noThumbnailUrl;
}
const { data } = await api.assetApi.getAssetThumbnail(thubmnailId, ThumbnailFormat.Webp, {