Rework sync procedure and add a loading indicator

The server will now send a sync message when the client connects via WebSocket. This removes the need to send another GET request to sync game data.
This commit is contained in:
Andrio Celos
2022-10-25 12:08:18 +11:00
parent 3ad1877a4c
commit d4e8d86571
14 changed files with 552 additions and 384 deletions

View File

@@ -29,7 +29,7 @@
<form id="preGameForm">
<p><label for="nameBox">Choose a nickname: <input type="text" id="nameBox" required minlength="1" maxlength="20"/></label></p>
<div id="preGameDefaultSection">
<input type="submit" id="preGameImplicitSubmitButton" tabindex="-1"/>
<button type="submit" id="preGameImplicitSubmitButton" tabindex="-1"></button>
<p>
<button type="submit" id="newGameButton">Create a room</button>
<label for="maxPlayersBox">
@@ -48,6 +48,9 @@
<p><button type="submit" id="joinGameButton2">Join game</button></p>
<a id="preGameBackButton" href="../..">Create or join a different room</a>
</div>
<div id="preGameLoadingSection" class="loadingContainer" hidden>
<div class="lds-ripple"><div></div><div></div></div> <span id="preGameLoadingLabel"></span>
</div>
<p>
<a id="preGameDeckEditorButton" href="deckeditor">Edit decks</a>
</p>