From fcc226573f27cf7a639e57042838fa0da27e4c6a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 4 Sep 2024 09:26:18 -0700 Subject: prompt for amount --- src/routes/(app)/[username]/invoice/[id]/+page.svelte | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/routes/(app)') diff --git a/src/routes/(app)/[username]/invoice/[id]/+page.svelte b/src/routes/(app)/[username]/invoice/[id]/+page.svelte index 5ed40ce9..ad0d734a 100644 --- a/src/routes/(app)/[username]/invoice/[id]/+page.svelte +++ b/src/routes/(app)/[username]/invoice/[id]/+page.svelte @@ -16,7 +16,7 @@ } from "$lib/utils"; import { tick, onMount, onDestroy } from "svelte"; import { browser } from "$app/environment"; - import { last, showQr } from "$lib/store"; + import { last, showQr, amountPrompt } from "$lib/store"; import Avatar from "$comp/Avatar.svelte"; import Icon from "$comp/Icon.svelte"; import Heart from "$comp/Heart.svelte"; @@ -24,6 +24,7 @@ import Numpad from "$comp/Numpad.svelte"; import { t } from "$lib/translations"; import { goto, invalidate } from "$app/navigation"; + import Toggle from "$comp/Toggle.svelte"; export let data; @@ -94,6 +95,8 @@ subbed = true; send("subscribe", invoice); }); + + if ($amountPrompt) toggleAmount(); } }); @@ -120,6 +123,7 @@ }; let setAmount = async () => { + if (typeof $amountPrompt === "undefined") $amountPrompt = true; settingAmount = false; amount = newAmount; invoice.amount = newAmount; @@ -345,6 +349,11 @@ + +
+ {$t("payments.amountPrompt")} + +
{/if} -- cgit v1.2.3