Added QR Scanner to more input fields
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled

This commit is contained in:
2026-05-30 00:02:02 +02:00
parent 00be2bd4d3
commit 5c9e6a34b4
5 changed files with 74 additions and 41 deletions

View File

@@ -0,0 +1,17 @@
<!-- (HINWEIS: Hier im Untergrund muss noch dein HTML-Modal für die Kamera-Vorschau liegen, falls das nicht global eingebunden ist) -->
<div data-scanner-target="modal" class="hidden fixed inset-0 bg-gray-900/60 z-50 flex items-center justify-center p-4 backdrop-blur-sm">
<div class="bg-white rounded-2xl max-w-md w-full p-6 space-y-4 shadow-xl border border-gray-100">
<div class="flex justify-between items-center">
<h3 class="text-sm font-bold text-gray-800 uppercase tracking-wide">QR-Code scannen</h3>
<button type="button" data-action="click->scanner#stopCamera" class="p-1 text-gray-400 hover:text-gray-600 rounded-lg">
<svg class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" /></svg>
</button>
</div>
<!-- DAS VORSCHAUFENSTER FÜR DIE KAMERA IN DEINER _search_bar.html.erb -->
<!-- KORREKTUR: Das Video-Tag steht jetzt fest im HTML und dient direkt als Target -->
<div class="w-full aspect-square rounded-xl overflow-hidden border border-gray-200 bg-black flex items-center justify-center">
<video data-scanner-target="preview" class="w-full h-full object-cover rounded-xl" playsinline muted></video>
</div>
<p class="text-xs text-gray-500 text-center">Halte den QR-Code des Geräts ruhig in den Scan-Rahmen.</p>
</div>
</div>