diff --git a/web/src/lib/components/photos-page/asset-date-group.svelte b/web/src/lib/components/photos-page/asset-date-group.svelte index f5f0d72d91..065732c096 100644 --- a/web/src/lib/components/photos-page/asset-date-group.svelte +++ b/web/src/lib/components/photos-page/asset-date-group.svelte @@ -14,6 +14,7 @@ } from '$lib/stores/asset-interaction.store'; import { locale } from '$lib/stores/preferences.store'; import Thumbnail from '../assets/thumbnail/thumbnail.svelte'; + import { flip } from 'svelte/animate'; export let assets: AssetResponseDto[]; export let bucketDate: string; @@ -107,12 +108,17 @@ // Show multi select icon on hover on date group hoveredDateGroup = dateGroupTitle; }; + + let clientWidth = 0; + +
{#each assetsGroupByDate as assetsInDateGroup, groupIndex (assetsInDateGroup[0].id)} {@const dateGroupTitle = new Date(assetsInDateGroup[0].fileCreatedAt).toLocaleDateString( @@ -122,6 +128,7 @@
{ isMouseOverGroup = true; @@ -131,7 +138,7 @@ >

{#if (hoveredDateGroup == dateGroupTitle && isMouseOverGroup) || $selectedGroup.has(dateGroupTitle)}

{#each assetsInDateGroup as asset (asset.id)} - assetClickHandler(asset, assetsInDateGroup, dateGroupTitle)} - on:select={() => assetSelectHandler(asset, assetsInDateGroup, dateGroupTitle)} - on:mouse-event={() => assetMouseEventHandler(dateGroupTitle)} - selected={$selectedAssets.has(asset) || - $assetsInAlbumStoreState.findIndex((a) => a.id == asset.id) != -1} - disabled={$assetsInAlbumStoreState.findIndex((a) => a.id == asset.id) != -1} - /> +
+ assetClickHandler(asset, assetsInDateGroup, dateGroupTitle)} + on:select={() => assetSelectHandler(asset, assetsInDateGroup, dateGroupTitle)} + on:mouse-event={() => assetMouseEventHandler(dateGroupTitle)} + selected={$selectedAssets.has(asset) || + $assetsInAlbumStoreState.findIndex((a) => a.id == asset.id) != -1} + disabled={$assetsInAlbumStoreState.findIndex((a) => a.id == asset.id) != -1} + /> +
{/each}