mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Upgrade vue-qr-code-reader and fix scanning issue
This commit is contained in:
committed by
Andrew Camilleri
parent
926b60df3d
commit
493f1b98c2
@@ -172,18 +172,21 @@ function initCameraScanningApp(title, onDataSubmit, modalId) {
|
||||
logErrors(promise) {
|
||||
promise.catch(console.error)
|
||||
},
|
||||
paint(location, ctx) {
|
||||
ctx.fillStyle = '#137547';
|
||||
[
|
||||
location.topLeftFinderPattern,
|
||||
location.topRightFinderPattern,
|
||||
location.bottomLeftFinderPattern
|
||||
].forEach(({ x, y }) => {
|
||||
ctx.fillRect(x - 5, y - 5, 10, 10);
|
||||
})
|
||||
paint(detectedCodes, ctx) {
|
||||
for (const detectedCode of detectedCodes) {
|
||||
const [ firstPoint, ...otherPoints ] = detectedCode.cornerPoints
|
||||
ctx.strokeStyle = "#51b13e";
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(firstPoint.x, firstPoint.y);
|
||||
for (const { x, y } of otherPoints) {
|
||||
ctx.lineTo(x, y);
|
||||
}
|
||||
ctx.lineTo(firstPoint.x, firstPoint.y);
|
||||
ctx.closePath();
|
||||
ctx.stroke();
|
||||
}
|
||||
},
|
||||
onInit(promise) {
|
||||
|
||||
promise.then(() => {
|
||||
this.errorMessage = null;
|
||||
if (app.cameras.length === 1)
|
||||
|
||||
File diff suppressed because one or more lines are too long
1
BTCPayServer/wwwroot/vendor/vue-qrcode-reader/VueQrcodeReader.umd.min.js.map
vendored
Normal file
1
BTCPayServer/wwwroot/vendor/vue-qrcode-reader/VueQrcodeReader.umd.min.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user