diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 2884872..42f50a9 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -9,6 +9,7 @@ import { keys } from "#lib/keys.svelte.js"; import { period, rangeFromUrl } from "#lib/period.svelte.js"; import { session } from "#lib/session.svelte.js"; + import { ui } from "#lib/ui.svelte.js"; import { goto } from "$app/navigation"; import { page } from "$app/state"; @@ -23,6 +24,7 @@ await goto(back, { replace: true }); } period.init(session.viewRange, page.url); + ui.quickEntry = page.url.searchParams.has("quick"); period.loadFirst().catch(() => undefined); } catch (error) { session.failed = error instanceof Error ? error.message : String(error); @@ -43,12 +45,15 @@ return; } lastHref = url.href; - const clean = !url.searchParams.has("ffui"); + const clean = !( + url.searchParams.has("ffui") || url.searchParams.has("quick") + ); if (clean && fromUrl?.start === start && fromUrl?.end === end) { return; } const next = new URL(url.href); next.searchParams.delete("ffui"); + next.searchParams.delete("quick"); next.searchParams.set("start", start); next.searchParams.set("end", end); lastHref = next.href; diff --git a/static/manifest.webmanifest b/static/manifest.webmanifest index 0fb7de8..974cb08 100644 --- a/static/manifest.webmanifest +++ b/static/manifest.webmanifest @@ -21,6 +21,7 @@ } ], "shortcuts": [ + { "name": "Quick entry", "url": "/?quick" }, { "name": "New expense", "url": "/transactions/create/withdrawal" }, { "name": "Transactions", "url": "/transactions/all" } ]