diff options
Diffstat (limited to 'src/routes/scan')
| -rw-r--r-- | src/routes/scan/+page.svelte | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/routes/scan/+page.svelte b/src/routes/scan/+page.svelte new file mode 100644 index 00000000..5c8c09f6 --- /dev/null +++ b/src/routes/scan/+page.svelte @@ -0,0 +1,24 @@ +<script> + import { Icon } from "$comp"; + import QrScanner from 'qr-scanner'; + import { onMount } from 'svelte'; + import { goBack } from "$lib/utils"; + + let scanner, vid; + onMount(() => { + scanner = new QrScanner(vid, console.log); + scanner.start(); + }); + +</script> + + <button + class="ml-5 md:ml-20 mt-5 md:mt-10 hover:opacity-80" + on:click={goBack} + > + <Icon icon="arrow-left" style="w-10" /> + </button> + + <div class="flex w-full"> +<video bind:this={vid} class="w-full max-w-[600px] mx-auto" /> +</div> |
