Spaces:
Running
Running
axeronis commited on
Commit ·
91f59f6
1
Parent(s): 2eb04f9
Redesign Auth pages with Centered Glass Card layout
Browse files- frontend/app/login/page.tsx +52 -122
- frontend/app/register/page.tsx +57 -125
frontend/app/login/page.tsx
CHANGED
|
@@ -3,7 +3,8 @@
|
|
| 3 |
import { useState } from 'react'
|
| 4 |
import { useAuth } from '@/contexts/AuthContext'
|
| 5 |
import Link from 'next/link'
|
| 6 |
-
import { Mail, Lock, Loader2,
|
|
|
|
| 7 |
|
| 8 |
export default function LoginPage() {
|
| 9 |
const { login, isLoading: authLoading } = useAuth()
|
|
@@ -28,189 +29,118 @@ export default function LoginPage() {
|
|
| 28 |
|
| 29 |
if (authLoading) {
|
| 30 |
return (
|
| 31 |
-
<div className="min-h-screen flex items-center justify-center">
|
| 32 |
<Loader2 className="w-8 h-8 animate-spin text-indigo-500" />
|
| 33 |
</div>
|
| 34 |
)
|
| 35 |
}
|
| 36 |
|
| 37 |
return (
|
| 38 |
-
<div className="min-h-screen flex font-['Inter'] overflow-hidden">
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
<div className="
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
| 47 |
{/* Logo */}
|
| 48 |
-
<div className="
|
| 49 |
-
<Link href="/" className="
|
| 50 |
-
<div className="w-
|
| 51 |
-
<img src="/logo-symbol.png" alt="MicroFunnel Logo" className="w-full h-full object-contain" />
|
| 52 |
-
</div>
|
| 53 |
-
<div>
|
| 54 |
-
<h1 className="text-2xl font-bold text-white tracking-tight">
|
| 55 |
-
MicroFunnel
|
| 56 |
-
</h1>
|
| 57 |
-
<p className="text-indigo-300/60 text-xs font-medium tracking-wide uppercase">AI Sales Platform</p>
|
| 58 |
</div>
|
| 59 |
</Link>
|
| 60 |
</div>
|
| 61 |
|
| 62 |
-
{/*
|
| 63 |
-
<div className="
|
| 64 |
-
<div className="
|
| 65 |
-
<
|
| 66 |
-
|
| 67 |
-
<div className="flex items-start gap-4 mb-6">
|
| 68 |
-
<div className="p-3 bg-indigo-500/10 rounded-xl border border-indigo-500/20">
|
| 69 |
-
<Sparkles className="w-6 h-6 text-indigo-400" />
|
| 70 |
-
</div>
|
| 71 |
-
<div>
|
| 72 |
-
<div className="flex gap-1 mb-2">
|
| 73 |
-
{[1, 2, 3, 4, 5].map(i => (
|
| 74 |
-
<div key={i} className="w-4 h-4 text-amber-400 fill-current">★</div>
|
| 75 |
-
))}
|
| 76 |
-
</div>
|
| 77 |
-
<p className="text-lg text-slate-200 leading-relaxed font-light">
|
| 78 |
-
"MicroFunnel полностью автоматизировал нашу квалификацию лидов. Мы сократили время ответа с 2 часов до 3 секунд."
|
| 79 |
-
</p>
|
| 80 |
-
</div>
|
| 81 |
-
</div>
|
| 82 |
-
|
| 83 |
-
<div className="flex items-center gap-4 pt-6 border-t border-white/5">
|
| 84 |
-
<div className="w-10 h-10 rounded-full bg-gradient-to-br from-indigo-400 to-purple-500" />
|
| 85 |
-
<div>
|
| 86 |
-
<p className="text-sm font-bold text-white">Александр Волков</p>
|
| 87 |
-
<p className="text-xs text-slate-400">CEO, TechFlow Inc.</p>
|
| 88 |
-
</div>
|
| 89 |
-
</div>
|
| 90 |
</div>
|
| 91 |
-
</div>
|
| 92 |
|
| 93 |
-
<div className="relative z-10 text-xs text-slate-500">
|
| 94 |
-
© 2025 MicroFunnel Inc. All rights reserved.
|
| 95 |
-
</div>
|
| 96 |
-
</div>
|
| 97 |
-
|
| 98 |
-
{/* Right Side - Form */}
|
| 99 |
-
<div className="flex-1 flex items-center justify-center px-4 sm:px-6 lg:px-8 relative z-10">
|
| 100 |
-
<div className="max-w-md w-full space-y-8">
|
| 101 |
-
{/* Header */}
|
| 102 |
-
<div className="text-center lg:text-left">
|
| 103 |
-
<h2 className="text-3xl font-bold text-white tracking-tight mb-2">
|
| 104 |
-
С возвращением
|
| 105 |
-
</h2>
|
| 106 |
-
<p className="text-slate-400">
|
| 107 |
-
Войдите в свой аккаунт для управления продажами
|
| 108 |
-
</p>
|
| 109 |
-
</div>
|
| 110 |
-
|
| 111 |
-
{/* Error Alert */}
|
| 112 |
{error && (
|
| 113 |
-
<div
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
<p className="text-sm text-red-400 font-medium">{error}</p>
|
| 121 |
-
</div>
|
| 122 |
-
</div>
|
| 123 |
)}
|
| 124 |
|
| 125 |
-
|
| 126 |
-
<form onSubmit={handleSubmit} className="space-y-6">
|
| 127 |
-
{/* Email */}
|
| 128 |
<div>
|
| 129 |
-
<label
|
| 130 |
-
|
| 131 |
-
</label>
|
| 132 |
-
<div className="relative group input-glow rounded-xl transition-all duration-300">
|
| 133 |
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 134 |
<Mail className="h-5 w-5 text-slate-500 group-focus-within:text-indigo-400 transition-colors" />
|
| 135 |
</div>
|
| 136 |
<input
|
| 137 |
-
id="email"
|
| 138 |
-
name="email"
|
| 139 |
type="email"
|
| 140 |
-
autoComplete="email"
|
| 141 |
required
|
| 142 |
value={email}
|
| 143 |
onChange={(e) => setEmail(e.target.value)}
|
| 144 |
disabled={isLoading}
|
| 145 |
-
className="block w-full pl-10 pr-3 py-3 border border-white/10 rounded-xl
|
| 146 |
placeholder="name@company.com"
|
| 147 |
/>
|
| 148 |
</div>
|
| 149 |
</div>
|
| 150 |
|
| 151 |
-
{/* Password */}
|
| 152 |
<div>
|
| 153 |
-
<div className="flex items-center justify-between mb-
|
| 154 |
-
<label
|
| 155 |
-
|
| 156 |
-
</label>
|
| 157 |
-
<Link
|
| 158 |
-
href="#"
|
| 159 |
-
className="text-xs font-medium text-indigo-400 hover:text-indigo-300 transition-colors"
|
| 160 |
-
>
|
| 161 |
Забыли пароль?
|
| 162 |
</Link>
|
| 163 |
</div>
|
| 164 |
-
<div className="relative group
|
| 165 |
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 166 |
<Lock className="h-5 w-5 text-slate-500 group-focus-within:text-indigo-400 transition-colors" />
|
| 167 |
</div>
|
| 168 |
<input
|
| 169 |
-
id="password"
|
| 170 |
-
name="password"
|
| 171 |
type="password"
|
| 172 |
-
autoComplete="current-password"
|
| 173 |
required
|
| 174 |
value={password}
|
| 175 |
onChange={(e) => setPassword(e.target.value)}
|
| 176 |
disabled={isLoading}
|
| 177 |
-
className="block w-full pl-10 pr-3 py-3 border border-white/10 rounded-xl
|
| 178 |
placeholder="••••••••"
|
| 179 |
/>
|
| 180 |
</div>
|
| 181 |
</div>
|
| 182 |
|
| 183 |
-
{/* Submit Button */}
|
| 184 |
<button
|
| 185 |
type="submit"
|
| 186 |
disabled={isLoading}
|
| 187 |
-
className="
|
| 188 |
>
|
| 189 |
-
<div className="absolute inset-0 -translate-x-full group-hover:animate-[shimmer_1.5s_infinite] bg-gradient-to-r from-transparent via-white/10 to-transparent z-10" />
|
| 190 |
{isLoading ? (
|
| 191 |
<Loader2 className="w-5 h-5 animate-spin" />
|
| 192 |
) : (
|
| 193 |
-
<span className="flex items-center gap-2
|
| 194 |
-
Войти <ArrowRight className="w-4 h-4
|
| 195 |
</span>
|
| 196 |
)}
|
| 197 |
</button>
|
| 198 |
</form>
|
|
|
|
| 199 |
|
| 200 |
-
|
| 201 |
-
<
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
>
|
| 208 |
-
Создать бесплатно
|
| 209 |
-
</Link>
|
| 210 |
-
</p>
|
| 211 |
-
</div>
|
| 212 |
</div>
|
| 213 |
-
</div>
|
| 214 |
</div>
|
| 215 |
)
|
| 216 |
}
|
|
|
|
| 3 |
import { useState } from 'react'
|
| 4 |
import { useAuth } from '@/contexts/AuthContext'
|
| 5 |
import Link from 'next/link'
|
| 6 |
+
import { Mail, Lock, Loader2, ArrowRight } from 'lucide-react'
|
| 7 |
+
import { motion } from 'framer-motion'
|
| 8 |
|
| 9 |
export default function LoginPage() {
|
| 10 |
const { login, isLoading: authLoading } = useAuth()
|
|
|
|
| 29 |
|
| 30 |
if (authLoading) {
|
| 31 |
return (
|
| 32 |
+
<div className="min-h-screen flex items-center justify-center bg-[#020005]">
|
| 33 |
<Loader2 className="w-8 h-8 animate-spin text-indigo-500" />
|
| 34 |
</div>
|
| 35 |
)
|
| 36 |
}
|
| 37 |
|
| 38 |
return (
|
| 39 |
+
<div className="min-h-screen flex items-center justify-center font-['Inter'] relative overflow-hidden bg-[#020005]">
|
| 40 |
+
{/* Background Effects */}
|
| 41 |
+
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top,_var(--tw-gradient-stops))] from-indigo-900/20 via-[#020005] to-[#020005]" />
|
| 42 |
+
<div className="absolute top-0 left-1/4 w-96 h-96 bg-indigo-500/10 rounded-full blur-[100px] animate-pulse" />
|
| 43 |
+
<div className="absolute bottom-0 right-1/4 w-96 h-96 bg-purple-500/10 rounded-full blur-[100px] animate-pulse delay-1000" />
|
| 44 |
+
|
| 45 |
+
<motion.div
|
| 46 |
+
initial={{ opacity: 0, y: 20 }}
|
| 47 |
+
animate={{ opacity: 1, y: 0 }}
|
| 48 |
+
transition={{ duration: 0.5 }}
|
| 49 |
+
className="w-full max-w-md relative z-10 px-4"
|
| 50 |
+
>
|
| 51 |
{/* Logo */}
|
| 52 |
+
<div className="flex justify-center mb-8">
|
| 53 |
+
<Link href="/" className="group">
|
| 54 |
+
<div className="w-16 h-16 flex items-center justify-center transition-transform group-hover:scale-105 duration-300">
|
| 55 |
+
<img src="/logo-symbol-transparent.png" alt="MicroFunnel Logo" className="w-full h-full object-contain drop-shadow-[0_0_20px_rgba(99,102,241,0.5)]" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
</div>
|
| 57 |
</Link>
|
| 58 |
</div>
|
| 59 |
|
| 60 |
+
{/* Card */}
|
| 61 |
+
<div className="glass-card rounded-3xl p-8 md:p-10 border border-white/10 bg-white/5 backdrop-blur-xl shadow-2xl shadow-indigo-500/10">
|
| 62 |
+
<div className="text-center mb-8">
|
| 63 |
+
<h1 className="text-2xl font-bold text-white mb-2">С возвращением</h1>
|
| 64 |
+
<p className="text-slate-400 text-sm">Войдите в свой аккаунт MicroFunnel</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
</div>
|
|
|
|
| 66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
{error && (
|
| 68 |
+
<motion.div
|
| 69 |
+
initial={{ opacity: 0, height: 0 }}
|
| 70 |
+
animate={{ opacity: 1, height: 'auto' }}
|
| 71 |
+
className="mb-6 p-3 rounded-xl bg-red-500/10 border border-red-500/20 text-red-400 text-sm text-center"
|
| 72 |
+
>
|
| 73 |
+
{error}
|
| 74 |
+
</motion.div>
|
|
|
|
|
|
|
|
|
|
| 75 |
)}
|
| 76 |
|
| 77 |
+
<form onSubmit={handleSubmit} className="space-y-5">
|
|
|
|
|
|
|
| 78 |
<div>
|
| 79 |
+
<label className="block text-xs font-medium text-slate-400 mb-1.5 ml-1">Email</label>
|
| 80 |
+
<div className="relative group">
|
|
|
|
|
|
|
| 81 |
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 82 |
<Mail className="h-5 w-5 text-slate-500 group-focus-within:text-indigo-400 transition-colors" />
|
| 83 |
</div>
|
| 84 |
<input
|
|
|
|
|
|
|
| 85 |
type="email"
|
|
|
|
| 86 |
required
|
| 87 |
value={email}
|
| 88 |
onChange={(e) => setEmail(e.target.value)}
|
| 89 |
disabled={isLoading}
|
| 90 |
+
className="block w-full pl-10 pr-3 py-3 border border-white/10 rounded-xl bg-white/5 text-white placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:bg-white/10 focus:ring-1 focus:ring-indigo-500/50 transition-all sm:text-sm"
|
| 91 |
placeholder="name@company.com"
|
| 92 |
/>
|
| 93 |
</div>
|
| 94 |
</div>
|
| 95 |
|
|
|
|
| 96 |
<div>
|
| 97 |
+
<div className="flex items-center justify-between mb-1.5 ml-1">
|
| 98 |
+
<label className="block text-xs font-medium text-slate-400">Пароль</label>
|
| 99 |
+
<Link href="#" className="text-xs text-indigo-400 hover:text-indigo-300 transition-colors">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
Забыли пароль?
|
| 101 |
</Link>
|
| 102 |
</div>
|
| 103 |
+
<div className="relative group">
|
| 104 |
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 105 |
<Lock className="h-5 w-5 text-slate-500 group-focus-within:text-indigo-400 transition-colors" />
|
| 106 |
</div>
|
| 107 |
<input
|
|
|
|
|
|
|
| 108 |
type="password"
|
|
|
|
| 109 |
required
|
| 110 |
value={password}
|
| 111 |
onChange={(e) => setPassword(e.target.value)}
|
| 112 |
disabled={isLoading}
|
| 113 |
+
className="block w-full pl-10 pr-3 py-3 border border-white/10 rounded-xl bg-white/5 text-white placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:bg-white/10 focus:ring-1 focus:ring-indigo-500/50 transition-all sm:text-sm"
|
| 114 |
placeholder="••••••••"
|
| 115 |
/>
|
| 116 |
</div>
|
| 117 |
</div>
|
| 118 |
|
|
|
|
| 119 |
<button
|
| 120 |
type="submit"
|
| 121 |
disabled={isLoading}
|
| 122 |
+
className="w-full flex justify-center py-3 px-4 border border-transparent rounded-xl shadow-lg shadow-indigo-500/20 text-sm font-bold text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 focus:ring-offset-[#030014] disabled:opacity-50 disabled:cursor-not-allowed transition-all hover:scale-[1.02] active:scale-[0.98]"
|
| 123 |
>
|
|
|
|
| 124 |
{isLoading ? (
|
| 125 |
<Loader2 className="w-5 h-5 animate-spin" />
|
| 126 |
) : (
|
| 127 |
+
<span className="flex items-center gap-2">
|
| 128 |
+
Войти <ArrowRight className="w-4 h-4" />
|
| 129 |
</span>
|
| 130 |
)}
|
| 131 |
</button>
|
| 132 |
</form>
|
| 133 |
+
</div>
|
| 134 |
|
| 135 |
+
<div className="text-center mt-6">
|
| 136 |
+
<p className="text-sm text-slate-500">
|
| 137 |
+
Нет аккаунта?{' '}
|
| 138 |
+
<Link href="/register" className="font-medium text-indigo-400 hover:text-indigo-300 transition-colors">
|
| 139 |
+
Создать бесплатно
|
| 140 |
+
</Link>
|
| 141 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
</div>
|
| 143 |
+
</motion.div>
|
| 144 |
</div>
|
| 145 |
)
|
| 146 |
}
|
frontend/app/register/page.tsx
CHANGED
|
@@ -4,7 +4,8 @@ import { useState, useEffect, Suspense } from 'react'
|
|
| 4 |
import { useAuth } from '@/contexts/AuthContext'
|
| 5 |
import { useSearchParams } from 'next/navigation'
|
| 6 |
import Link from 'next/link'
|
| 7 |
-
import { Mail, Lock, Building, Loader2, Users,
|
|
|
|
| 8 |
|
| 9 |
// Компонент для работы с referral code
|
| 10 |
function ReferralCapture({ onReferralCode }: { onReferralCode: (code: string | null) => void }) {
|
|
@@ -53,7 +54,7 @@ export default function RegisterPage() {
|
|
| 53 |
|
| 54 |
if (authLoading) {
|
| 55 |
return (
|
| 56 |
-
<div className="min-h-screen flex items-center justify-center">
|
| 57 |
<Loader2 className="w-8 h-8 animate-spin text-indigo-500" />
|
| 58 |
</div>
|
| 59 |
)
|
|
@@ -61,210 +62,141 @@ export default function RegisterPage() {
|
|
| 61 |
|
| 62 |
return (
|
| 63 |
<>
|
| 64 |
-
{/* Referral code capture с Suspense */}
|
| 65 |
<Suspense fallback={null}>
|
| 66 |
<ReferralCapture onReferralCode={setReferralCode} />
|
| 67 |
</Suspense>
|
| 68 |
|
| 69 |
-
<div className="min-h-screen flex font-['Inter'] overflow-hidden">
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
<div className="
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
| 78 |
{/* Logo */}
|
| 79 |
-
<div className="
|
| 80 |
-
<Link href="/" className="
|
| 81 |
-
<div className="w-
|
| 82 |
-
<img src="/logo-symbol.png" alt="MicroFunnel Logo" className="w-full h-full object-contain" />
|
| 83 |
-
</div>
|
| 84 |
-
<div>
|
| 85 |
-
<h1 className="text-2xl font-bold text-white tracking-tight">
|
| 86 |
-
MicroFunnel
|
| 87 |
-
</h1>
|
| 88 |
-
<p className="text-indigo-300/60 text-xs font-medium tracking-wide uppercase">AI Sales Platform</p>
|
| 89 |
</div>
|
| 90 |
</Link>
|
| 91 |
</div>
|
| 92 |
|
| 93 |
-
{/*
|
| 94 |
-
<div className="
|
| 95 |
-
<
|
| 96 |
-
|
| 97 |
-
<
|
| 98 |
-
</h2>
|
| 99 |
-
|
| 100 |
-
<div className="space-y-6">
|
| 101 |
-
{[
|
| 102 |
-
{ icon: Zap, title: "Быстрый старт", desc: "Настройка бота за 5 минут без кода" },
|
| 103 |
-
{ icon: Users, title: "Больше лидов", desc: "Автоматическая квалификация 24/7" },
|
| 104 |
-
{ icon: Lock, title: "Безопасность", desc: "Шифрование данных уровня Enterprise" }
|
| 105 |
-
].map((item, i) => (
|
| 106 |
-
<div key={i} className="flex items-start gap-4 group">
|
| 107 |
-
<div className="p-3 bg-white/5 rounded-xl border border-white/10 group-hover:border-indigo-500/30 group-hover:bg-indigo-500/10 transition-all">
|
| 108 |
-
<item.icon className="w-6 h-6 text-indigo-400" />
|
| 109 |
-
</div>
|
| 110 |
-
<div>
|
| 111 |
-
<h3 className="text-lg font-bold text-white mb-1">{item.title}</h3>
|
| 112 |
-
<p className="text-slate-400 text-sm">{item.desc}</p>
|
| 113 |
-
</div>
|
| 114 |
-
</div>
|
| 115 |
-
))}
|
| 116 |
-
</div>
|
| 117 |
-
</div>
|
| 118 |
-
|
| 119 |
-
<div className="relative z-10 text-xs text-slate-500">
|
| 120 |
-
© 2025 MicroFunnel Inc. All rights reserved.
|
| 121 |
-
</div>
|
| 122 |
-
</div>
|
| 123 |
|
| 124 |
-
{/* Right Side - Form */}
|
| 125 |
-
<div className="flex-1 flex items-center justify-center px-4 sm:px-6 lg:px-8 relative z-10">
|
| 126 |
-
<div className="max-w-md w-full space-y-8">
|
| 127 |
-
{/* Header */}
|
| 128 |
-
<div className="text-center lg:text-left">
|
| 129 |
-
<h2 className="text-3xl font-bold text-white tracking-tight mb-2">
|
| 130 |
-
Создать аккаунт
|
| 131 |
-
</h2>
|
| 132 |
-
<p className="text-slate-400">
|
| 133 |
-
Присоединяйтесь к 500+ компаниям, использующим AI
|
| 134 |
-
</p>
|
| 135 |
{referralCode && (
|
| 136 |
-
<div className="mt-4 inline-flex items-center gap-2 px-3 py-
|
| 137 |
-
<Users className="w-
|
| 138 |
-
<span className="text-
|
| 139 |
Приглашение от партнера
|
| 140 |
</span>
|
| 141 |
</div>
|
| 142 |
)}
|
| 143 |
</div>
|
| 144 |
|
| 145 |
-
{/* Error Alert */}
|
| 146 |
{error && (
|
| 147 |
-
<div
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
<p className="text-sm text-red-400 font-medium">{error}</p>
|
| 155 |
-
</div>
|
| 156 |
-
</div>
|
| 157 |
)}
|
| 158 |
|
| 159 |
-
|
| 160 |
-
<form onSubmit={handleSubmit} className="space-y-6">
|
| 161 |
-
{/* Company Name */}
|
| 162 |
<div>
|
| 163 |
-
<label
|
| 164 |
-
|
| 165 |
-
</label>
|
| 166 |
-
<div className="relative group input-glow rounded-xl transition-all duration-300">
|
| 167 |
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 168 |
<Building className="h-5 w-5 text-slate-500 group-focus-within:text-indigo-400 transition-colors" />
|
| 169 |
</div>
|
| 170 |
<input
|
| 171 |
-
id="company"
|
| 172 |
-
name="company"
|
| 173 |
type="text"
|
| 174 |
-
autoComplete="organization"
|
| 175 |
required
|
| 176 |
value={companyName}
|
| 177 |
onChange={(e) => setCompanyName(e.target.value)}
|
| 178 |
disabled={isLoading}
|
| 179 |
-
className="block w-full pl-10 pr-3 py-3 border border-white/10 rounded-xl
|
| 180 |
placeholder="Acme Inc."
|
| 181 |
/>
|
| 182 |
</div>
|
| 183 |
</div>
|
| 184 |
|
| 185 |
-
{/* Email */}
|
| 186 |
<div>
|
| 187 |
-
<label
|
| 188 |
-
|
| 189 |
-
</label>
|
| 190 |
-
<div className="relative group input-glow rounded-xl transition-all duration-300">
|
| 191 |
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 192 |
<Mail className="h-5 w-5 text-slate-500 group-focus-within:text-indigo-400 transition-colors" />
|
| 193 |
</div>
|
| 194 |
<input
|
| 195 |
-
id="email"
|
| 196 |
-
name="email"
|
| 197 |
type="email"
|
| 198 |
-
autoComplete="email"
|
| 199 |
required
|
| 200 |
value={email}
|
| 201 |
onChange={(e) => setEmail(e.target.value)}
|
| 202 |
disabled={isLoading}
|
| 203 |
-
className="block w-full pl-10 pr-3 py-3 border border-white/10 rounded-xl
|
| 204 |
placeholder="name@company.com"
|
| 205 |
/>
|
| 206 |
</div>
|
| 207 |
</div>
|
| 208 |
|
| 209 |
-
{/* Password */}
|
| 210 |
<div>
|
| 211 |
-
<label
|
| 212 |
-
|
| 213 |
-
</label>
|
| 214 |
-
<div className="relative group input-glow rounded-xl transition-all duration-300">
|
| 215 |
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 216 |
<Lock className="h-5 w-5 text-slate-500 group-focus-within:text-indigo-400 transition-colors" />
|
| 217 |
</div>
|
| 218 |
<input
|
| 219 |
-
id="password"
|
| 220 |
-
name="password"
|
| 221 |
type="password"
|
| 222 |
-
autoComplete="new-password"
|
| 223 |
required
|
| 224 |
value={password}
|
| 225 |
onChange={(e) => setPassword(e.target.value)}
|
| 226 |
disabled={isLoading}
|
| 227 |
-
className="block w-full pl-10 pr-3 py-3 border border-white/10 rounded-xl
|
| 228 |
placeholder="••••••••"
|
| 229 |
/>
|
| 230 |
</div>
|
| 231 |
-
<p className="mt-2 text-xs text-slate-500 flex items-center gap-1">
|
| 232 |
<span className="w-1 h-1 rounded-full bg-slate-500" />
|
| 233 |
Минимум 8 символов
|
| 234 |
</p>
|
| 235 |
</div>
|
| 236 |
|
| 237 |
-
{/* Submit Button */}
|
| 238 |
<button
|
| 239 |
type="submit"
|
| 240 |
disabled={isLoading}
|
| 241 |
-
className="
|
| 242 |
>
|
| 243 |
-
<div className="absolute inset-0 -translate-x-full group-hover:animate-[shimmer_1.5s_infinite] bg-gradient-to-r from-transparent via-white/10 to-transparent z-10" />
|
| 244 |
{isLoading ? (
|
| 245 |
<Loader2 className="w-5 h-5 animate-spin" />
|
| 246 |
) : (
|
| 247 |
-
<span className="flex items-center gap-2
|
| 248 |
-
Создать аккаунт <ArrowRight className="w-4 h-4
|
| 249 |
</span>
|
| 250 |
)}
|
| 251 |
</button>
|
| 252 |
</form>
|
|
|
|
| 253 |
|
| 254 |
-
|
| 255 |
-
<
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
>
|
| 262 |
-
Войти
|
| 263 |
-
</Link>
|
| 264 |
-
</p>
|
| 265 |
-
</div>
|
| 266 |
</div>
|
| 267 |
-
</div>
|
| 268 |
</div>
|
| 269 |
</>
|
| 270 |
)
|
|
|
|
| 4 |
import { useAuth } from '@/contexts/AuthContext'
|
| 5 |
import { useSearchParams } from 'next/navigation'
|
| 6 |
import Link from 'next/link'
|
| 7 |
+
import { Mail, Lock, Building, Loader2, Users, ArrowRight } from 'lucide-react'
|
| 8 |
+
import { motion } from 'framer-motion'
|
| 9 |
|
| 10 |
// Компонент для работы с referral code
|
| 11 |
function ReferralCapture({ onReferralCode }: { onReferralCode: (code: string | null) => void }) {
|
|
|
|
| 54 |
|
| 55 |
if (authLoading) {
|
| 56 |
return (
|
| 57 |
+
<div className="min-h-screen flex items-center justify-center bg-[#020005]">
|
| 58 |
<Loader2 className="w-8 h-8 animate-spin text-indigo-500" />
|
| 59 |
</div>
|
| 60 |
)
|
|
|
|
| 62 |
|
| 63 |
return (
|
| 64 |
<>
|
|
|
|
| 65 |
<Suspense fallback={null}>
|
| 66 |
<ReferralCapture onReferralCode={setReferralCode} />
|
| 67 |
</Suspense>
|
| 68 |
|
| 69 |
+
<div className="min-h-screen flex items-center justify-center font-['Inter'] relative overflow-hidden bg-[#020005]">
|
| 70 |
+
{/* Background Effects */}
|
| 71 |
+
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top,_var(--tw-gradient-stops))] from-indigo-900/20 via-[#020005] to-[#020005]" />
|
| 72 |
+
<div className="absolute top-0 left-1/4 w-96 h-96 bg-indigo-500/10 rounded-full blur-[100px] animate-pulse" />
|
| 73 |
+
<div className="absolute bottom-0 right-1/4 w-96 h-96 bg-purple-500/10 rounded-full blur-[100px] animate-pulse delay-1000" />
|
| 74 |
+
|
| 75 |
+
<motion.div
|
| 76 |
+
initial={{ opacity: 0, y: 20 }}
|
| 77 |
+
animate={{ opacity: 1, y: 0 }}
|
| 78 |
+
transition={{ duration: 0.5 }}
|
| 79 |
+
className="w-full max-w-md relative z-10 px-4 py-8"
|
| 80 |
+
>
|
| 81 |
{/* Logo */}
|
| 82 |
+
<div className="flex justify-center mb-8">
|
| 83 |
+
<Link href="/" className="group">
|
| 84 |
+
<div className="w-16 h-16 flex items-center justify-center transition-transform group-hover:scale-105 duration-300">
|
| 85 |
+
<img src="/logo-symbol-transparent.png" alt="MicroFunnel Logo" className="w-full h-full object-contain drop-shadow-[0_0_20px_rgba(99,102,241,0.5)]" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
</div>
|
| 87 |
</Link>
|
| 88 |
</div>
|
| 89 |
|
| 90 |
+
{/* Card */}
|
| 91 |
+
<div className="glass-card rounded-3xl p-8 md:p-10 border border-white/10 bg-white/5 backdrop-blur-xl shadow-2xl shadow-indigo-500/10">
|
| 92 |
+
<div className="text-center mb-8">
|
| 93 |
+
<h1 className="text-2xl font-bold text-white mb-2">Создать аккаунт</h1>
|
| 94 |
+
<p className="text-slate-400 text-sm">Присоединяйтесь к 500+ компаниям</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
{referralCode && (
|
| 97 |
+
<div className="mt-4 inline-flex items-center gap-2 px-3 py-1.5 bg-indigo-500/10 border border-indigo-500/20 rounded-lg">
|
| 98 |
+
<Users className="w-3.5 h-3.5 text-indigo-400" />
|
| 99 |
+
<span className="text-xs text-indigo-300 font-medium">
|
| 100 |
Приглашение от партнера
|
| 101 |
</span>
|
| 102 |
</div>
|
| 103 |
)}
|
| 104 |
</div>
|
| 105 |
|
|
|
|
| 106 |
{error && (
|
| 107 |
+
<motion.div
|
| 108 |
+
initial={{ opacity: 0, height: 0 }}
|
| 109 |
+
animate={{ opacity: 1, height: 'auto' }}
|
| 110 |
+
className="mb-6 p-3 rounded-xl bg-red-500/10 border border-red-500/20 text-red-400 text-sm text-center"
|
| 111 |
+
>
|
| 112 |
+
{error}
|
| 113 |
+
</motion.div>
|
|
|
|
|
|
|
|
|
|
| 114 |
)}
|
| 115 |
|
| 116 |
+
<form onSubmit={handleSubmit} className="space-y-5">
|
|
|
|
|
|
|
| 117 |
<div>
|
| 118 |
+
<label className="block text-xs font-medium text-slate-400 mb-1.5 ml-1">Название компании</label>
|
| 119 |
+
<div className="relative group">
|
|
|
|
|
|
|
| 120 |
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 121 |
<Building className="h-5 w-5 text-slate-500 group-focus-within:text-indigo-400 transition-colors" />
|
| 122 |
</div>
|
| 123 |
<input
|
|
|
|
|
|
|
| 124 |
type="text"
|
|
|
|
| 125 |
required
|
| 126 |
value={companyName}
|
| 127 |
onChange={(e) => setCompanyName(e.target.value)}
|
| 128 |
disabled={isLoading}
|
| 129 |
+
className="block w-full pl-10 pr-3 py-3 border border-white/10 rounded-xl bg-white/5 text-white placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:bg-white/10 focus:ring-1 focus:ring-indigo-500/50 transition-all sm:text-sm"
|
| 130 |
placeholder="Acme Inc."
|
| 131 |
/>
|
| 132 |
</div>
|
| 133 |
</div>
|
| 134 |
|
|
|
|
| 135 |
<div>
|
| 136 |
+
<label className="block text-xs font-medium text-slate-400 mb-1.5 ml-1">Email</label>
|
| 137 |
+
<div className="relative group">
|
|
|
|
|
|
|
| 138 |
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 139 |
<Mail className="h-5 w-5 text-slate-500 group-focus-within:text-indigo-400 transition-colors" />
|
| 140 |
</div>
|
| 141 |
<input
|
|
|
|
|
|
|
| 142 |
type="email"
|
|
|
|
| 143 |
required
|
| 144 |
value={email}
|
| 145 |
onChange={(e) => setEmail(e.target.value)}
|
| 146 |
disabled={isLoading}
|
| 147 |
+
className="block w-full pl-10 pr-3 py-3 border border-white/10 rounded-xl bg-white/5 text-white placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:bg-white/10 focus:ring-1 focus:ring-indigo-500/50 transition-all sm:text-sm"
|
| 148 |
placeholder="name@company.com"
|
| 149 |
/>
|
| 150 |
</div>
|
| 151 |
</div>
|
| 152 |
|
|
|
|
| 153 |
<div>
|
| 154 |
+
<label className="block text-xs font-medium text-slate-400 mb-1.5 ml-1">Пароль</label>
|
| 155 |
+
<div className="relative group">
|
|
|
|
|
|
|
| 156 |
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 157 |
<Lock className="h-5 w-5 text-slate-500 group-focus-within:text-indigo-400 transition-colors" />
|
| 158 |
</div>
|
| 159 |
<input
|
|
|
|
|
|
|
| 160 |
type="password"
|
|
|
|
| 161 |
required
|
| 162 |
value={password}
|
| 163 |
onChange={(e) => setPassword(e.target.value)}
|
| 164 |
disabled={isLoading}
|
| 165 |
+
className="block w-full pl-10 pr-3 py-3 border border-white/10 rounded-xl bg-white/5 text-white placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:bg-white/10 focus:ring-1 focus:ring-indigo-500/50 transition-all sm:text-sm"
|
| 166 |
placeholder="••••••••"
|
| 167 |
/>
|
| 168 |
</div>
|
| 169 |
+
<p className="mt-2 text-xs text-slate-500 flex items-center gap-1 ml-1">
|
| 170 |
<span className="w-1 h-1 rounded-full bg-slate-500" />
|
| 171 |
Минимум 8 символов
|
| 172 |
</p>
|
| 173 |
</div>
|
| 174 |
|
|
|
|
| 175 |
<button
|
| 176 |
type="submit"
|
| 177 |
disabled={isLoading}
|
| 178 |
+
className="w-full flex justify-center py-3 px-4 border border-transparent rounded-xl shadow-lg shadow-indigo-500/20 text-sm font-bold text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 focus:ring-offset-[#030014] disabled:opacity-50 disabled:cursor-not-allowed transition-all hover:scale-[1.02] active:scale-[0.98]"
|
| 179 |
>
|
|
|
|
| 180 |
{isLoading ? (
|
| 181 |
<Loader2 className="w-5 h-5 animate-spin" />
|
| 182 |
) : (
|
| 183 |
+
<span className="flex items-center gap-2">
|
| 184 |
+
Создать аккаунт <ArrowRight className="w-4 h-4" />
|
| 185 |
</span>
|
| 186 |
)}
|
| 187 |
</button>
|
| 188 |
</form>
|
| 189 |
+
</div>
|
| 190 |
|
| 191 |
+
<div className="text-center mt-6">
|
| 192 |
+
<p className="text-sm text-slate-500">
|
| 193 |
+
Уже есть аккаунт?{' '}
|
| 194 |
+
<Link href="/login" className="font-medium text-indigo-400 hover:text-indigo-300 transition-colors">
|
| 195 |
+
Войти
|
| 196 |
+
</Link>
|
| 197 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 198 |
</div>
|
| 199 |
+
</motion.div>
|
| 200 |
</div>
|
| 201 |
</>
|
| 202 |
)
|