better list tournament

This commit is contained in:
Xamora 2024-04-19 11:23:15 +02:00
parent 9bc3092a0e
commit ce367678d7
2 changed files with 8 additions and 2 deletions

View File

@ -72,7 +72,8 @@ class Tourmanent extends AExchangeable
return;
this.connected = false;
this._socket.close();
this.disconnectHandler(event);
if (this.disconnectHandler != null)
this.disconnectHandler(event);
}
/**

View File

@ -1,4 +1,4 @@
import {client} from "../../index.js";
import {client, navigateTo} from "../../index.js";
import AbstractAuthenticatedView from "../abstracts/AbstractAuthenticatedView.js";
export default class extends AbstractAuthenticatedView
@ -39,6 +39,11 @@ export default class extends AbstractAuthenticatedView
// name
let td = document.createElement("td");
td.innerText = tournament.name;
td.onclick = async () => {
await navigateTo(String(tournament.id));
}
td.style.cursor = "pointer";
td.style.textDecoration = "underline";
tr.appendChild(td);
// state