mirror of
https://github.com/immich-app/immich.git
synced 2025-05-30 19:54:52 -04:00
fix(web): Fix year label calculation (#5211)
* fix(web): revert, fix year label overlapse * not too bold * fix
This commit is contained in:
parent
8b966a0f15
commit
d49b353c49
@ -42,8 +42,8 @@
|
|||||||
segment.timeGroup = bucket.bucketDate;
|
segment.timeGroup = bucket.bucketDate;
|
||||||
segment.date = fromLocalDateTime(segment.timeGroup);
|
segment.date = fromLocalDateTime(segment.timeGroup);
|
||||||
|
|
||||||
if (prev?.date.year !== segment.date.year && (!prev || height > MIN_YEAR_LABEL_DISTANCE)) {
|
if (prev && prev!.date.year !== segment.date.year && height > MIN_YEAR_LABEL_DISTANCE) {
|
||||||
segment.hasLabel = true;
|
prev.hasLabel = true;
|
||||||
height = 0;
|
height = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,7 +134,7 @@
|
|||||||
{#if segment.hasLabel}
|
{#if segment.hasLabel}
|
||||||
<div
|
<div
|
||||||
aria-label={segment.timeGroup + ' ' + segment.count}
|
aria-label={segment.timeGroup + ' ' + segment.count}
|
||||||
class="absolute right-0 bottom-0 z-10 pr-5 text-xs dark:text-immich-dark-fg font-immich-mono font-semibold"
|
class="absolute right-0 bottom-0 z-10 pr-5 text-[12px] dark:text-immich-dark-fg font-immich-mono"
|
||||||
>
|
>
|
||||||
{segment.date.year}
|
{segment.date.year}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user