1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-01 08:31:59 +00:00

fix(web): Fix year label calculation (#5211)

* fix(web): revert, fix year label overlapse

* not too bold

* fix
This commit is contained in:
Alex 2023-11-20 20:58:05 -06:00 committed by GitHub
parent 8b966a0f15
commit d49b353c49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,8 +42,8 @@
segment.timeGroup = bucket.bucketDate;
segment.date = fromLocalDateTime(segment.timeGroup);
if (prev?.date.year !== segment.date.year && (!prev || height > MIN_YEAR_LABEL_DISTANCE)) {
segment.hasLabel = true;
if (prev && prev!.date.year !== segment.date.year && height > MIN_YEAR_LABEL_DISTANCE) {
prev.hasLabel = true;
height = 0;
}
@ -134,7 +134,7 @@
{#if segment.hasLabel}
<div
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}
</div>