Merge branch 'refactor-send-receive-invoice-qrscanner'

This commit is contained in:
padreug 2025-09-20 11:00:24 +02:00
commit 578cd8f570
2 changed files with 19 additions and 24 deletions

View file

@ -27,22 +27,6 @@
playsinline
></video>
<!-- Overlay with scanning indicator -->
<div v-if="isScanning" class="absolute inset-0 pointer-events-none">
<!-- Scanning frame -->
<div class="absolute inset-4 border-2 border-white rounded-lg">
<div class="absolute top-0 left-0 w-6 h-6 border-t-4 border-l-4 border-primary rounded-tl-lg"></div>
<div class="absolute top-0 right-0 w-6 h-6 border-t-4 border-r-4 border-primary rounded-tr-lg"></div>
<div class="absolute bottom-0 left-0 w-6 h-6 border-b-4 border-l-4 border-primary rounded-bl-lg"></div>
<div class="absolute bottom-0 right-0 w-6 h-6 border-b-4 border-r-4 border-primary rounded-br-lg"></div>
</div>
<!-- Scanning line animation -->
<div class="absolute inset-x-4 top-4 bottom-4 overflow-hidden">
<div class="h-0.5 bg-primary/70 animate-pulse"></div>
</div>
</div>
<!-- Loading state -->
<div v-if="!isScanning && hasPermission === true" class="absolute inset-0 flex items-center justify-center bg-black/50">
<div class="text-center text-white">
@ -131,4 +115,4 @@ onMounted(async () => {
onUnmounted(() => {
stopScanning()
})
</script>
</script>

View file

@ -412,12 +412,20 @@ onMounted(async () => {
</Card>
<!-- Dialogs -->
<ReceiveDialog :open="showReceiveDialog" @update:open="showReceiveDialog = $event" />
<SendDialog v-if="showSendDialog" :open="showSendDialog" :initial-destination="scannedDestination" @update:open="(open) => {
showSendDialog = open
if (!open) scannedDestination = ''
}" />
<ReceiveDialog
:open="showReceiveDialog"
@update:open="showReceiveDialog = $event"
/>
<SendDialog
v-if="showSendDialog"
:open="showSendDialog"
:initial-destination="scannedDestination"
@update:open="(open) => {
showSendDialog = open
if (!open) scannedDestination = ''
}"
/>
<!-- QR Scanner Dialog -->
<Dialog :open="showQRScanner" @update:open="showQRScanner = $event">
@ -432,7 +440,10 @@ onMounted(async () => {
</DialogDescription>
</DialogHeader>
<QRScanner @result="handleQRScanResult" @close="closeQRScanner" />
<QRScanner
@result="handleQRScanResult"
@close="closeQRScanner"
/>
</DialogContent>
</Dialog>
</div>