diff --git a/tauri-app/src/lib/components/ChartHistogram.svelte b/tauri-app/src/lib/components/ChartHistogram.svelte index 627a4bd6a..89bfb1f8d 100644 --- a/tauri-app/src/lib/components/ChartHistogram.svelte +++ b/tauri-app/src/lib/components/ChartHistogram.svelte @@ -8,6 +8,7 @@ export let data: {value: number, time: UTCTimestamp, color?: string}[] = []; export let loading = false; export let emptyMessage = "None found" + export let title: string | undefined = undefined; const TIME_DELTA_24_HOURS = 60 * 60 * 24; const TIME_DELTA_7_DAYS = TIME_DELTA_24_HOURS * 7; @@ -73,19 +74,28 @@
- {#if data.length > 0 || loading} -
- {#if loading} - - {/if} - - (timeDelta = TIME_DELTA_1_YEAR)} active={timeDelta === TIME_DELTA_1_YEAR} size="xs" class="px-2 py-1">1 Year - (timeDelta = TIME_DELTA_30_DAYS)} active={timeDelta === TIME_DELTA_30_DAYS} size="xs" class="px-2 py-1">30 Days - (timeDelta = TIME_DELTA_7_DAYS)} active={timeDelta === TIME_DELTA_7_DAYS} size="xs" class="px-2 py-1">7 Days - (timeDelta = TIME_DELTA_24_HOURS)} active={timeDelta === TIME_DELTA_24_HOURS} size="xs" class="px-2 py-1">24 Hours - -
- {:else} -
{emptyMessage}
- {/if} + +
+ {#if title !== undefined} +
{title}
+ {/if} + + {#if data.length === 0 && !loading} +
{emptyMessage}
+ {/if} +
+ +
+ {#if loading} + + {/if} + {#if data.length > 0} + + (timeDelta = TIME_DELTA_1_YEAR)} active={timeDelta === TIME_DELTA_1_YEAR} size="xs" class="px-2 py-1">1 Year + (timeDelta = TIME_DELTA_30_DAYS)} active={timeDelta === TIME_DELTA_30_DAYS} size="xs" class="px-2 py-1">30 Days + (timeDelta = TIME_DELTA_7_DAYS)} active={timeDelta === TIME_DELTA_7_DAYS} size="xs" class="px-2 py-1">7 Days + (timeDelta = TIME_DELTA_24_HOURS)} active={timeDelta === TIME_DELTA_24_HOURS} size="xs" class="px-2 py-1">24 Hours + + {/if} +
\ No newline at end of file diff --git a/tauri-app/src/routes/vaults/[id]/+page.svelte b/tauri-app/src/routes/vaults/[id]/+page.svelte index 1c255ba32..f4fdf51c7 100644 --- a/tauri-app/src/routes/vaults/[id]/+page.svelte +++ b/tauri-app/src/routes/vaults/[id]/+page.svelte @@ -62,7 +62,7 @@ {#if vault === undefined}
Vault not found
{:else} -
+
@@ -115,10 +115,10 @@ {/if} - +
-
+
Deposits & Withdrawals