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

@ -71,10 +71,9 @@ div.dynamic-container, div.nested-dynamic-container{
div.dynamic-container.resizable{
resize: vertical;
width: fit-content;
height: fit-content;
min-height: 1.5em;
max-height: 8em;
max-height: 17.5em;
padding: 0.5em 0.2em;
border-bottom-right-radius: 0;
}
@ -84,6 +83,15 @@ div.dynamic-container.resizable[style*="height"]{
max-height: 100%;
}
div.dynamic-container.table-container{
padding-top: 0;
}
div.dynamic-container.table-container table thead{
position: sticky;
top: 0;
}
.interactive{
cursor: pointer;
user-select: none;

View file

@ -257,6 +257,10 @@ textarea{
color: var(--accent1);
}
div.dynamic-container.table-container table thead{
background-color: var(--bg1);
box-shadow: var(--accent1) 0px 1em 1px -2em, var(--accent1) 0px 1em 1px -1em;
}
tr{
box-shadow: var(--accent1) 0px 1em 1px -2em, var(--accent1) 0px -1em 1px -1em;

View file

@ -277,6 +277,11 @@ textarea{
color: var(--accent1);
}
div.dynamic-container.table-container table thead{
background-color: var(--bg2-alt1);
box-shadow: var(--accent1) 0px 1em 1px -2em, var(--accent1) 0px 1em 1px -1em;
}
tr{
box-shadow: var(--accent1) 0px 1em 1px -2em, var(--accent1) 0px -1em 1px -1em;
}

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),