From 3a246c083724159c42c49fda16191e0ec44ba29e Mon Sep 17 00:00:00 2001 From: Web-serfer Date: Tue, 5 May 2026 23:45:42 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D1=8B=D0=B5=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/auth/sign-in.astro | 42 ++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/auth/sign-in.astro b/frontend/src/pages/auth/sign-in.astro index ae4549f..48ac856 100644 --- a/frontend/src/pages/auth/sign-in.astro +++ b/frontend/src/pages/auth/sign-in.astro @@ -307,6 +307,46 @@ import { SITE_URL } from '@constants'; transform: translateY(0); } + .btn-submit:disabled { + background: #94a3b8; + cursor: not-allowed; + transform: none; + box-shadow: none; + } + + .btn-submit:disabled:hover { + transform: none; + box-shadow: none; + } + + .btn-submit.loading, + .btn-submit.loading:disabled { + position: relative; + color: transparent !important; + pointer-events: none; + opacity: 1 !important; + background: linear-gradient(135deg, #eac26e 0%, #ce9f40 100%) !important; + } + + .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); } + } + /* Подвал формы */ .auth-footer { text-align: center; @@ -554,7 +594,7 @@ import { SITE_URL } from '@constants'; const submitBtn = document.querySelector('.btn-submit') as HTMLButtonElement; submitBtn.disabled = true; - submitBtn.textContent = 'Вход...'; + submitBtn.classList.add('loading'); try { const response = await fetch('/api/auth/sign-in', {