Added resizable/scrollable lists on admin panel

This commit is contained in:
rainbow napkin 2026-10-28 20:18:10 -04:00
parent a9f083dcc6
commit 3c37080cb7
9 changed files with 156 additions and 134 deletions

View file

@ -143,7 +143,7 @@ class adminPermissionList{
class adminUserBanList{
constructor(){
this.table = document.querySelector("#admin-ban-list-table");
this.tbody = document.querySelector("#admin-ban-list-table tbody");
this.getBanList();
}
@ -152,13 +152,6 @@ class adminUserBanList{
this.renderBanList(await adminUtil.getBans());
}
clearBanList(){
const oldRows = this.table.querySelectorAll('tr.gen-row');
oldRows.forEach((row) => {
row.remove();
});
}
async unban(event){
//Get username from target id
const user = event.target.dataset.name;
@ -168,7 +161,7 @@ class adminUserBanList{
renderBanList(banList){
//Clear out the ban list
this.clearBanList();
this.tbody.innerHTML = "";
//For each ban received
banList.forEach((ban) => {
@ -195,7 +188,7 @@ class adminUserBanList{
}
//Generate and append row to table
this.table.appendChild(utils.ux.newTableRow([
this.tbody.appendChild(utils.ux.newTableRow([
this.renderUser(ban.user, nuked),
this.renderUsers(ban.alts, nuked),
this.renderDeadUsers(ban.deletedNames),