mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
Upgrade vue-qr-code-reader and fix scanning issue
This commit is contained in:
parent
926b60df3d
commit
493f1b98c2
3 changed files with 16 additions and 12 deletions
|
@ -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
Loading…
Add table
Reference in a new issue