From cd39c7457e91ea0037d487a9a207ce12c3348ac6 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 30 Nov 2026 17:43:13 +0000 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Read=20history=20and=20bal?= =?UTF-8?q?ance=20from=20SignalDB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closed weeks, closed days, the balance and the adjustments are derived from the synced collections instead of being loaded once on mount, so every change shows up without a reload. --- web/src/routes/history/+page.svelte | 101 +++++++++++----------------- 1 file changed, 40 insertions(+), 61 deletions(-) diff --git a/web/src/routes/history/+page.svelte b/web/src/routes/history/+page.svelte index 8168a95..4d63846 100644 --- a/web/src/routes/history/+page.svelte +++ b/web/src/routes/history/+page.svelte @@ -1,11 +1,18 @@ @@ -178,25 +162,20 @@

History

{#if error}

{error}

{/if} - {#if loading}

Loading…

{/if}
Overall balance - {#if summary !== null} - 0} class:negative={summary.total_delta_ms < 0}> - {formatDelta(summary.total_delta_ms)} - - - across {summary.closed_week_count} closed {summary.closed_week_count === 1 ? 'week' : 'weeks'} - {#if summary.adjustment_count > 0} - · {summary.adjustment_count} {summary.adjustment_count === 1 ? 'adjustment' : 'adjustments'} - (weeks {formatDelta(summary.weeks_delta_ms)}, adj {formatDelta(summary.adjustments_delta_ms)}) - {/if} - - {:else} - — - {/if} + 0} class:negative={summary.total_delta_ms < 0}> + {formatDelta(summary.total_delta_ms)} + + + across {summary.closed_week_count} closed {summary.closed_week_count === 1 ? 'week' : 'weeks'} + {#if summary.adjustment_count > 0} + · {summary.adjustment_count} {summary.adjustment_count === 1 ? 'adjustment' : 'adjustments'} + (weeks {formatDelta(summary.weeks_delta_ms)}, adj {formatDelta(summary.adjustments_delta_ms)}) + {/if} +