mirror of
https://github.com/arx-research/libhalo.git
synced 2026-01-10 13:48:08 -05:00
49 lines
1.2 KiB
HTML
49 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<link rel="stylesheet" href="/themes/dsc/style.css" />
|
|
|
|
<title>Digital Spenders Club Gateway</title>
|
|
</head>
|
|
<body>
|
|
<div class="wrapper">
|
|
<img width="32" src="/themes/dsc/logo.png" alt="Digital Spenders Club" />
|
|
<h1 id="heading">Verify your DSC membership</h1>
|
|
<button id="button" disabled>Scan Membership Card</button>
|
|
</div>
|
|
|
|
<script src="/assets/static/libhalo.js"></script>
|
|
<script>
|
|
var heading = document.querySelector("#heading");
|
|
var btn = document.querySelector("#button");
|
|
|
|
function log(msg) {
|
|
console.log(msg);
|
|
}
|
|
|
|
async function confirmButtonClicked(ev) {
|
|
try {
|
|
await haloGateExecutorUserConfirm(log);
|
|
} catch (e) {
|
|
btn.disabled = true;
|
|
}
|
|
}
|
|
|
|
async function run() {
|
|
try {
|
|
await haloGateExecutorCreateWs(log, (command) => {
|
|
btn.disabled = false;
|
|
});
|
|
} catch (e) {
|
|
return;
|
|
}
|
|
|
|
btn.onclick = confirmButtonClicked;
|
|
}
|
|
|
|
run();
|
|
</script>
|
|
</body>
|
|
</html>
|