91 lines
2.8 KiB
Django/Jinja
91 lines
2.8 KiB
Django/Jinja
<html>
|
|
|
|
<head>
|
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/favicons/apple-touch-icon.png">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicons/favicon-32x32.png">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/favicons/favicon-16x16.png">
|
|
<link rel="manifest" href="/static/favicons/site.webmanifest">
|
|
<link rel="mask-icon" href="/static/favicons/safari-pinned-tab.svg" color="#5bbad5">
|
|
<meta name="msapplication-TileColor" content="#b91d47">
|
|
<meta name="theme-color" content="#ffffff">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="/static/css/spectre.min.css">
|
|
<script src="/static/js/util.js"></script>
|
|
<style>
|
|
:root {
|
|
--primary-color: #bc1f2d;
|
|
}
|
|
|
|
#pair_code {
|
|
max-width: 4em;
|
|
}
|
|
|
|
.container {
|
|
max-width: 30em;
|
|
}
|
|
|
|
.card {
|
|
margin: 1em;
|
|
box-shadow: 0 0 2em #0003;
|
|
}
|
|
|
|
input.btn {
|
|
cursor: auto;
|
|
user-select: auto;
|
|
}
|
|
|
|
.centered {
|
|
margin: auto;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<!-- <div class="hero bg-gray">
|
|
<div class="hero-body">
|
|
<h1>Pair your headset.</h1>
|
|
</div>
|
|
</div> -->
|
|
|
|
<div class="card">
|
|
<div class="card-image">
|
|
<img src="/static/img/pair_code_screenshot.png" class="img-responsive">
|
|
</div>
|
|
<div class="card-header">
|
|
<div class="card-title h5">Enter Pairing Code</div>
|
|
<div class="card-subtitle text-gray"></div>
|
|
</div>
|
|
<div class="card-body">
|
|
You can find the code in the bottom left of your menu tablet in conVRged.
|
|
</div>
|
|
<div class="card-footer centered">
|
|
<input class="btn" type="text" id="pair_code" placeholder="0000">
|
|
<button class="btn btn-primary" id="submit_pairing_code">Submit</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
|
|
let submit_button = document.getElementById('submit_pairing_code');
|
|
let pair_code_input = document.getElementById('pair_code');
|
|
submit_button.addEventListener('click', () => {
|
|
httpGetAsync('/api/pair_headset/' + pair_code_input.value, (resp) => {
|
|
console.log(resp);
|
|
let respData = JSON.parse(resp);
|
|
if (respData['hw_id'] != '') {
|
|
document.cookie = "hw_id=" + respData['hw_id'] + "; SameSite=None; Secure";
|
|
window.location.href = "/";
|
|
}
|
|
}, (status) => {
|
|
window.location.href = "/failure";
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |