From 95da3eb7a0ba340aa1791d89313b131406306e9b Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 2 Jun 2024 08:58:57 +0700 Subject: [PATCH] chore(web): timeline bucketing by day --- .../shared-components/scrollbar/scrollbar.svelte | 7 ++++++- web/src/lib/stores/assets.store.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/web/src/lib/components/shared-components/scrollbar/scrollbar.svelte b/web/src/lib/components/shared-components/scrollbar/scrollbar.svelte index 16e53dd562..6876d1d059 100644 --- a/web/src/lib/components/shared-components/scrollbar/scrollbar.svelte +++ b/web/src/lib/components/shared-components/scrollbar/scrollbar.svelte @@ -43,6 +43,7 @@ public timeGroup = ''; public date!: DateTime; public hasLabel = false; + public hasDotIndicator = false; } const calculateSegments = (buckets: AssetBucket[]) => { @@ -60,6 +61,10 @@ height = 0; } + if (previous?.date.month !== segment.date.month) { + segment.hasDotIndicator = true; + } + height += segment.height; previous = segment; return segment; @@ -164,7 +169,7 @@ > {segment.date.year} - {:else if segment.height > 5} + {:else if segment.height > 5 && segment.hasDotIndicator}