diff options
| author | Adam Soltys <[email protected]> | 2024-10-14 15:37:09 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-10-14 15:37:09 -0700 |
| commit | 9bf9c7151be64317ec5b8b43fb41064e62dc743a (patch) | |
| tree | 18668a55a7016c0398e20a49a22889d805d879a4 /src/components | |
| parent | dbb746bf404e7ed302c34b6631a170aff57c64c6 (diff) | |
| download | coinos-ui-9bf9c7151be64317ec5b8b43fb41064e62dc743a.tar.gz coinos-ui-9bf9c7151be64317ec5b8b43fb41064e62dc743a.zip | |
support lnurl comments
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Lnurlp.svelte | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/components/Lnurlp.svelte b/src/components/Lnurlp.svelte index 6785061a..ef6c4e51 100644 --- a/src/components/Lnurlp.svelte +++ b/src/components/Lnurlp.svelte @@ -5,9 +5,10 @@ import Spinner from "$comp/Spinner.svelte"; import { pin } from "$lib/store"; - export let data, form, send; + export let data, form, send, comment; let { currency } = data.user; - let { minSendable, maxSendable, callback, metadata, rates } = data; + let { minSendable, maxSendable, commentAllowed, callback, metadata, rates } = + data; $: rate = rates[currency]; @@ -16,7 +17,7 @@ let submit = () => (loading = true); </script> -<div class="container px-4 mt-20 max-w-xl mx-auto"> +<div class="container px-4 mt-20 max-w-xl mx-auto space-y-2"> <div class="text-center mb-8"> {#each JSON.parse(metadata) as m} <div> @@ -45,6 +46,16 @@ <input name="callback" value={callback} type="hidden" /> <input name="pin" value={$pin} type="hidden" /> + {#if commentAllowed} + <textarea + name="text" + placeholder={$t("payments.message")} + class="w-full p-4 border rounded-xl h-32 text-xl" + bind:value={comment} + autocapitalize="none" + /> + {/if} + <div class="flex w-full"> <button bind:this={send} |
