fix: CAPTCHA
This commit is contained in:
@@ -65,13 +65,20 @@ watch(
|
||||
recaptchaResponse: recaptcha,
|
||||
turnstileResponse: turnstile
|
||||
});
|
||||
} else {
|
||||
// At least one token is missing
|
||||
emit('captchaVerified', {
|
||||
hCaptchaResponse: null,
|
||||
recaptchaResponse: null,
|
||||
turnstileResponse: null
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
const reset = () => {
|
||||
hcaptchaRef.value?.reset();
|
||||
if (recaptchaWidgetId.value) handleRecaptchaReset(recaptchaWidgetId.value);
|
||||
handleRecaptchaReset(recaptchaWidgetId.value);
|
||||
turnstileRef.value?.reset();
|
||||
};
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ const generateMotto = async () => {
|
||||
captcha.value.reset();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
alert('Failed to generate motto.');
|
||||
alert('Failed to generate motto: ' + error.message);
|
||||
}
|
||||
|
||||
mottoLoading.value = false;
|
||||
|
||||
Reference in New Issue
Block a user