diff options
| author | Adam Soltys <[email protected]> | 2024-09-04 09:26:18 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-09-04 09:26:18 -0700 |
| commit | fcc226573f27cf7a639e57042838fa0da27e4c6a (patch) | |
| tree | fb92f00da057a92cac9d3e0e7d3e4790755aba22 /src/routes/(app) | |
| parent | 6f08cae4976fc936523ab3bac7537f7f630f9534 (diff) | |
| download | coinos-ui-fcc226573f27cf7a639e57042838fa0da27e4c6a.tar.gz coinos-ui-fcc226573f27cf7a639e57042838fa0da27e4c6a.zip | |
prompt for amount
Diffstat (limited to 'src/routes/(app)')
| -rw-r--r-- | src/routes/(app)/[username]/invoice/[id]/+page.svelte | 11 |
1 files changed, 10 insertions, 1 deletions
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 @@ </button> </div> </form> + + <div class="flex justify-between items-center"> + <span class="font-bold">{$t("payments.amountPrompt")}</span> + <Toggle id="notify" bind:value={$amountPrompt} /> + </div> </div> </div> {/if} |
