From 31ba3a2b6c9fdd457d9ef344a1cabf522ab32cc1 Mon Sep 17 00:00:00 2001 From: Yro Boros Date: Thu, 19 Mar 2026 12:24:31 +1000 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BA=D0=B0=D0=BF=D1=87=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 5 +++-- src/App.vue | 26 +------------------------- src/assets/main.css | 4 ++++ src/components/Authe.vue | 8 +++++++- 4 files changed, 15 insertions(+), 28 deletions(-) diff --git a/index.html b/index.html index 92673d0..0acd6f7 100644 --- a/index.html +++ b/index.html @@ -2,9 +2,10 @@ - + - Vite App + Parser +
diff --git a/src/App.vue b/src/App.vue index 03a2bb2..19a3ebb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,9 +3,8 @@ import { onMounted, ref, watch } from "vue"; import My_naw from "./components/My_naw.vue"; import Section from "./components/Section.vue"; import Setings from "./components/Setings.vue"; -// import Status from "./components/Status.vue"; import Authe from "./components/Authe.vue"; -// import axios from "axios"; + // Инициализация темы при загрузке приложения onMounted(() => { @@ -24,29 +23,6 @@ onMounted(() => { // Состояния страницы и данные для входа const currentPage = ref("admin-panel"); -// const items = ref([]); -// const items_status = ref([]); - -// Универсальная функция для получения данных -// const fetchData = async (url, targetRef) => { -// try { -// const { data } = await axios.get(url); -// targetRef.value = data; -// } catch (err) { -// console.error(`Ошибка при получении данных с ${url}:`, err); -// } -// }; - -// const loadItems_status = () => -// fetchData("http://45.129.78.228:8002/records_all_status", items_status); - -// onMounted(() => { -// (loadItems(), loadItems_status()); -// (loadItems_status()); -// }); - -// watch(items, loadItems); -// watch(items_status, loadItems_status); function handleUpdate(newValue) { currentPage.value = newValue; // изменение значения в родителе diff --git a/src/assets/main.css b/src/assets/main.css index ed14fc6..639b8a1 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -13,3 +13,7 @@ body { .dark body { background-color: #111827; } + +/* .grecaptcha-badge { + display: none !important; +} */ \ No newline at end of file diff --git a/src/components/Authe.vue b/src/components/Authe.vue index dee8a8e..241fa9d 100644 --- a/src/components/Authe.vue +++ b/src/components/Authe.vue @@ -17,9 +17,13 @@ const authError = ref(false); // Функция авторизации const auth_my = async () => { try { - const response = await axios.post("http://45.129.78.228:8004/login", { + // Получение токена reCAPTCHA + const recaptchaToken = await grecaptcha.execute("6LdfSo8sAAAAAGGhbgIGO51nHgMUALYjcAMOxnOg", { action: "login" }); + + const response = await axios.post("http://127.0.0.1:8004/login", { username: login.value, password: password.value, + recaptcha_token: recaptchaToken, }); if (response.data.message === "Login successful") { authError.value = false; @@ -57,6 +61,7 @@ function showStartPage() { password.value = ""; authError.value = false; } + \ No newline at end of file