This commit is contained in:
2024-08-12 21:43:14 +02:00
parent 1b24417acb
commit dc24bdfa6d
3 changed files with 23 additions and 7 deletions

View File

@@ -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
{