Files
PowderCoatingLogix/src/PowderCoating.Web/wwwroot/js
spouliot cf36e41139 Label scanner: fix QR detection, blank camera on processing, improve permission flow
QR scanning:
- BarcodeDetector now snapshots to canvas before detect() instead of passing
  live video element — more reliable across Chrome versions
- Uses BarcodeDetector.getSupportedFormats() to detect all formats the browser
  supports rather than hardcoding ['qr_code'], catching data_matrix etc.
- jsQR fallback unchanged (attemptBoth inversion)

Processing overlay:
- Added #scan-processing overlay div to _LabelScanModal with spinner + message
- Camera/scanning UI blanks immediately when QR is found or Scan Text tapped;
  overlay message differs per path ("QR code found..." vs "Reading label with AI...")
- Overlay hides on error (modal stays open); modal close triggers hideProcessing()

Camera permission:
- localStorage flag (scannerCameraGranted) set on every successful getUserMedia
- preWarmCamera() checks flag first, bypassing navigator.permissions.query which
  can return 'prompt' for localhost even when Chrome has 'Allow' internally;
  proactive getUserMedia on page load succeeds silently when permission is granted

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 19:05:41 -04:00
..
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00
2026-04-23 21:38:24 -04:00