clean: respect es11
This commit is contained in:
@ -17,13 +17,13 @@ export default class extends AbstractAuthenticatedView
|
||||
async receive(data)
|
||||
{
|
||||
if (data.detail === "nb_participants" || data.detail === "update_participants")
|
||||
document.getElementById("nb_participants").innerText = `${data.nb_participants} / ${this.tournament.nb_players}`
|
||||
document.getElementById("nb_participants").innerText = `${data.nb_participants} / ${this.tournament.nb_players}`;
|
||||
if (data.detail === "go_to")
|
||||
navigateTo(data.url);
|
||||
if (data.detail === "is_participant")
|
||||
this.updateParticipating(data.is_participant)
|
||||
this.updateParticipating(data.is_participant);
|
||||
if (data.detail === "error")
|
||||
document.getElementById("display").innerText = data.error_message
|
||||
document.getElementById("display").innerText = data.error_message;
|
||||
}
|
||||
|
||||
async updateParticipating(state)
|
||||
@ -45,7 +45,7 @@ export default class extends AbstractAuthenticatedView
|
||||
|
||||
this.tournament.join(this.receive.bind(this), this.ondisconnect.bind(this));
|
||||
|
||||
let button = document.getElementById("button")
|
||||
let button = document.getElementById("button");
|
||||
|
||||
button.onclick = this.pressButton.bind(this);
|
||||
|
||||
@ -93,6 +93,6 @@ export default class extends AbstractAuthenticatedView
|
||||
</table>
|
||||
<input type="button" id="button" value="Join tournament" disabled>
|
||||
<span id="display"></span>
|
||||
`
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user