diff options
| author | Adam Soltys <[email protected]> | 2023-09-03 20:47:44 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-09-03 20:47:49 -0700 |
| commit | d5d4664007f0f620801e79822fcfc74804c6e649 (patch) | |
| tree | 9d9656172ff4335667993092f0b3b440e26342c3 /src | |
| parent | 2b3af0b2d4afe70bcb86554a575fa0a81b20437a (diff) | |
| download | coinos-ui-d5d4664007f0f620801e79822fcfc74804c6e649.tar.gz coinos-ui-d5d4664007f0f620801e79822fcfc74804c6e649.zip | |
handle enter key on internal send
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/(app)/send/user/[username]/[...amount]/+page.svelte | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/routes/(app)/send/user/[username]/[...amount]/+page.svelte b/src/routes/(app)/send/user/[username]/[...amount]/+page.svelte index 9ce82d2e..32a13939 100644 --- a/src/routes/(app)/send/user/[username]/[...amount]/+page.svelte +++ b/src/routes/(app)/send/user/[username]/[...amount]/+page.svelte @@ -12,6 +12,7 @@ let { subject, rate, rates, user } = data; let currency = user.currency || subject.currency || 'USD'; + let next; let amount = form?.amount || data.amount; let a, @@ -59,7 +60,14 @@ {/if} <div class="container px-4 mt-20 max-w-xl mx-auto space-y-8"> - <Numpad bind:amount={a} bind:amountFiat={af} {currency} bind:fiat bind:rate={r} /> + <Numpad + bind:amount={a} + bind:amountFiat={af} + {currency} + bind:fiat + bind:rate={r} + bind:submit={next} + /> <form method="POST" use:enhance on:submit={submit}> <input name="amount" value={amount} type="hidden" /> @@ -82,8 +90,10 @@ {:else} <button type="button" + bind:this={next} class="opacity-100 hover:opacity-80'} rounded-2xl border py-3 font-bold mx-auto mt-2 bg-black text-white px-4 w-24" on:click={setAmount} + on:keydown={setAmount} > Next </button> |
