aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-03-07 14:43:48 -0800
committerAdam Soltys <[email protected]>2023-03-07 14:43:48 -0800
commit6645434663ace4f613e9ff2a2736bca27229e430 (patch)
treeb0875ec86ed1471a541cf695821b55db675b47cf /src
parent5dd262a8ebd57fd0eca3bd2aaaaebc8185a7d0e0 (diff)
downloadcoinos-ui-6645434663ace4f613e9ff2a2736bca27229e430.tar.gz
coinos-ui-6645434663ace4f613e9ff2a2736bca27229e430.zip
static qr
Diffstat (limited to 'src')
-rw-r--r--src/lib/invoice.js3
-rw-r--r--src/routes/(app)/[username]/receive/[...param]/+page.svelte2
-rw-r--r--src/routes/+page.svelte19
3 files changed, 23 insertions, 1 deletions
diff --git a/src/lib/invoice.js b/src/lib/invoice.js
index 23ce1757..429efa2b 100644
--- a/src/lib/invoice.js
+++ b/src/lib/invoice.js
@@ -9,6 +9,8 @@ export default async ({ cookies, request, url }) => {
let request_id = form.get('request_id');
if (request_id === 'undefined') request_id = undefined;
+ console.log("FORM", form.get('prompt'));
+
let invoice = {
amount,
tip: parseInt(form.get('tip')) || 0,
@@ -31,6 +33,7 @@ export default async ({ cookies, request, url }) => {
throw redirect(307, `/${user.username}/request/${request_id}`);
}
+ console.log('PROMPT?', invoice.prompt);
if (invoice.prompt) throw redirect(307, `/${user.username}/invoice/${hash}/tip`);
else throw redirect(307, `/${user.username}/invoice/${hash}`);
};
diff --git a/src/routes/(app)/[username]/receive/[...param]/+page.svelte b/src/routes/(app)/[username]/receive/[...param]/+page.svelte
index 95495368..5d37ccd3 100644
--- a/src/routes/(app)/[username]/receive/[...param]/+page.svelte
+++ b/src/routes/(app)/[username]/receive/[...param]/+page.svelte
@@ -21,6 +21,8 @@
let { user } = data;
let submit;
+ console.log("PROMPTY", prompt)
+
$: type = lightning ? 'lightning' : 'bitcoin';
</script>
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index 2db2854a..779a22b6 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -7,9 +7,12 @@
FaqCard,
Image,
About,
- Footer
+ Footer,
+ Qr as Q,
} from '$comp';
+ import Qr from 'qrcode-base64';
+
import { t } from '$lib/translations';
import { close } from '$lib/socket';
import { onMount } from 'svelte';
@@ -39,6 +42,8 @@
console.log(e);
}
});
+
+ let src = Qr.drawImg("https%3A%2F%2Fcoinos.io%2FLaughingBean", { size: 600 });
</script>
<svelte:head>
@@ -48,6 +53,18 @@
<LandingHeader {howItWorks} {faq} {about} {user} />
<main class="space-y-40 py-20 md:py-32 lg:py-36 xl:py-40 px-5 md:px-0">
+<div class="space-y-8">
+ <div class="flex w-full justify-center gap-4">
+ <img src="/images/bitcoin.png" class="w-14" />
+ <h3 class="text-5xl font-medium text-center">Pay with Bitcoin</h3>
+ </div>
+ <Q {src} />
+ <div class="text-center text-3xl">https://coinos.io/LaughingBean</div>
+ <div class="text-center text-3xl">Don't have a wallet?<br> Sign up for free at <b>coinos.io</b>!</div>
+ <div class="justify-center w-full flex">
+ <img src="/images/logo.svg" />
+ </div>
+ </div>
<LandingHero {user} />
<LandingInfoCard
image="lightning-qr"