moved to static website folder
|
|
@ -246,7 +246,7 @@ def set_room_details_carpet_color(room_id):
|
|||
conn, curr = connectToDB()
|
||||
query = """
|
||||
UPDATE `Room`
|
||||
SET `tv_url` = %(tv_url)s,
|
||||
SET `carpet_color` = %(carpet_color)s,
|
||||
`last_modified` = CURRENT_TIMESTAMP
|
||||
WHERE `room_id` = %(room_id)s;
|
||||
"""
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 815 B After Width: | Height: | Size: 815 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 977 B After Width: | Height: | Size: 977 B |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
|
@ -2,18 +2,18 @@
|
|||
|
||||
<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">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png">
|
||||
<link rel="manifest" href="/favicons/site.webmanifest">
|
||||
<link rel="mask-icon" href="/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>
|
||||
<link rel="stylesheet" href="/css/spectre.min.css">
|
||||
<script src="/js/util.js"></script>
|
||||
<style>
|
||||
.container {
|
||||
max-width: 30em;
|
||||
|
|
@ -45,11 +45,10 @@
|
|||
<div id="headset_details" style="display: none;">
|
||||
<div class="panel card">
|
||||
<div class="panel-header text-center">
|
||||
<figure class="avatar avatar-lg"><img src="/static/favicons/android-chrome-192x192.png"
|
||||
<figure class="avatar avatar-lg"><img src="/favicons/android-chrome-192x192.png"
|
||||
alt="Avatar"></figure>
|
||||
<div class="panel-title h5 mt-10">Headset Info</div>
|
||||
<div class="panel-subtitle hw_id">---</div>
|
||||
<div class="panel-subtitle user_name">---</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="tile tile-centered">
|
||||
|
|
@ -77,6 +76,17 @@
|
|||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="tile tile-centered">
|
||||
<div class="tile-content">
|
||||
<div class="tile-title text-bold">User Name</div>
|
||||
<input class="btn user_name" type="text" id="user_name" placeholder="----">
|
||||
</div>
|
||||
<div class="tile-action">
|
||||
<button class="btn btn-primary btn-lg tooltip tooltip-left" id="set_user_name"
|
||||
data-tooltip="">Set</button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="tile tile-centered">
|
||||
<div class="tile-content">
|
||||
<div class="tile-title text-bold">TV URL</div>
|
||||
|
|
@ -134,7 +144,7 @@
|
|||
loading.style.display = "none";
|
||||
if (hw_id != "") {
|
||||
|
||||
httpGetAsync('/api/get_state/' + hw_id, (resp) => {
|
||||
httpGetAsync('http://3.141.15.55/api/get_state/' + hw_id, (resp) => {
|
||||
console.log(resp);
|
||||
let respData = JSON.parse(resp);
|
||||
|
||||
|
|
@ -155,14 +165,14 @@
|
|||
});
|
||||
|
||||
function setUserData(endpoint, data) {
|
||||
httpPostAsync('/api/set_headset_details/' + hw_id + '/' + endpoint,
|
||||
httpPostAsync('http://3.141.15.55/api/set_headset_details/' + hw_id + '/' + endpoint,
|
||||
data,
|
||||
(resp) => {console.log('success');},
|
||||
(status) => {console.log('fail');}
|
||||
);
|
||||
}
|
||||
function setRoomData(endpoint, data) {
|
||||
httpPostAsync('/api/set_room_details/' + current_room.value + '/' + endpoint,
|
||||
httpPostAsync('http://3.141.15.55/api/set_room_details/' + current_room.value + '/' + endpoint,
|
||||
data,
|
||||
(resp) => {console.log('success');},
|
||||
(status) => {console.log('fail');}
|
||||
|
|
@ -175,6 +185,9 @@
|
|||
document.getElementById('set_user_color').addEventListener('click', () => {
|
||||
setUserData('user_color', {"user_color": document.getElementById('user_color').value});
|
||||
});
|
||||
document.getElementById('set_user_name').addEventListener('click', () => {
|
||||
setUserData('user_name', {"user_name": document.getElementById('user_name').value});
|
||||
});
|
||||
document.getElementById('set_tv_url').addEventListener('click', () => {
|
||||
setRoomData('tv_url', {"tv_url": document.getElementById('tv_url').value});
|
||||
});
|
||||
|
|
@ -2,18 +2,18 @@
|
|||
|
||||
<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">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png">
|
||||
<link rel="manifest" href="/favicons/site.webmanifest">
|
||||
<link rel="mask-icon" href="/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>
|
||||
<link rel="stylesheet" href="/css/spectre.min.css">
|
||||
<script src="/js/util.js"></script>
|
||||
<style>
|
||||
:root {
|
||||
--primary-color: #bc1f2d;
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img src="/static/img/pair_code_screenshot.png" class="img-responsive">
|
||||
<img src="/img/pair_code_screenshot.png" class="img-responsive">
|
||||
</div>
|
||||
<div class="card-header">
|
||||
<div class="card-title h5">Enter Pairing Code</div>
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
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) => {
|
||||
httpGetAsync('http://3.141.15.55/api/pair_headset/' + pair_code_input.value, (resp) => {
|
||||
console.log(resp);
|
||||
let respData = JSON.parse(resp);
|
||||
if (respData['hw_id'] != '') {
|
||||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
<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">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png">
|
||||
<link rel="manifest" href="/favicons/site.webmanifest">
|
||||
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<meta name="msapplication-TileColor" content="#b91d47">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||