Replaced window.prompt()/alert() with custom popup

This commit is contained in:
rainbow napkin 2024-12-05 03:46:44 -05:00
parent 8ccb9003cc
commit ee5a8d9516
14 changed files with 138 additions and 63 deletions

View file

@ -44,11 +44,7 @@ class channel{
});
this.socket.on("kick", (data) => {
if(data.type == "kick"){
window.alert(`You have been kicked from the channel for the following reason:\n\n${data.reason}`);
}else{
window.alert(`You have been disconnceted from the channel by the server!\nType: ${data.type}\nReason: ${data.reason}`);
}
new canopyUXUtils.popup(`You have been ${data.type} from the channel for the following reason:<br>${data.reason}`);
});
this.socket.on("clientMetadata", this.handleClientInfo.bind(this));