aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/invoice
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-08-01 12:27:49 -0700
committerAdam Soltys <[email protected]>2022-08-01 12:27:49 -0700
commitf2942cda26ea2c2f323f4a588e23e8ee6627f478 (patch)
treeba3c79dc9f3925f3b9999231a53745e3a6dcb6ac /src/routes/invoice
parent60eb55499cbab8abbaab40efab7bd2ad0b141add (diff)
downloadcoinos-ui-f2942cda26ea2c2f323f4a588e23e8ee6627f478.tar.gz
coinos-ui-f2942cda26ea2c2f323f4a588e23e8ee6627f478.zip
use canvas for qr code
Diffstat (limited to 'src/routes/invoice')
-rw-r--r--src/routes/invoice/[id].svelte15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/routes/invoice/[id].svelte b/src/routes/invoice/[id].svelte
index d5a39daa..1f1a7aa3 100644
--- a/src/routes/invoice/[id].svelte
+++ b/src/routes/invoice/[id].svelte
@@ -67,10 +67,10 @@
let init = async (ready) => {
if (!ready) return;
let { default: QRCodeStyling } = await import('qr-code-styling');
- console.log('text', text);
+
const qrCode = new QRCodeStyling({
width: window.screen.width < 640 ? 250 : 300,
- type: 'svg',
+ type: 'canvas',
data: text,
image: '/images/invoice.svg',
backgroundOptions: {
@@ -102,9 +102,6 @@
};
let customInput;
-
- let qrSkeleton = true;
- setTimeout(() => (qrSkeleton = false), 1000);
</script>
{#if $user}
@@ -227,13 +224,7 @@
class="border {showMobileTip
? 'border-gray-400'
: 'border-lightgrey'} rounded-3xl block md:flex md:p-5 justify-center items-center h-[300px] md:h-[342px] w-[250px] md:w-[342px] relative"
- >
- <div
- class="z-100 h-[300px] md:h-[342px] w-[250px] md:w-[342px] animate-pulse absolute top-0 left-0 bg-gray-400 rounded-3xl {qrSkeleton
- ? 'block'
- : 'hidden'}"
- />
- </div>
+ />
<div class="px-5 space-y-3">
<div class="flex justify-between">