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>
|
||||
|
||||
<details class="first-details">
|
||||
<summary>Settings for me</summary>
|
||||
<summary>Options</summary>
|
||||
|
||||
|
||||
<fieldset>
|
||||
|
|
10
index.js
10
index.js
|
@ -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;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue