polish responsive auth screen
This commit is contained in:
parent
5790c96a3d
commit
db34a9ab2f
2 changed files with 46 additions and 5 deletions
|
|
@ -464,8 +464,8 @@ function AuthScreen({ hasPasskeys, onAuthenticated }: { hasPasskeys: boolean; on
|
|||
}
|
||||
|
||||
return (
|
||||
<main className="flex min-h-screen items-center justify-center bg-muted/35 p-4">
|
||||
<section className="w-full max-w-md rounded-lg border bg-background p-6 shadow-lg">
|
||||
<main className="auth-screen flex min-h-screen items-center justify-center p-4 sm:p-6">
|
||||
<section className="auth-card w-full max-w-md rounded-lg border bg-background/90 p-4 shadow-xl sm:p-6">
|
||||
<div className="mb-6 flex items-center gap-3">
|
||||
<img alt="Логотип Дзен-ассистента" className="size-12 rounded-md" src="/favicon.png" />
|
||||
<div><h1 className="text-xl font-semibold">Дзен-ассистент</h1><p className="text-sm text-muted-foreground">Вход в редакторскую панель</p></div>
|
||||
|
|
@ -480,17 +480,17 @@ function AuthScreen({ hasPasskeys, onAuthenticated }: { hasPasskeys: boolean; on
|
|||
) : null}
|
||||
{vkAuthenticated ? (
|
||||
<>
|
||||
<Button className="mt-3 w-full" disabled={busy} onClick={onAuthenticated} variant="outline">
|
||||
<Button className="mt-3 min-h-11 w-full whitespace-normal px-4 py-3 text-center leading-5" disabled={busy} onClick={onAuthenticated} variant="outline">
|
||||
Продолжить через VK ID
|
||||
</Button>
|
||||
<Button className="mt-3 w-full" disabled={busy} onClick={registerPasskey}>
|
||||
<Button className="mt-3 min-h-11 w-full whitespace-normal px-4 py-3 text-center leading-5" disabled={busy} onClick={registerPasskey}>
|
||||
<Fingerprint data-icon="inline-start" />
|
||||
Добавить Face ID / Touch ID
|
||||
</Button>
|
||||
</>
|
||||
) : null}
|
||||
{!hasPasskeys ? <p className="mt-4 text-xs text-muted-foreground">После входа через VK ID можно будет добавить Face ID, Touch ID или Windows Hello.</p> : null}
|
||||
<Button className="mt-4 w-full" variant="ghost" disabled={busy} onClick={registerPasskey}>
|
||||
<Button className="mt-4 min-h-11 w-full whitespace-normal px-4 py-3 text-center leading-5" variant="ghost" disabled={busy} onClick={registerPasskey}>
|
||||
<LogIn data-icon="inline-start" />
|
||||
Зарегистрировать это устройство после входа через VK ID
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,32 @@
|
|||
}
|
||||
|
||||
@layer components {
|
||||
.auth-screen {
|
||||
position: relative;
|
||||
isolation: isolate;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(135deg, #ffffff 0%, #edf6ff 42%, #f2edff 100%);
|
||||
}
|
||||
|
||||
.auth-screen::before {
|
||||
position: absolute;
|
||||
inset: -30%;
|
||||
z-index: -1;
|
||||
background:
|
||||
linear-gradient(118deg, transparent 18%, hsl(204 100% 82% / 0.34) 38%, transparent 58%),
|
||||
linear-gradient(28deg, transparent 30%, hsl(264 88% 88% / 0.48) 52%, transparent 72%);
|
||||
background-size: 180% 180%;
|
||||
content: "";
|
||||
filter: blur(48px);
|
||||
animation: auth-aurora 18s ease-in-out infinite alternate;
|
||||
}
|
||||
|
||||
.auth-card {
|
||||
border-color: hsl(221 35% 86% / 0.9);
|
||||
box-shadow: 0 24px 70px hsl(224 45% 44% / 0.12), 0 2px 8px hsl(224 45% 44% / 0.06);
|
||||
backdrop-filter: blur(18px);
|
||||
}
|
||||
|
||||
.editorial-studio {
|
||||
background: hsl(210 20% 95%);
|
||||
}
|
||||
|
|
@ -484,6 +510,21 @@
|
|||
}
|
||||
}
|
||||
|
||||
@keyframes auth-aurora {
|
||||
0% {
|
||||
background-position: 0% 35%, 100% 65%;
|
||||
transform: translate3d(-2%, -1%, 0) rotate(-2deg);
|
||||
}
|
||||
50% {
|
||||
background-position: 70% 20%, 25% 80%;
|
||||
transform: translate3d(2%, 1%, 0) rotate(2deg);
|
||||
}
|
||||
100% {
|
||||
background-position: 100% 70%, 0% 30%;
|
||||
transform: translate3d(-1%, 2%, 0) rotate(-1deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes modal-panel-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue