accounts: move filter button, add clear search

filter button now on left due to the dropdown being huge.
This commit is contained in:
Harvey Tindall
2023-06-14 17:36:41 +01:00
parent 6f452c62de
commit ddc560e862
3 changed files with 11 additions and 3 deletions
+6
View File
@@ -1810,6 +1810,12 @@ export class accountsList {
};
this._search.oninput = onchange;
const clearSearchButton = document.getElementById("accounts-search-clear") as HTMLSpanElement;
clearSearchButton.addEventListener("click", () => {
this._search.value = "";
onchange();
});
this._announceTextarea.onkeyup = this.loadPreview;
addDiscord = newDiscordSearch(window.lang.strings("linkDiscord"), window.lang.strings("searchDiscordUser"), window.lang.strings("add"), (user: DiscordUser, id: string) => {
_post("/users/discord", {jf_id: id, discord_id: user.id}, (req: XMLHttpRequest) => {