From a9062e5c2c2bfb4f0c3f676aba84123f801806f8 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 17 Dec 2023 02:47:07 -0800 Subject: feat(activities): move to details --- src/lib/Tools/ActivityHistory.svelte | 39 +++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 16 deletions(-) (limited to 'src/lib') diff --git a/src/lib/Tools/ActivityHistory.svelte b/src/lib/Tools/ActivityHistory.svelte index bbadf6fb..6b1c73e1 100644 --- a/src/lib/Tools/ActivityHistory.svelte +++ b/src/lib/Tools/ActivityHistory.svelte @@ -18,6 +18,7 @@ let activityHistoryData: Promise; let currentUserIdentity = { name: '', id: -1 }; let baseHue = Math.floor(Math.random() * 360); + let generated = false; onMount(async () => { clearAllParameters(); @@ -67,6 +68,8 @@ gridFinal.innerHTML = ''; gridFinal.appendChild(downloadWrapper); + + generated = true; } downloadWrapper.click(); @@ -75,10 +78,6 @@ }; -
- Days in risk of developing an activity history hole. (days with one activity) -
- {#if user === undefined} Please log in to view this page. {:else} @@ -110,21 +109,29 @@
-

+ {#if generated} +

+ {/if}

Generate grid image

-
    - {#each fillMissingDays(activities) as activity} - {#if activity.amount === 0} -
  • - {new Date( - activity.date * 1000 + new Date().getTimezoneOffset() * 60 * 1000 - ).toDateString()} -
  • - {/if} - {/each} -
+
+ + Days in risk of developing an activity history hole. (days with one activity) + + +
    + {#each fillMissingDays(activities) as activity} + {#if activity.amount === 0} +
  • + {new Date( + activity.date * 1000 + new Date().getTimezoneOffset() * 60 * 1000 + ).toDateString()} +
  • + {/if} + {/each} +
+
{/if} {/await} {/if} -- cgit v1.2.3