diff options
| author | Adam Soltys <[email protected]> | 2024-09-04 09:14:09 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-09-04 09:17:16 -0700 |
| commit | 6f08cae4976fc936523ab3bac7537f7f630f9534 (patch) | |
| tree | c3618c6ce0305cca32ffacfdecadb87df31e1703 /src/routes/(app) | |
| parent | d1a1edffcf77bdf20efb002766f877b1166336a7 (diff) | |
| download | coinos-ui-6f08cae4976fc936523ab3bac7537f7f630f9534.tar.gz coinos-ui-6f08cae4976fc936523ab3bac7537f7f630f9534.zip | |
qr/text toggle
Diffstat (limited to 'src/routes/(app)')
| -rw-r--r-- | src/routes/(app)/[username]/generate/+server.ts | 1 | ||||
| -rw-r--r-- | src/routes/(app)/[username]/invoice/[id]/+page.svelte | 16 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/routes/(app)/[username]/generate/+server.ts b/src/routes/(app)/[username]/generate/+server.ts index cdfac166..5a442982 100644 --- a/src/routes/(app)/[username]/generate/+server.ts +++ b/src/routes/(app)/[username]/generate/+server.ts @@ -6,6 +6,7 @@ export async function POST({ cookies, request }) { let body = await request.json(); return json(await post(`/user`, body, auth(cookies))); } catch (e: any) { + console.log(e); error(500, e.message); } } diff --git a/src/routes/(app)/[username]/invoice/[id]/+page.svelte b/src/routes/(app)/[username]/invoice/[id]/+page.svelte index 423fc719..5ed40ce9 100644 --- a/src/routes/(app)/[username]/invoice/[id]/+page.svelte +++ b/src/routes/(app)/[username]/invoice/[id]/+page.svelte @@ -159,6 +159,10 @@ /> </a> </div> + {:else} + <div class="break-all pb-5 text-lg text-center"> + {txt} + </div> {/if} {#each invoice.items as i} @@ -209,8 +213,7 @@ > <Icon icon="copy" style="w-8 my-auto" /> <div class="my-auto"> - {$t("payments.copy")} - {txt.substr(0, 11)}...{txt.substr(-6)} + {$t("payments.copyPr")} </div> </button> @@ -238,10 +241,13 @@ class="w-full flex justify-center rounded-2xl border py-5 px-6 hover:opacity-80" on:click={() => ($showQr = !$showQr)} > - <Icon icon="qr" style="w-8 mr-1 invert my-auto" /> + {#if $showQr} + <Icon icon="text" style="w-6 mr-2 my-auto" /> + {:else} + <Icon icon="qr" style="w-8 mr-1 invert my-auto" /> + {/if} <div class="my-auto"> - {$showQr ? $t("payments.hide") : $t("payments.show")} - {$t("payments.qr")} + {$showQr ? $t("payments.showText") : $t("payments.showQr")} </div></button > </div> |
