mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +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) {
|
logErrors(promise) {
|
||||||
promise.catch(console.error)
|
promise.catch(console.error)
|
||||||
},
|
},
|
||||||
paint(location, ctx) {
|
paint(detectedCodes, ctx) {
|
||||||
ctx.fillStyle = '#137547';
|
for (const detectedCode of detectedCodes) {
|
||||||
[
|
const [ firstPoint, ...otherPoints ] = detectedCode.cornerPoints
|
||||||
location.topLeftFinderPattern,
|
ctx.strokeStyle = "#51b13e";
|
||||||
location.topRightFinderPattern,
|
ctx.beginPath();
|
||||||
location.bottomLeftFinderPattern
|
ctx.moveTo(firstPoint.x, firstPoint.y);
|
||||||
].forEach(({ x, y }) => {
|
for (const { x, y } of otherPoints) {
|
||||||
ctx.fillRect(x - 5, y - 5, 10, 10);
|
ctx.lineTo(x, y);
|
||||||
})
|
}
|
||||||
|
ctx.lineTo(firstPoint.x, firstPoint.y);
|
||||||
|
ctx.closePath();
|
||||||
|
ctx.stroke();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onInit(promise) {
|
onInit(promise) {
|
||||||
|
|
||||||
promise.then(() => {
|
promise.then(() => {
|
||||||
this.errorMessage = null;
|
this.errorMessage = null;
|
||||||
if (app.cameras.length === 1)
|
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