diff options
author | stale <redkugelblitzin@gmail.com> | 2022-05-31 18:06:52 -0300 |
---|---|---|
committer | stale <redkugelblitzin@gmail.com> | 2022-05-31 18:06:52 -0300 |
commit | 6c0907a825865956a169d7523b19121ea0e2e700 (patch) | |
tree | 572547831fab18925dc558d98a72842abd14bc9d /assets/index.html | |
parent | 47b2b1512484d66cd92ea38b27f94d4dd70cd0b6 (diff) |
added config file, room system finished
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> |