update: reset captcha after submission
This commit is contained in:
@@ -8,6 +8,8 @@ const username = ref('');
|
||||
const password = ref('');
|
||||
const hcaptchaResponse = ref('');
|
||||
|
||||
const hcaptchaRef = ref(null);
|
||||
|
||||
const usernameError = ref('');
|
||||
const passwordError = ref('');
|
||||
|
||||
@@ -62,6 +64,7 @@ const submit = () => {
|
||||
}
|
||||
|
||||
emit('login-submit', { username: username.value, password: password.value, hcaptchaResponse: hcaptchaResponse.value });
|
||||
hcaptchaRef.value.reset();
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -90,9 +93,11 @@ const submit = () => {
|
||||
</div>
|
||||
</div>
|
||||
<VueHcaptcha
|
||||
ref="hcaptchaRef"
|
||||
:sitekey="$hcaptchaSitekey"
|
||||
@verify="handleHcaptchaVerify"
|
||||
@expired="handleHcaptchaExpired"
|
||||
@reset="handleHcaptchaExpired"
|
||||
/>
|
||||
<div class="ts-wrap has-top-spaced is-end-aligned">
|
||||
<button class="ts-button is-fluid" type="submit" :class="{
|
||||
|
||||
Reference in New Issue
Block a user