fix: CAPTCHA

This commit is contained in:
Tony Yang
2025-04-17 10:53:48 +08:00
parent 8a952e3251
commit dbb4598164
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -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();
};
+1 -1
View File
@@ -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;