Add NFC enable/disable support; update devices, Sonoff, and Tuya

This commit is contained in:
2026-04-13 21:35:17 +03:00
parent 86bfecca26
commit 5340f88ffe
15 changed files with 843 additions and 175 deletions

View File

@@ -65,6 +65,8 @@
<i class="bi bi-qr-code me-1"></i>Generate QR Code
</button>
<div id="qr-error-area"></div>
<div id="qr-area" class="text-center d-none">
<div id="qr-canvas" class="d-inline-block p-2 bg-white rounded mb-3"></div>
<p class="text-muted small mb-1" id="qr-instruction">
@@ -114,6 +116,7 @@
btnCancel.addEventListener('click', cancelQr);
function startQr() {
document.getElementById('qr-error-area').innerHTML = '';
const code = inputCode.value.trim();
if (!code) {
inputCode.focus();
@@ -205,10 +208,12 @@
}
function showError(msg) {
const area = document.getElementById('qr-error-area');
area.innerHTML = '';
const el = document.createElement('div');
el.className = 'alert alert-danger py-2 mt-2';
el.textContent = msg;
qrCanvas.after(el);
area.appendChild(el);
}
})();
</script>