forked from jsnbuchanan/crowd-funder-for-time-pwa
Streamlined QR scanner web camera
- No need to stop and start camera preview
This commit is contained in:
@@ -152,30 +152,6 @@
|
|||||||
@camera-on="onCameraOn"
|
@camera-on="onCameraOn"
|
||||||
@camera-off="onCameraOff"
|
@camera-off="onCameraOff"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div
|
|
||||||
class="absolute bottom-4 inset-x-0 flex justify-center items-center"
|
|
||||||
>
|
|
||||||
<!-- Camera Stop Button -->
|
|
||||||
<button
|
|
||||||
class="text-center text-slate-600 leading-none bg-white p-2 rounded-full drop-shadow-lg"
|
|
||||||
title="Stop camera"
|
|
||||||
@click="stopScanning"
|
|
||||||
>
|
|
||||||
<font-awesome icon="xmark" class="size-6" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-else
|
|
||||||
class="flex items-center justify-center aspect-square overflow-hidden bg-slate-800 w-[90vw] max-w-[calc((100vh-env(safe-area-inset-top)-env(safe-area-inset-bottom))*0.4)] mx-auto"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white text-lg px-3 py-2 rounded-lg"
|
|
||||||
@click="startScanning"
|
|
||||||
>
|
|
||||||
Scan QR Code
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user