mirror of
https://github.com/lone-cloud/prism
synced 2026-06-03 08:43:10 -07:00
38 lines
1.2 KiB
HTML
38 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>SUP - Link Signal</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="icon" type="image/png" href="/favicon.png">
|
|
</head>
|
|
<body style="font-family: system-ui; max-width: 600px; margin: 50px auto; padding: 20px; text-align: center;">
|
|
<h1>Link Signal Account</h1>
|
|
<p>Scan this QR code with your Signal app:</p>
|
|
<p style="font-size: 1.1em;"><strong>Settings <span style="font-size: 1.5em;">→</span> Linked Devices <span style="font-size: 1.5em;">→</span> Link New Device</strong></p>
|
|
<div id="qr">Generating QR code...</div>
|
|
<script>
|
|
let refreshInterval;
|
|
|
|
function loadQR() {
|
|
fetch('/link/qr').then(r => r.text()).then(qr => {
|
|
document.getElementById('qr').innerHTML = `<img src="${qr}" style="max-width: 300px;" />`;
|
|
});
|
|
}
|
|
|
|
loadQR();
|
|
|
|
refreshInterval = setInterval(loadQR, 30000);
|
|
|
|
const check = setInterval(() => {
|
|
fetch('/link/status').then(r => r.json()).then(data => {
|
|
if (data.linked) {
|
|
clearInterval(check);
|
|
clearInterval(refreshInterval);
|
|
location.reload();
|
|
}
|
|
});
|
|
}, 2000);
|
|
</script>
|
|
</body>
|
|
</html>
|