diff --git a/changelog/56_UNRELEASED_2020-xx-xx.md b/changelog/56_UNRELEASED_2020-xx-xx.md index 8705f65f..0c1d293d 100644 --- a/changelog/56_UNRELEASED_2020-xx-xx.md +++ b/changelog/56_UNRELEASED_2020-xx-xx.md @@ -32,6 +32,7 @@ ### General & other improvements/fixes - Big backend performance improvements (thanks @zebardy) +- Added a button to enable the device flash light on the camera barcode scanner popup (thanks @radim-ek) - Optimized the top navbar height and overall spacing to waste less space - Replaced the scan-mode-switch-button by a native button because it's less disturbing - Fixed that the "contextual time ago" of date/time pickers was not displayed diff --git a/public/viewjs/components/barcodescanner.js b/public/viewjs/components/barcodescanner.js index 6e199ed7..e1495272 100644 --- a/public/viewjs/components/barcodescanner.js +++ b/public/viewjs/components/barcodescanner.js @@ -156,12 +156,12 @@ $(document).on("click", "#barcodescanner-start-button", function(e) closeButton: true, buttons: { torch: { - label: __t('Torch'), - className: 'btn-primary responsive-button', - callback: function(){ - var track = Quagga.CameraAccess.getActiveTrack(); - track.applyConstraints({advanced: [{torch:true}]}); - return false; + label: '', + className: 'btn-warning responsive-button', + callback: function() + { + Quagga.CameraAccess.getActiveTrack().applyConstraints({ advanced: [{ torch: true }] }); + return false; } }, cancel: {