|
@@ -35,7 +35,6 @@ const password = ref({
|
|
message:
|
|
message:
|
|
"Include at least one lowercase letter, one uppercase letter, one number and one special character."
|
|
"Include at least one lowercase letter, one uppercase letter, one number and one special character."
|
|
});
|
|
});
|
|
-const recaptchaToken = ref("");
|
|
|
|
const passwordElement = ref();
|
|
const passwordElement = ref();
|
|
|
|
|
|
const { register } = useUserAuthStore();
|
|
const { register } = useUserAuthStore();
|
|
@@ -53,7 +52,6 @@ const submitModal = () => {
|
|
username: username.value.value,
|
|
username: username.value.value,
|
|
email: email.value.value,
|
|
email: email.value.value,
|
|
password: password.value.value,
|
|
password: password.value.value,
|
|
- recaptchaToken: recaptchaToken.value
|
|
|
|
})
|
|
})
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
if (res.status === "success") window.location.reload();
|
|
if (res.status === "success") window.location.reload();
|
|
@@ -146,27 +144,6 @@ onMounted(async () => {
|
|
new Toast("Registration is disabled.");
|
|
new Toast("Registration is disabled.");
|
|
closeCurrentModal();
|
|
closeCurrentModal();
|
|
}
|
|
}
|
|
-
|
|
|
|
- if (recaptcha.value.enabled) {
|
|
|
|
- const recaptchaScript = document.createElement("script");
|
|
|
|
- recaptchaScript.onload = () => {
|
|
|
|
- grecaptcha.ready(() => {
|
|
|
|
- grecaptcha
|
|
|
|
- .execute(recaptcha.value.key, {
|
|
|
|
- action: "login"
|
|
|
|
- })
|
|
|
|
- .then(token => {
|
|
|
|
- recaptchaToken.value = token;
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- recaptchaScript.setAttribute(
|
|
|
|
- "src",
|
|
|
|
- `https://www.google.com/recaptcha/api.js?render=${recaptcha.value.key}`
|
|
|
|
- );
|
|
|
|
- document.head.appendChild(recaptchaScript);
|
|
|
|
- }
|
|
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -342,17 +319,7 @@ onMounted(async () => {
|
|
filter: brightness(5);
|
|
filter: brightness(5);
|
|
}
|
|
}
|
|
|
|
|
|
-#recaptcha {
|
|
|
|
- padding: 10px 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
a {
|
|
a {
|
|
color: var(--primary-color);
|
|
color: var(--primary-color);
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
-
|
|
|
|
-<style lang="less">
|
|
|
|
-.grecaptcha-badge {
|
|
|
|
- z-index: 2000;
|
|
|
|
-}
|
|
|
|
-</style>
|
|
|