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', {