mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 01:11:46 +03:00
fix(web): Show full date when hovering over photos date groups (#21462)
This commit is contained in:
@@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
import { flip } from 'svelte/animate';
|
import { flip } from 'svelte/animate';
|
||||||
import { fly, scale } from 'svelte/transition';
|
import { fly, scale } from 'svelte/transition';
|
||||||
|
import type { DayGroup } from '$lib/managers/timeline-manager/day-group.svelte';
|
||||||
|
import { fromTimelinePlainDate, getDateLocaleString } from '$lib/utils/timeline-util';
|
||||||
|
|
||||||
let { isUploading } = uploadAssetsStore;
|
let { isUploading } = uploadAssetsStore;
|
||||||
|
|
||||||
@@ -108,6 +110,16 @@
|
|||||||
return intersectable.filter((int) => int.intersecting);
|
return intersectable.filter((int) => int.intersecting);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getDayGroupFullDate = (dayGroup: DayGroup): string => {
|
||||||
|
const { month, year } = dayGroup.monthGroup.yearMonth;
|
||||||
|
const date = fromTimelinePlainDate({
|
||||||
|
year,
|
||||||
|
month,
|
||||||
|
day: dayGroup.day,
|
||||||
|
});
|
||||||
|
return getDateLocaleString(date);
|
||||||
|
};
|
||||||
|
|
||||||
$effect.root(() => {
|
$effect.root(() => {
|
||||||
if (timelineManager.scrollCompensation.monthGroup === monthGroup) {
|
if (timelineManager.scrollCompensation.monthGroup === monthGroup) {
|
||||||
onScrollCompensation(timelineManager.scrollCompensation);
|
onScrollCompensation(timelineManager.scrollCompensation);
|
||||||
@@ -157,7 +169,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<span class="w-full truncate first-letter:capitalize" title={dayGroup.groupTitle}>
|
<span class="w-full truncate first-letter:capitalize" title={getDayGroupFullDate(dayGroup)}>
|
||||||
{dayGroup.groupTitle}
|
{dayGroup.groupTitle}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user