From ff9265645cdb7b8dcbdf3f81826b18982e3c1cce Mon Sep 17 00:00:00 2001 From: Dilan Gilluly Date: Sat, 27 Jun 2026 22:43:17 -0400 Subject: [PATCH] (change): Workflow improvements and force reloads on navigate --- client/src/app.html | 2 +- client/src/lib/assets/favicon.svg | 8 +++--- .../src/routes/baskets/[prefix]/+page.svelte | 16 +----------- .../src/routes/drawing/[prefix]/+page.svelte | 16 +----------- .../reports/bybasket/[prefix]/+page.svelte | 3 ++- .../reports/byname/[prefix]/+page.svelte | 3 ++- .../src/routes/tickets/[prefix]/+page.svelte | 26 +++++-------------- 7 files changed, 18 insertions(+), 56 deletions(-) diff --git a/client/src/app.html b/client/src/app.html index a3adaa3..86bdb1d 100644 --- a/client/src/app.html +++ b/client/src/app.html @@ -6,7 +6,7 @@ %sveltekit.head% - +
%sveltekit.body%
diff --git a/client/src/lib/assets/favicon.svg b/client/src/lib/assets/favicon.svg index 2a223a1..16156ed 100644 --- a/client/src/lib/assets/favicon.svg +++ b/client/src/lib/assets/favicon.svg @@ -2,9 +2,9 @@ + transform="translate(-5.6486658,10.082216)"> import { resolve } from '$app/paths'; - import { afterNavigate, beforeNavigate } from '$app/navigation'; import { browser } from '$app/environment'; import { bS, bAS, iS, rBS } from '$lib/client/styles'; import HeaderBar from '$lib/client/components/HeaderBar.svelte'; @@ -82,7 +81,7 @@ } }, prevLine: () => { - if (items[prevIdx]) { + if (curIdx > 0) { setTimeout(() => { focusIdx(prevIdx); }, 1); @@ -130,19 +129,6 @@ }; const headers = ['Basket ID', 'Description', 'Donors', 'Save?']; - beforeNavigate(({ cancel }) => { - if (itemsBuffer.length > 0) { - if (!confirm('Are you sure you want to leave this page? There are unsaved changes!')) - cancel(); - } - }); - - afterNavigate(() => { - items = []; - pager = { idFrom: 0, idTo: 0 }; - curIdx = 0; - }); - if (browser) { window.addEventListener('beforeunload', (e) => { if (itemsBuffer.length > 0) e.preventDefault(); diff --git a/client/src/routes/drawing/[prefix]/+page.svelte b/client/src/routes/drawing/[prefix]/+page.svelte index fda2b79..ec4aade 100644 --- a/client/src/routes/drawing/[prefix]/+page.svelte +++ b/client/src/routes/drawing/[prefix]/+page.svelte @@ -1,6 +1,5 @@