feat: show shared link view count

This commit is contained in:
Jason Rasmussen
2025-02-18 17:34:51 -05:00
parent 7bf142dc43
commit 8b0684ee9c
15 changed files with 89 additions and 33 deletions
@@ -4,14 +4,19 @@
import { t } from 'svelte-i18n';
interface Props {
viewCount?: number;
album: AlbumResponseDto;
}
let { album }: Props = $props();
let { album, viewCount }: Props = $props();
</script>
<span class="my-2 flex gap-2 text-sm font-medium text-gray-500" data-testid="album-details">
<span>{getAlbumDateRange(album)}</span>
<span></span>
<span>{$t('items_count', { values: { count: album.assetCount } })}</span>
{#if viewCount}
<span></span>
<span>{$t('views_count', { values: { count: viewCount } })}</span>
{/if}
</span>
@@ -111,7 +111,7 @@
</h1>
{#if album.assetCount > 0}
<AlbumSummary {album} />
<AlbumSummary {album} viewCount={sharedLink.viewCount} />
{/if}
<!-- ALBUM DESCRIPTION -->