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