update
This commit is contained in:
18
index.html
18
index.html
@@ -66,14 +66,23 @@
|
||||
let el = document.createElement("div");
|
||||
el.style.textAlign = "center";
|
||||
el.style.borderRadius = "10px";
|
||||
el.style.backgroundColor = "#242495";
|
||||
el.style.padding = "10px";
|
||||
el.style.margin = "5px 25%";
|
||||
el.style.color = "white";
|
||||
el.style.cursor = "pointer";
|
||||
if (boat[2] == 'available')
|
||||
{
|
||||
el.style.backgroundColor = "#242495";
|
||||
el.style.color = "white";
|
||||
el.style.cursor = "pointer";
|
||||
el.addEventListener('click', selectBoat);
|
||||
}
|
||||
else
|
||||
{
|
||||
el.style.backgroundColor = "#CCCCCC";
|
||||
el.style.color = "black";
|
||||
el.style.cursor = "not-allowed";
|
||||
}
|
||||
el.id = "boat" + boat[0];
|
||||
el.innerHTML = boat[1];
|
||||
el.addEventListener('click', selectBoat);
|
||||
boatListEl.appendChild(el);
|
||||
}
|
||||
}
|
||||
@@ -88,6 +97,7 @@
|
||||
{
|
||||
console.error("ground station send FAIL");
|
||||
connection.send(clientId + ';boats');
|
||||
state = "connected";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user