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>
<details class="first-details">
<summary>Settings for me</summary>
<summary>Options</summary>
<fieldset>

View file

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