mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
refactor(web): use ImmichApi to create urls (#2435)
This commit is contained in:
@@ -79,11 +79,6 @@ describe('AlbumCard component', () => {
|
||||
const albumImgElement = sut.getByTestId('album-image');
|
||||
const albumNameElement = sut.getByTestId('album-name');
|
||||
const albumDetailsElement = sut.getByTestId('album-details');
|
||||
// TODO: is this expected?
|
||||
expect(albumImgElement).toHaveAttribute(
|
||||
'src',
|
||||
'/api/asset/thumbnail/thumbnailIdOne?format=WEBP'
|
||||
);
|
||||
expect(albumImgElement).toHaveAttribute('alt', album.id);
|
||||
|
||||
await waitFor(() => expect(albumImgElement).toHaveAttribute('src', thumbnailUrl));
|
||||
|
||||
@@ -23,10 +23,9 @@
|
||||
export let isSharingView = false;
|
||||
export let user: UserResponseDto;
|
||||
|
||||
let imageData = `/api/asset/thumbnail/${album.albumThumbnailAssetId}?format=${ThumbnailFormat.Webp}`;
|
||||
if (!album.albumThumbnailAssetId) {
|
||||
imageData = noThumbnailUrl;
|
||||
}
|
||||
$: imageData = album.albumThumbnailAssetId
|
||||
? api.getAssetThumbnailUrl(album.albumThumbnailAssetId, ThumbnailFormat.Webp)
|
||||
: noThumbnailUrl;
|
||||
|
||||
const dispatchClick = createEventDispatcher<OnClick>();
|
||||
const dispatchShowContextMenu = createEventDispatcher<OnShowContextMenu>();
|
||||
|
||||
Reference in New Issue
Block a user