All files / app/formly/qr-scanner qr-scanner.component.html

39.47% Statements 15/38
20% Branches 2/10
0% Functions 0/6
52.38% Lines 11/21

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 272x 4x 2x   4x 2x   2x   2x           2x 2x         2x 2x        
<input #imageFile type="file" accept="image/*" (change)="readQr(imageFile.files!)"/>
@if (upload) {
  <button type="button" (click)="imageFile.click()" i18n-title title="QR from photo or camera" i18n>📷️</button>
}
@if (hasCamera) {
  <button type="button" (click)="scanQr()" i18n-title title="Scan for QR with video" i18n>🤳️</button>
}
<ng-template #video>
  <video class="qr-preview"
         i18n-title title="Click anywhere to stop scanning"
         (click)="stopScanQr()"></video>
  <div class="floating-toggles big">
    @if (hasFlash) {
      <button type="button"
              (click)="scanner?.toggleFlash()"
              i18n-title title="Toggle flash"
              i18n>🔦️</button>
    }
    @if (hasMultipleCameras) {
      <button type="button"
              (click)="nextCamera()"
              i18n-title title="Next camera"
              i18n>🔃️</button>
    }
  </div>
</ng-template>