diff options
| -rw-r--r-- | src/routes/(app)/send/[...text]/+page.svelte | 14 | ||||
| -rw-r--r-- | src/routes/(app)/settings/+layout.svelte | 18 |
2 files changed, 20 insertions, 12 deletions
diff --git a/src/routes/(app)/send/[...text]/+page.svelte b/src/routes/(app)/send/[...text]/+page.svelte index 23f39ddf..c423015a 100644 --- a/src/routes/(app)/send/[...text]/+page.svelte +++ b/src/routes/(app)/send/[...text]/+page.svelte @@ -72,19 +72,22 @@ <div class="flex gap-2"> <a href="/scan" class="contents"> <button type="button" class="btn !w-auto flex-grow"> - <iconify-icon noobserver icon="ph:camera-bold" width="32"></iconify-icon> + <iconify-icon noobserver icon="ph:camera-bold" width="32" + ></iconify-icon> {$t("user.send.scan")} </button> </a> <button type="button" class="btn !w-auto flex-grow" onclick={paste}> - <iconify-icon noobserver icon="ph:clipboard-text-bold" width="32"></iconify-icon> + <iconify-icon noobserver icon="ph:clipboard-text-bold" width="32" + ></iconify-icon> {$t("user.send.paste")} </button> </div> <button bind:this={el} type="submit" class="btn btn-accent"> - <iconify-icon noobserver icon="ph:paper-plane-right-bold" width="32"></iconify-icon> + <iconify-icon noobserver icon="ph:paper-plane-right-bold" width="32" + ></iconify-icon> <div class="my-auto">{$t("user.send.next")}</div> </button> @@ -97,7 +100,10 @@ <a href="/send/fund" class="block"> <button type="button" class="btn"> - <iconify-icon noobserver icon="ph:lightning-fill" class="text-yellow-300 text-2xl" + <iconify-icon + noobserver + icon="ph:lightning-fill" + class="text-yellow-300 text-2xl" ></iconify-icon> <div class="my-auto">{$t("payments.createFund")}</div> </button> diff --git a/src/routes/(app)/settings/+layout.svelte b/src/routes/(app)/settings/+layout.svelte index bc0d18f9..0b4ba90b 100644 --- a/src/routes/(app)/settings/+layout.svelte +++ b/src/routes/(app)/settings/+layout.svelte @@ -23,8 +23,8 @@ let { token, cookies, subscriptions } = $derived(data); let { tab } = $derived(data); - let { user } = $derived(form || data); - let prev = $derived({ ...user }); + let user = $derived({ ...data?.user, ...form?.user }); + let prev = $derived({ ...data.user }); let justUpdated; let throttledSuccess = () => { @@ -49,11 +49,13 @@ try { submitting = true; let body = new FormData(formElement); - let user = await fd({ - formData() { - return body; - }, - }); + form = { + user: await fd({ + formData() { + return body; + }, + }), + }; if (!user.pubkey || user.pubkey === prev.pubkey) { body.delete("pubkey"); @@ -119,7 +121,7 @@ }; try { - event = await sign(event, data.user); + event = await sign(event, user); send(event); } catch (e) { console.log(e); |
