Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Samuele Locatelli
2021-10-18 15:44:27 +02:00
5 changed files with 89 additions and 0 deletions
Submodule
+1
Submodule qrscan/dcc added at 99e255d469
+7
View File
File diff suppressed because one or more lines are too long
+39
View File
@@ -0,0 +1,39 @@
<html>
<head>
<title>Html-Qrcode Demo</title>
<body>
<div id="qr-reader" style="width:500px"></div>
<div id="qr-reader-results"></div>
</body>
<script src="html5-qrcode.min.js"></script>
<script>
function docReady(fn) {
// see if DOM is already available
if (document.readyState === "complete"
|| document.readyState === "interactive") {
// call on next available tick
setTimeout(fn, 1);
} else {
document.addEventListener("DOMContentLoaded", fn);
}
}
docReady(function () {
var resultContainer = document.getElementById('qr-reader-results');
var lastResult, countResults = 0;
function onScanSuccess(decodedText, decodedResult) {
if (decodedText !== lastResult) {
++countResults;
lastResult = decodedText;
// Handle on success condition with the decoded message.
console.log(`Scan result ${decodedText}`, decodedResult);
}
}
var html5QrcodeScanner = new Html5QrcodeScanner(
"qr-reader", { fps: 10, qrbox: 250 });
html5QrcodeScanner.render(onScanSuccess);
});
</script>
</head>
</html>
+36
View File
@@ -0,0 +1,36 @@
{
"name": "qrscan",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"dependencies": {
"html5-qrcode": "^2.1.0",
"zxing": "^0.1.2"
}
},
"node_modules/html5-qrcode": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/html5-qrcode/-/html5-qrcode-2.1.0.tgz",
"integrity": "sha512-Lzm6U1Vm2WM4g7dyoFJM/YP10l7af7MuIRx/dEdyWxMyDGYBEOCOinBiQnuGm8wFK6z3g4sUV/e4ewFoVwH/1g=="
},
"node_modules/zxing": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/zxing/-/zxing-0.1.2.tgz",
"integrity": "sha1-Jg2+nWeF1oTTd1vpd5VyjVm72fk=",
"deprecated": "zxing is no longer maintained. Please use qrcode-reader"
}
},
"dependencies": {
"html5-qrcode": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/html5-qrcode/-/html5-qrcode-2.1.0.tgz",
"integrity": "sha512-Lzm6U1Vm2WM4g7dyoFJM/YP10l7af7MuIRx/dEdyWxMyDGYBEOCOinBiQnuGm8wFK6z3g4sUV/e4ewFoVwH/1g=="
},
"zxing": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/zxing/-/zxing-0.1.2.tgz",
"integrity": "sha1-Jg2+nWeF1oTTd1vpd5VyjVm72fk="
}
}
}
+6
View File
@@ -0,0 +1,6 @@
{
"dependencies": {
"html5-qrcode": "^2.1.0",
"zxing": "^0.1.2"
}
}