fix(web): album date range formatting

This commit is contained in:
Mees Frensel
2026-05-22 16:35:52 +02:00
parent 7b9dab872b
commit 54c1fbebde
4 changed files with 100 additions and 105 deletions
@@ -3,15 +3,18 @@
import type { AlbumResponseDto } from '@immich/sdk';
import { t } from 'svelte-i18n';
interface Props {
type Props = {
album: AlbumResponseDto;
}
};
let { album }: Props = $props();
const { album }: Props = $props();
const startDate = album.startDate;
</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>
{#if startDate}
<span>{getAlbumDateRange(startDate, album.endDate ?? startDate)}</span>
<span></span>
{/if}
<span>{$t('items_count', { values: { count: album.assetCount } })}</span>
</span>