Added logic to keep banned users out of site

This commit is contained in:
rainbow napkin 2024-11-29 09:00:47 -05:00
parent c848994c1d
commit 26df91262f
4 changed files with 28 additions and 6 deletions

View file

@ -317,7 +317,7 @@ class adminUserBanList{
entryRow.appendChild(newCell(ban.user.user));
entryRow.appendChild(newCell(new Date(ban.user.date).toDateString()));
entryRow.appendChild(newCell(new Date(ban.banDate).toDateString()));
entryRow.appendChild(newCell(`${expirationDate.toDateString()} (${expirationDays} days left)`));
entryRow.appendChild(newCell(`${expirationDate.toDateString()} (${expirationDays} day(s) left)`));
entryRow.appendChild(newCell(ban.permanent ? "Account Deletion" : "Un-Ban"));
entryRow.appendChild(newCell([unbanIcon, nukeAccount]));

View file

@ -28,7 +28,7 @@ class canopyUXUtils{
displayResponseError(body){
const errors = body.errors;
errors.forEach((err)=>{
window.alert(`ERROR: ${err.msg} \nTYPE: ${err.type} \nDATE: ${err.date}`);
new canopyUXUtils.popup(`<h3>Server Error:</h3><p><br>Message: ${err.msg}`);
});
}
@ -73,8 +73,10 @@ class canopyUXUtils{
//display popup nodes
this.displayPopup();
//Callbacks are kinda out of vogue, but there really isn't a good way to handle asynchronously constructed objects/classes
this.cb();
if(this.cb){
//Callbacks are kinda out of vogue, but there really isn't a good way to handle asynchronously constructed objects/classes
this.cb();
}
}
displayPopup(){