refactor: use button instead of anchor

also disabling button while waiting for response
This commit is contained in:
Miodec 2023-11-21 14:19:58 +00:00
parent 1ab6c82c0c
commit a195b959d2
2 changed files with 3 additions and 1 deletions

View file

@ -54,7 +54,9 @@ async function sendVerificationEmail(): Promise<void> {
}
Loader.show();
$(".sendVerificationEmail").prop("disabled", true);
const result = await Ape.users.verificationEmail();
$(".sendVerificationEmail").prop("disabled", false);
if (result.status !== 200) {
Loader.hide();
Notifications.add(

View file

@ -1349,7 +1349,7 @@ export const page = new Page(
$(".pageAccount .content p.accountVerificatinNotice").remove();
if (Auth?.currentUser?.emailVerified === false) {
$(".pageAccount .content").prepend(
`<p class="accountVerificatinNotice" style="text-align:center">Your account is not verified. <a class="sendVerificationEmail">Send the verification email again</a>.`
`<p class="accountVerificatinNotice" style="text-align:center">Your account is not verified - <button class="sendVerificationEmail">send the verification email again</button>`
);
}