commander update
This commit is contained in:
@@ -38,6 +38,12 @@
|
||||
<button id="login">login</button>
|
||||
</div>
|
||||
<main>
|
||||
<div id="refresh" class="btn">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-clockwise" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2z"/>
|
||||
<path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466"/>
|
||||
</svg>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -76,6 +82,7 @@
|
||||
var boatsLocked = [];
|
||||
|
||||
loginEl.addEventListener('click', login);
|
||||
document.getElementById('refresh').addEventListener('click', refreshAll);
|
||||
|
||||
function login(e)
|
||||
{
|
||||
@@ -88,7 +95,13 @@
|
||||
function onOpen(e)
|
||||
{
|
||||
conn.send(passEl.value + ";4675;" + Math.floor(new Date().getTime()/1000.0));
|
||||
refreshAll()
|
||||
}
|
||||
|
||||
function refreshAll()
|
||||
{
|
||||
reqBoats();
|
||||
reqLockedBoats();
|
||||
reqClients();
|
||||
}
|
||||
|
||||
@@ -128,6 +141,11 @@
|
||||
conn.send(passEl.value + ";boats");
|
||||
}
|
||||
|
||||
function reqLockedBoats()
|
||||
{
|
||||
conn.send(passEl.value + ";locked");
|
||||
}
|
||||
|
||||
function reqClients()
|
||||
{
|
||||
conn.send(passEl.value + ";clients");
|
||||
|
||||
Reference in New Issue
Block a user