diff options
| author | Adam Soltys <[email protected]> | 2022-11-22 12:09:44 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-22 12:09:44 -0800 |
| commit | 8cf8018f4659ad8bde1e41bd2838b27526bdc34b (patch) | |
| tree | e827d58cd12821b6e9d0827c4839da73df19f8e5 /src/routes/(app)/send | |
| parent | c0f86ea4c2f60ccdabc9076de91d8cabb987b8a3 (diff) | |
| download | coinos-ui-8cf8018f4659ad8bde1e41bd2838b27526bdc34b.tar.gz coinos-ui-8cf8018f4659ad8bde1e41bd2838b27526bdc34b.zip | |
clean up request flow, update translations and deps
Diffstat (limited to 'src/routes/(app)/send')
5 files changed, 18 insertions, 19 deletions
diff --git a/src/routes/(app)/send/[...text]/+page.server.js b/src/routes/(app)/send/[...text]/+page.server.js index fcfb33a3..dd2619ac 100644 --- a/src/routes/(app)/send/[...text]/+page.server.js +++ b/src/routes/(app)/send/[...text]/+page.server.js @@ -8,7 +8,7 @@ let parse = async (t, host) => { let amount, user, uuid; - t = t.toLowerCase(); + t = t.toLowerCase(); t.startsWith('bitcoin:') && ({ diff --git a/src/routes/(app)/send/[...text]/+page.svelte b/src/routes/(app)/send/[...text]/+page.svelte index 7c81bd74..e620fef4 100644 --- a/src/routes/(app)/send/[...text]/+page.svelte +++ b/src/routes/(app)/send/[...text]/+page.svelte @@ -1,6 +1,6 @@ <script> import { page } from '$app/stores'; - import { fly } from 'svelte/transition'; + import { fly } from 'svelte/transition'; import { enhance } from '$app/forms'; import { tick } from 'svelte'; import { browser } from '$app/environment'; @@ -17,7 +17,7 @@ let w; let el, textarea, text; - let placeholder = 'Paste a bitcoin address, lightning invoice or coinos username'; + let placeholder = $t('user.send.placeholder'); $: $page && setTimeout(() => w > 800 && textarea?.focus(), 0); let keypress = (e) => e.key === 'Enter' && (e.preventDefault() || el.click()); @@ -31,9 +31,9 @@ <AppHeader {data} /> <div class="container px-4 max-w-lg mx-auto space-y-5 mt-20"> - <h1 class="px-3 md:px-0 text-center text-3xl md:text-4xl font-semibold"> - {$t('transactions.send')} - </h1> + <h1 class="px-3 md:px-0 text-center text-3xl md:text-4xl font-semibold"> + {$t('transactions.send')} + </h1> <form method="POST" use:enhance> {#if form?.error} @@ -60,7 +60,7 @@ class="flex border rounded-full px-6 py-2 font-bold hover:opacity-80 mr-1" > <Icon icon="scan" style="mr-2 w-6 my-auto" /> - <div class="my-auto">Scan</div> + <div class="my-auto">{$t('user.send.scan')}</div> </button> </a> @@ -70,7 +70,7 @@ on:click={paste} > <Icon icon="paste" style="mr-2 w-6 my-auto" /> - <div class="my-auto">Paste</div> + <div class="my-auto">{$t('user.send.paste')}</div> </button> <button @@ -80,14 +80,14 @@ ? 'opacity-50' : 'opacity-100 hover:opacity-80'} bg-black text-white border rounded-full px-6 py-2 font-bold" > - Next + {$t('user.send.next')} </button> </div> </form> {#if contacts.length} <div class="space-y-5"> - <h1 class="px-3 md:px-0 text-xl font-semibold mt-10">Contacts</h1> + <h1 class="px-3 md:px-0 text-xl font-semibold mt-10">{$t('user.send.contacts')}</h1> <div> {#each contacts as c} <a href={`/send/user/${c.username}`}> diff --git a/src/routes/(app)/send/[uuid=uuid]/+page.svelte b/src/routes/(app)/send/[uuid=uuid]/+page.svelte index 6c54f487..23e8a73e 100644 --- a/src/routes/(app)/send/[uuid=uuid]/+page.svelte +++ b/src/routes/(app)/send/[uuid=uuid]/+page.svelte @@ -46,15 +46,14 @@ <div class="container px-4 mt-20 max-w-xl mx-auto"> {#if amount} <div class="text-center mb-8"> - <h1 class="text-xl md:text-2xl text-secondary mb-2"> - - {$t('transactions.send')} - </h1> + <h1 class="text-xl md:text-2xl text-secondary mb-2"> + {$t('transactions.send')} + </h1> <p class="text-6xl break-words mb-4"> {fiat ? f(amountFiat, currency) : '⚡️' + s(amount)} </p> - <h1 class="text-xl md:text-2xl text-secondary mb-2">to</h1> + <h1 class="text-xl md:text-2xl text-secondary mb-2">{$t("transactions.to")}</h1> <div class="flex p-1 gap-2 justify-center"> <Avatar user={recipient} size={'20'} /> @@ -91,7 +90,7 @@ 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} > - Next + {$t("transactions.next")} </button> {/if} </div> diff --git a/src/routes/(app)/send/bitcoin/[address]/[...amount]/+page.svelte b/src/routes/(app)/send/bitcoin/[address]/[...amount]/+page.svelte index 87401749..f2643918 100644 --- a/src/routes/(app)/send/bitcoin/[address]/[...amount]/+page.svelte +++ b/src/routes/(app)/send/bitcoin/[address]/[...amount]/+page.svelte @@ -33,7 +33,7 @@ <div class="container px-4 mt-20 max-w-xl mx-auto"> <div class="text-center mb-8"> - <h1 class="text-3xl md:text-4xl font-semibold mb-2">{$t("transactions.sendTo")}</h1> + <h1 class="text-3xl md:text-4xl font-semibold mb-2">{$t('transactions.sendTo')}</h1> <p class="text-lg text-secondary">{address}</p> </div> <Numpad bind:amount {currency} /> @@ -51,7 +51,7 @@ {#if loading} <Spinner /> {:else} - {$t('transactions.send')} + {$t('transactions.send')} {/if} </button> </div> diff --git a/src/routes/(app)/send/lightning/[payreq]/+page.svelte b/src/routes/(app)/send/lightning/[payreq]/+page.svelte index 46dd71d1..bba2ea45 100644 --- a/src/routes/(app)/send/lightning/[payreq]/+page.svelte +++ b/src/routes/(app)/send/lightning/[payreq]/+page.svelte @@ -42,7 +42,7 @@ <p class="text-6xl break-words mb-4"> {s(amount)} <span class="text-xl md:text-2xl text-secondary">sats</span> </p> - <h1 class="text-xl md:text-2xl text-secondary mb-2">{$t('transactions.to')}</h1> + <h1 class="text-xl md:text-2xl text-secondary mb-2">{$t('transactions.to')}</h1> <p class="text-6xl break-words">{alias}</p> </div> |
