mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat(web): improve shared link management on mobile (#11720)
* feat(web): improve shared link management on mobile * fix format
This commit is contained in:
parent
9837d60074
commit
276101ee82
15 changed files with 174 additions and 121 deletions
|
|
@ -19,7 +19,7 @@ describe('AlbumCover component', () => {
|
|||
const img = component.getByTestId('album-image') as HTMLImageElement;
|
||||
expect(img.alt).toBe('someName');
|
||||
expect(img.getAttribute('loading')).toBe('lazy');
|
||||
expect(img.className).toBe('z-0 rounded-xl object-cover text');
|
||||
expect(img.className).toBe('z-0 rounded-xl object-cover aspect-square text');
|
||||
expect(img.getAttribute('src')).toBe('/asdf');
|
||||
expect(getAssetThumbnailUrl).toHaveBeenCalledWith({ id: '123' });
|
||||
});
|
||||
|
|
@ -36,7 +36,7 @@ describe('AlbumCover component', () => {
|
|||
const img = component.getByTestId('album-image') as HTMLImageElement;
|
||||
expect(img.alt).toBe('unnamed_album');
|
||||
expect(img.getAttribute('loading')).toBe('eager');
|
||||
expect(img.className).toBe('z-0 rounded-xl object-cover asdf');
|
||||
expect(img.className).toBe('z-0 rounded-xl object-cover aspect-square asdf');
|
||||
expect(img.getAttribute('src')).toStrictEqual(expect.any(String));
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,10 +14,8 @@
|
|||
$: thumbnailUrl = album.albumThumbnailAssetId ? getAssetThumbnailUrl({ id: album.albumThumbnailAssetId }) : null;
|
||||
</script>
|
||||
|
||||
<div class="relative aspect-square">
|
||||
{#if thumbnailUrl}
|
||||
<AssetCover {alt} class={className} src={thumbnailUrl} {preload} />
|
||||
{:else}
|
||||
<NoCover {alt} class={className} {preload} />
|
||||
{/if}
|
||||
</div>
|
||||
{#if thumbnailUrl}
|
||||
<AssetCover {alt} class={className} src={thumbnailUrl} {preload} />
|
||||
{:else}
|
||||
<NoCover {alt} class={className} {preload} />
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue