Files
TeleSec/src/page/index.js
2025-08-11 22:04:59 +02:00

32 lines
1013 B
JavaScript

PAGES.index = {
//navcss: "btn1",
Title: "Inicio",
index: function() {
container.innerHTML = `
<h1>¡Hola, ${SUB_LOGGED_IN_DETAILS.Nombre}!</h1>
<em>Utiliza el menú superior para abrir un modulo</em>
<br><br>
<button class="btn1" onclick="LogOutTeleSec()">Cerrar sesión</button>
`;
},
edit: function(mid) {
var qrscan = safeuuid()
container.innerHTML = `
<h1>Buscar con Aztec</h1>
<div id="${qrscan}"></div>
<br><br>`;
var html5QrcodeScanner = new Html5QrcodeScanner(
qrscan, { fps: 10, qrbox: 250 });
function onScanSuccess(decodedText, decodedResult) {
// Handle on success condition with the decoded text or result.
alert(`Scan result: ${decodedText}`, decodedResult);
// ...
html5QrcodeScanner.clear();
// ^ this will stop the scanner (video feed) and clear the scan area.
}
html5QrcodeScanner.render(onScanSuccess);
}
}