Chore: cleanup

This commit is contained in:
Dorian Zedler 2023-01-05 10:24:28 +01:00
parent 15bf78d373
commit 223c5c251a
Signed by: dorian
GPG key ID: 989DE36109AFA354
2 changed files with 6 additions and 6 deletions

View file

@ -40,7 +40,7 @@
</button> </button>
<details class="first-details"> <details class="first-details">
<summary>Settings for me</summary> <summary>Options</summary>
<fieldset> <fieldset>

View file

@ -189,14 +189,14 @@ document.addEventListener("alpine:init", () => {
if (topic === that._playersTopic) { if (topic === that._playersTopic) {
const data = JSON.parse(message.toString()); const data = JSON.parse(message.toString());
if (!Alpine.store("remoteState").connected) { if (!that.connected) {
Alpine.store("remoteState").connected = true; that.connected = true;
} }
Alpine.store("remoteState").players = data; that.players = data;
} else if (topic === that._currentPlayerTopic) { } else if (topic === that._currentPlayerTopic) {
const data = JSON.parse(message.toString()); const data = JSON.parse(message.toString());
Alpine.store("remoteState").currentPlayer = data.id; that.currentPlayer = data.id;
Alpine.store("remoteState").lastPlayerSwitch = data.since; that.lastPlayerSwitch = data.since;
} }
}); });
}, },