1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 17:10:10 +00:00

make whole invite clickable to expand

This commit is contained in:
Harvey Tindall 2021-01-21 17:59:16 +00:00
parent 882a3467db
commit b66654787c
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2

View File

@ -263,6 +263,11 @@ export class DOMInvite implements Invite {
const toggle = (this._infoArea.querySelector("input.inv-toggle-details") as HTMLInputElement); const toggle = (this._infoArea.querySelector("input.inv-toggle-details") as HTMLInputElement);
toggle.onchange = () => { this.expanded = !this.expanded; }; toggle.onchange = () => { this.expanded = !this.expanded; };
this._header.onclick = (event: Event) => {
if (event.target == this._header) {
this.expanded = !this.expanded;
}
};
this._details = document.createElement('div') as HTMLDivElement; this._details = document.createElement('div') as HTMLDivElement;
this._container.appendChild(this._details); this._container.appendChild(this._details);