From c3ff6bc17b36e183a2e32ecb845396a2c4b6db03 Mon Sep 17 00:00:00 2001 From: Web-serfer Date: Tue, 5 May 2026 20:52:45 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=B2=20=D0=BA=D0=BE=D0=BC=D0=BF?= =?UTF-8?q?=D0=BE=D0=BD=D0=B5=D0=BD=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/auth/reset-password.astro | 31 ++++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/auth/reset-password.astro b/frontend/src/pages/auth/reset-password.astro index a96b6f5..1aa87b6 100644 --- a/frontend/src/pages/auth/reset-password.astro +++ b/frontend/src/pages/auth/reset-password.astro @@ -166,13 +166,13 @@ const error = Astro.url.searchParams.get('error'); } submitBtn.disabled = true; - submitBtn.textContent = 'Сохранение...'; + submitBtn.classList.add('loading'); try { const response = await fetch('/api/auth/confirm-password-reset', { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ token, password, passwordConfirm }), + body: JSON.stringify({ token, password, passwordConfirm: confirmPassword }), }); const data = await response.json(); @@ -188,7 +188,7 @@ const error = Astro.url.searchParams.get('error'); if (errorEl) errorEl.textContent = 'Ошибка соединения'; } finally { submitBtn.disabled = false; - submitBtn.textContent = 'Сохранить пароль'; + submitBtn.classList.remove('loading'); } }); @@ -367,6 +367,31 @@ const error = Astro.url.searchParams.get('error'); box-shadow: 0 8px 20px rgba(206, 159, 64, 0.4); } + .btn-submit.loading { + position: relative; + color: transparent !important; + pointer-events: none; + } + + .btn-submit.loading::after { + content: ''; + position: absolute; + width: 20px; + height: 20px; + top: 50%; + left: 50%; + margin-left: -10px; + margin-top: -10px; + border: 2px solid #ffffff; + border-radius: 50%; + border-top-color: transparent; + animation: spin 0.8s linear infinite; + } + + @keyframes spin { + to { transform: rotate(360deg); } + } + .hidden { display: none !important; }