diff options
| author | Adam Soltys <[email protected]> | 2024-09-12 15:23:45 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-09-17 09:19:25 -0700 |
| commit | 2114156be3f89a2ef4c5bd13fd6d7a51d8fbc135 (patch) | |
| tree | ae764021c0f9017493366862d42ea6cac904a76e /src/routes/(app)/invoice | |
| parent | 1f63848ca9fb01336f04b41434de1cc06a5b3d93 (diff) | |
| download | coinos-ui-2114156be3f89a2ef4c5bd13fd6d7a51d8fbc135.tar.gz coinos-ui-2114156be3f89a2ef4c5bd13fd6d7a51d8fbc135.zip | |
self custodial send
Diffstat (limited to 'src/routes/(app)/invoice')
| -rw-r--r-- | src/routes/(app)/invoice/+page.server.ts | 4 | ||||
| -rw-r--r-- | src/routes/(app)/invoice/[id]/+layout.server.ts | 7 | ||||
| -rw-r--r-- | src/routes/(app)/invoice/[id]/+page.svelte | 4 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/routes/(app)/invoice/+page.server.ts b/src/routes/(app)/invoice/+page.server.ts index 83127457..05851430 100644 --- a/src/routes/(app)/invoice/+page.server.ts +++ b/src/routes/(app)/invoice/+page.server.ts @@ -2,8 +2,8 @@ import { auth, post } from "$lib/utils"; import { error, redirect } from "@sveltejs/kit"; import type { Invoice } from "$lib/types"; -export let load = async ({ cookies, params, parent }) => { - let { account } = params; +export let load = async ({ cookies, parent }) => { + let account = cookies.get("account"); let { subject, user, rates } = await parent(); let invoice: Invoice = { diff --git a/src/routes/(app)/invoice/[id]/+layout.server.ts b/src/routes/(app)/invoice/[id]/+layout.server.ts index e7144b15..71f53e09 100644 --- a/src/routes/(app)/invoice/[id]/+layout.server.ts +++ b/src/routes/(app)/invoice/[id]/+layout.server.ts @@ -1,4 +1,4 @@ -import Qr from "qrcode-base64"; +import * as Qr from "qrcode-base64"; import { get } from "$lib/utils"; import { redirect } from "@sveltejs/kit"; @@ -26,11 +26,10 @@ export async function load({ depends, params, url, parent }) { (!amount && (pending || received)) || (amount > 0 && (pending >= amount || received >= amount)); if (paid && !url.pathname.endsWith("paid")) { - redirect( 307, `/invoice/${id}/paid` + (options ? "?options=true" : "") - ); + redirect(307, `/invoice/${id}/paid` + (options ? "?options=true" : "")); } - let src = Qr.drawImg(invoice.text || "", { size: 340 }); + let src = Qr.drawImg(invoice.text || "", { size: 500 }); return { id, invoice, subject, src }; } diff --git a/src/routes/(app)/invoice/[id]/+page.svelte b/src/routes/(app)/invoice/[id]/+page.svelte index c4810889..36f5d261 100644 --- a/src/routes/(app)/invoice/[id]/+page.svelte +++ b/src/routes/(app)/invoice/[id]/+page.svelte @@ -136,14 +136,14 @@ > <img {src} - class="mx-auto z-10 shadow-inner rounded-2xl" + class="mx-auto z-10 rounded-2xl w-[260px] rounded-2xl" bind:this={qr} alt={txt} /> </a> </div> {:else} - <div class="break-all pb-5 text-lg text-center"> + <div class="break-all pb-5 text-center text-secondary"> {txt} </div> {/if} |
