feat(ui): Websocket
Started implementing functionality to Websocket.
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
}
|
||||
</div>
|
||||
<div class="col-12 text-center mb-5">
|
||||
<div class="btn btn-success" onclick="startGame('@gamelobby.id')">Start Game</div>
|
||||
<div class="btn btn-success" onclick="startGame('@gamelobby.id', '@user.get.id', '@user.get.name','@user.get.passwordHash', @user.get.internalId)">Start Game</div>
|
||||
</div>
|
||||
} else {
|
||||
<div id="players" class="justify-content-center align-items-center d-flex">
|
||||
@@ -98,6 +98,7 @@
|
||||
</div>
|
||||
</main>
|
||||
<script>
|
||||
/*
|
||||
function waitForFunction(name, checkInterval = 100) {
|
||||
return new Promise(resolve => {
|
||||
const timer = setInterval(() => {
|
||||
@@ -109,5 +110,6 @@
|
||||
});
|
||||
}
|
||||
waitForFunction("pollForUpdates").then(fn => fn('@gamelobby.id'));
|
||||
*/
|
||||
connectWebSocket()
|
||||
</script>
|
||||
@@ -30,4 +30,4 @@
|
||||
</main>
|
||||
<script>
|
||||
disconnectWebSocket();
|
||||
</script>
|
||||
</script>
|
||||
Reference in New Issue
Block a user