diff --git a/html/admin.html b/html/admin.html index d14a053..93f23d3 100644 --- a/html/admin.html +++ b/html/admin.html @@ -771,6 +771,7 @@
| + | `; } innerHTML += ` @@ -1047,6 +1047,7 @@ export class accountsList extends PaginatedList { } }; + private _inDetails: boolean = false; details(username: string, jfId: string) { this.unbindPageEvents(); console.debug("Loading details for ", username, jfId); @@ -1055,14 +1056,17 @@ export class accountsList extends PaginatedList { jfId, () => { this.unbindPageEvents(); + this._inDetails = true; + // To make things look better, run processSelectedAccounts before -actually- unhiding. + this.processSelectedAccounts(); this._table.classList.add("unfocused"); this._details.hidden = false; - this.processSelectedAccounts(); }, () => { + this._inDetails = false; + this.processSelectedAccounts(); this._details.hidden = true; this._table.classList.remove("unfocused"); - this.processSelectedAccounts(); this.bindPageEvents(); }, ); @@ -1667,11 +1671,24 @@ export class accountsList extends PaginatedList { this._enableReferrals.textContent = window.lang.strings("disableReferrals"); } } + if (this._details.hidden) { + this._c.loadAllButtons.forEach((el) => { + // FIXME: Using hidden here instead of unfocused so that it doesn't interfere with any PaginatedList behaviour. Don't do this. + el.classList.add("hidden"); + }); + this._addUserButton.classList.remove("unfocused"); + } else { + this._c.loadAllButtons.forEach((el) => { + // FIXME: Using hidden here instead of unfocused so that it doesn't interfere with any PaginatedList behaviour. Don't do this. + el.classList.add("hidden"); + }); + this._addUserButton.classList.add("unfocused"); + } } }; private _collectUsers = (): string[] => { - if (!this._details.hidden && this._details.jfId != "") return [this._details.jfId]; + if (this._inDetails && this._details.jfId != "") return [this._details.jfId]; let list: string[] = []; for (let id of this._visible) { if (this.users.get(id).selected) { @@ -2836,7 +2853,10 @@ interface ShowDetailsEvent extends Event { } class UserInfo extends PaginatedList { + private _hidden: boolean = true; + private _table: HTMLElement; private _card: HTMLElement; + private _noResults: HTMLElement; get entries(): Map |
| ${window.lang.strings("severity")} | -${window.lang.strings("details")} | -${window.lang.strings("type")} | -${window.lang.strings("other")} | -${window.lang.strings("date")} | -
|---|
| ${window.lang.strings("severity")} | +${window.lang.strings("details")} | +${window.lang.strings("type")} | +${window.lang.strings("other")} | +${window.lang.strings("date")} | +
|---|