whatsapp/public/login.html
2025-05-06 11:54:23 +02:00

19 lines
504 B
HTML

<!DOCTYPE html>
<html>
<head><title>Connexion WhatsApp</title></head>
<body>
<h1>Scanne le QR Code</h1>
<div id="qr">Chargement...</div>
<script>
async function refreshQR() {
const res = await fetch('/api/qrcode');
const data = await res.json();
if (data.connected) location.href = '/connected';
else if (data.qr) document.getElementById('qr').innerHTML = `<img src="${data.qr}" />`;
setTimeout(refreshQR, 3000);
}
refreshQR();
</script>
</body>
</html>