Chore: cleanup
This commit is contained in:
parent
15bf78d373
commit
223c5c251a
2 changed files with 6 additions and 6 deletions
|
@ -40,7 +40,7 @@
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<details class="first-details">
|
<details class="first-details">
|
||||||
<summary>Settings for me</summary>
|
<summary>Options</summary>
|
||||||
|
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
10
index.js
10
index.js
|
@ -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;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue