From 11dcd11a3e61b91eb351b26d69f9d70988aab2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C=20=D0=91=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D1=83=D1=80=D0=B8=D1=81=D1=82?= Date: Thu, 23 Apr 2026 19:08:06 +1000 Subject: [PATCH] - reCAPTCHA --- index.html | 2 +- src/components/Autherization/Authe.vue | 67 ++++++++++++++------------ 2 files changed, 36 insertions(+), 33 deletions(-) diff --git a/index.html b/index.html index 0acd6f7..3560912 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Parser - +
diff --git a/src/components/Autherization/Authe.vue b/src/components/Autherization/Authe.vue index b6fccab..7957412 100644 --- a/src/components/Autherization/Authe.vue +++ b/src/components/Autherization/Authe.vue @@ -15,42 +15,42 @@ const password = ref(""); const authError = ref(false); const isLoggedIn = ref(false); -// Показать badge reCAPTCHA -const showRecaptchaBadge = () => { - setTimeout(() => { - const badge = document.querySelector(".grecaptcha-badge"); - if (badge) { - badge.style.display = "block"; - } - }, 100); -}; +// // Показать badge reCAPTCHA +// const showRecaptchaBadge = () => { +// setTimeout(() => { +// const badge = document.querySelector(".grecaptcha-badge"); +// if (badge) { +// badge.style.display = "block"; +// } +// }, 100); +// }; -// Скрыть badge reCAPTCHA -const hideRecaptchaBadge = () => { - const badge = document.querySelector(".grecaptcha-badge"); - if (badge) { - badge.style.display = "none"; - } -}; +// // Скрыть badge reCAPTCHA +// const hideRecaptchaBadge = () => { +// const badge = document.querySelector(".grecaptcha-badge"); +// if (badge) { +// badge.style.display = "none"; +// } +// }; // Функция авторизации const auth_my = async () => { try { // Получение токена reCAPTCHA - const recaptchaToken = await grecaptcha.execute( - "6LdfSo8sAAAAAGGhbgIGO51nHgMUALYjcAMOxnOg", - { action: "login" }, - ); + // const recaptchaToken = await grecaptcha.execute( + // "6LdfSo8sAAAAAGGhbgIGO51nHgMUALYjcAMOxnOg", + // { action: "login" }, + // ); const response = await axios.post("https://allowlgroup.ru/api/8004/login", { username: login.value, password: password.value, - recaptcha_token: recaptchaToken, + // recaptcha_token: recaptchaToken, }); if (response.data.message === "Login successful") { authError.value = false; isLoggedIn.value = true; - hideRecaptchaBadge(); + // hideRecaptchaBadge(); emit("update", "rezylt"); } else { authError.value = true; @@ -63,7 +63,7 @@ const auth_my = async () => { // Обработка глобального нажатия Enter const handleKeyDown = (event) => { - if (event.key === "Enter" && !isLoggedIn.value) { + if (event.key === "Enter"&& !isLoggedIn.value) { auth_my(); } }; @@ -71,7 +71,7 @@ const handleKeyDown = (event) => { // Добавляем глобальный слушатель при монтировании onMounted(() => { window.addEventListener("keydown", handleKeyDown); - showRecaptchaBadge(); + // showRecaptchaBadge(); }); // Удаляем при размонтировании @@ -87,15 +87,18 @@ function showStartPage() { authError.value = false; isLoggedIn.value = false; // Показываем badge reCAPTCHA - showRecaptchaBadge(); + // showRecaptchaBadge(); } // Отслеживание перехода на страницу admin-panel -watch(() => props.currentPage, (newPage) => { - if (newPage === 'admin-panel' && !isLoggedIn.value) { - showRecaptchaBadge(); - } -}); +// watch( +// () => props.currentPage, +// (newPage) => { +// if (newPage === "admin-panel" && !isLoggedIn.value) { +// showRecaptchaBadge(); +// } +// }, +// ); - + -->