feat: show shared link view count
This commit is contained in:
@@ -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 -->
|
||||
|
||||
Reference in New Issue
Block a user