Prettied up UI for password resets. Now to move on to email component.

This commit is contained in:
rainbow napkin 2024-12-28 09:17:28 -05:00
parent ed698f40c7
commit 3671b43789
5 changed files with 51 additions and 18 deletions

View file

@ -169,6 +169,7 @@ class canopyUXUtils{
}
remove(){
this.tooltip.dispatchEvent(new Event("close"));
this.tooltip.remove();
}
}
@ -259,6 +260,8 @@ class canopyUXUtils{
}
closePopup(){
this.popupDiv.dispatchEvent(new Event("close"));
//Take out the popup
this.popupDiv.remove();
@ -487,8 +490,13 @@ class canopyAjaxUtils{
body: JSON.stringify({token, pass, confirmPass, verification})
});
//If we received a successful response
if(response.status == 200){
return await response.json();
//Create pop-up
const popup = new canopyUXUtils.popup("Your password has been reset!");
//Go to home-page on pop-up closure
popup.popupDiv.addEventListener("close", ()=>{window.location = '/'});
//Otherwise
}else{
utils.ux.displayResponseError(await response.json());
}