|
1 | | -import OAuthLoginSection from '../components/oauth/OAuthLoginSection'; |
| 1 | +import { useState } from 'react'; |
| 2 | + |
| 3 | +import OAuthProviderButton from '../components/oauth/OAuthProviderButton'; |
| 4 | +import { oauthProviderConfigs } from '../components/oauth/providerConfigs'; |
2 | 5 | import RotatingTetrahedronCanvas from '../components/RotatingTetrahedronCanvas'; |
3 | | -import TypewriterGreeting from '../components/TypewriterGreeting'; |
4 | 6 |
|
5 | 7 | const Welcome = () => { |
| 8 | + const [email, setEmail] = useState(''); |
| 9 | + |
| 10 | + const handleEmailSubmit = (e: React.FormEvent) => { |
| 11 | + e.preventDefault(); |
| 12 | + if (!email.trim()) return; |
| 13 | + // TODO: implement email auth flow |
| 14 | + console.log('[Welcome] email submit:', email); |
| 15 | + }; |
| 16 | + |
6 | 17 | return ( |
7 | | - <div className="min-h-full flex items-center justify-center p-4 pt-6"> |
8 | | - <div className="flex w-full max-w-md flex-col items-center gap-7 text-center animate-fade-up"> |
9 | | - <div className="h-36 w-36 md:h-44 md:w-44"> |
10 | | - <RotatingTetrahedronCanvas /> |
11 | | - </div> |
| 18 | + <div className="min-h-full flex flex-col items-center justify-center p-4"> |
| 19 | + <div className="max-w-md w-full"> |
| 20 | + <div className="bg-white rounded-2xl shadow-soft border border-stone-200 p-8 animate-fade-up"> |
| 21 | + {/* Logo */} |
| 22 | + <div className="flex justify-center mb-6"> |
| 23 | + <div className="h-20 w-20"> |
| 24 | + <RotatingTetrahedronCanvas /> |
| 25 | + </div> |
| 26 | + </div> |
12 | 27 |
|
13 | | - <TypewriterGreeting |
14 | | - greetings={['Hello HAL9000! 👋', "Let's cook! 🔥", 'The A-Team is here! 👊']} |
15 | | - /> |
| 28 | + {/* Heading */} |
| 29 | + <h1 className="text-2xl font-bold text-stone-900 text-center mb-2"> |
| 30 | + Sign in! Let's Cook |
| 31 | + </h1> |
16 | 32 |
|
17 | | - <p className="max-w-xl text-sm text-stone-500 md:text-base"> |
18 | | - Welcome to <span className="font-medium text-stone-900">OpenHuman</span>! Your Personal AI |
19 | | - super intelligence. Private, Simple and extremely powerful. |
20 | | - </p> |
| 33 | + {/* Subtitle */} |
| 34 | + <p className="text-sm text-stone-500 text-center mb-6 leading-relaxed"> |
| 35 | + Welcome to <span className="font-medium text-stone-900">OpenHuman</span>! Your Personal |
| 36 | + AI Super Intelligence. Private, Simple and extremely powerful. |
| 37 | + </p> |
21 | 38 |
|
22 | | - {/* <div className="glass rounded-3xl p-8 text-center animate-fade-up shadow-large"> */} |
23 | | - <OAuthLoginSection /> |
24 | | - {/* </div> */} |
| 39 | + {/* OAuth buttons — horizontal row */} |
| 40 | + <div className="flex items-center justify-center gap-3 mb-5"> |
| 41 | + {oauthProviderConfigs |
| 42 | + .filter(p => ['google', 'github', 'twitter'].includes(p.id)) |
| 43 | + .map(provider => ( |
| 44 | + <OAuthProviderButton |
| 45 | + key={provider.id} |
| 46 | + provider={provider} |
| 47 | + className="!rounded-full !px-4 !py-2 !text-xs" |
| 48 | + /> |
| 49 | + ))} |
| 50 | + </div> |
| 51 | + |
| 52 | + {/* Divider */} |
| 53 | + <div className="flex items-center gap-3 mb-5"> |
| 54 | + <div className="flex-1 h-px bg-stone-200" /> |
| 55 | + <span className="text-xs text-stone-400">Or</span> |
| 56 | + <div className="flex-1 h-px bg-stone-200" /> |
| 57 | + </div> |
| 58 | + |
| 59 | + {/* Email input + CTA */} |
| 60 | + <form onSubmit={handleEmailSubmit} className="space-y-3"> |
| 61 | + <input |
| 62 | + type="email" |
| 63 | + value={email} |
| 64 | + onChange={e => setEmail(e.target.value)} |
| 65 | + placeholder="Enter your email" |
| 66 | + className="w-full rounded-xl border border-stone-200 bg-white px-4 py-3 text-sm text-stone-900 placeholder:text-stone-400 outline-none focus:border-primary-500 focus:ring-1 focus:ring-primary-500 transition-colors" |
| 67 | + /> |
| 68 | + <button |
| 69 | + type="submit" |
| 70 | + className="w-full py-3 bg-primary-500 hover:bg-primary-600 text-white font-medium text-sm rounded-xl transition-colors duration-200"> |
| 71 | + Continue with email |
| 72 | + </button> |
| 73 | + </form> |
| 74 | + </div> |
25 | 75 | </div> |
26 | 76 | </div> |
27 | 77 | ); |
|
0 commit comments