diff options
Diffstat (limited to 'assets/index.html')
-rw-r--r-- | assets/index.html | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/assets/index.html b/assets/index.html index 69f1958..9282726 100644 --- a/assets/index.html +++ b/assets/index.html @@ -38,9 +38,12 @@ fetch("rspace").then(resp => resp.text()).then(roomspace => { let roomspacenum = Number(roomspace); let e = document.getElementById('rspace'); - let t = document.createTextNode("room slots filled, if a room empties of active players it can be replaced by a new one"); + if (roomspacenum == 0) { + e.appendChild(document.createTextNode("all room slots filled, when a room empties it can be replaced by a new one")); + document.getElementById("createbtn").disabled = "disabled"; + } if (roomspacenum == 1) { - e.appendChild(document.createTextNode(`there is one available room slot`)); + e.appendChild(document.createTextNode(`there is 1 available room slot`)); } else if (roomspacenum > 1) { e.appendChild(document.createTextNode(`there are ${roomspacenum} available room slots`)); } @@ -61,7 +64,7 @@ <label>public, ie. shown in the lobby <input name="raccess" type="checkbox" checked></label><br> <label>safe first move (if possible)<input name="ralwayssafe1move" type="checkbox" checked></label><br> <label>player limit<input name="rlimit" type="number" value="32"></label><br> - <button>create</button> + <button id="createbtn">create</button> </fieldset> <form> </body> |