mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): Show full date when hovering over photos date groups (#21462)
This commit is contained in:
parent
b76d69c0e5
commit
bbc1c8186c
1 changed files with 13 additions and 1 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue