add loading animation
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "no-copy-frontend",
|
"name": "no-copy-frontend",
|
||||||
"version": "0.31.0",
|
"version": "0.32.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 2999",
|
"dev": "next dev -p 2999",
|
||||||
|
|||||||
@@ -3837,3 +3837,28 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.loading-animation {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.global-spinner {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
margin: 0 auto;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border: 4px solid #e5e7eb;
|
||||||
|
border-top: 4px solid #667eea;
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -96,8 +96,18 @@ export default function LoginForm() {
|
|||||||
{t('forgot-password')}?
|
{t('forgot-password')}?
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" className={`${styles['btn']}`}>
|
<button
|
||||||
{t('sign-in')}
|
type="submit"
|
||||||
|
className={`${styles['btn']}`}
|
||||||
|
disabled={isPending}
|
||||||
|
>
|
||||||
|
{isPending ? (
|
||||||
|
<div className="loading-animation">
|
||||||
|
<div className="global-spinner"></div>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
t("sign-in")
|
||||||
|
)}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -432,8 +432,18 @@ export default function RegisterForm() {
|
|||||||
{t(formState?.error?.server)}
|
{t(formState?.error?.server)}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
<button type="submit" className={`${styles['btn']}`}>
|
<button
|
||||||
{t('create-an-account')}
|
type="submit"
|
||||||
|
className={`${styles['btn']}`}
|
||||||
|
disabled={isPending}
|
||||||
|
>
|
||||||
|
{isPending ? (
|
||||||
|
<div className="loading-animation">
|
||||||
|
<div className="global-spinner"></div>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
t("create-an-account")
|
||||||
|
)}
|
||||||
</button>
|
</button>
|
||||||
</form >
|
</form >
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -304,8 +304,18 @@ export function CompanyUsersSettingPanel() {
|
|||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<button type="submit" className="btn btn-primary">
|
<button
|
||||||
Добавить пользователя
|
type="submit"
|
||||||
|
className={`${styles['btn']}`}
|
||||||
|
disabled={isPending}
|
||||||
|
>
|
||||||
|
{isPending ? (
|
||||||
|
<div className="loading-animation">
|
||||||
|
<div className="global-spinner"></div>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
"Добавить пользователя"
|
||||||
|
)}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user