diff --git a/public/index.html b/public/index.html index 4dd0e8225..6dddcbdf2 100644 --- a/public/index.html +++ b/public/index.html @@ -7,7 +7,7 @@ Monkey Type - + @@ -1353,17 +1353,17 @@ - + - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/public/js/account.js b/public/js/account.js index b08b0a385..ac24d8413 100644 --- a/public/js/account.js +++ b/public/js/account.js @@ -194,11 +194,10 @@ function signOut() { } function sendVerificationEmail() { - firebase - .auth() - .currentUser.sendEmailVerification() + let cu = firebase.auth().currentUser; + cu.sendEmailVerification() .then((e) => { - showNotification("Email sent", 3000); + showNotification("Email sent to " + cu.email, 4000); }) .catch((e) => { showNotification("Error: " + e.message, 3000); @@ -209,6 +208,11 @@ function sendVerificationEmail() { firebase.auth().onAuthStateChanged(function (user) { if (user) { // User is signed in. + if (user.emailVerified === false) { + $(".pageAccount .content").prepend( + `

Your account is not verified. Click here to resend the verification email.` + ); + } updateAccountLoginButton(); accountIconLoading(true); db_getUserSnapshot().then((e) => {