@@ -4,10 +4,14 @@ import PasswordInput from '@/components/password-input';
44import TextLink from '@/components/text-link' ;
55import { Button } from '@/components/ui/button' ;
66import { Checkbox } from '@/components/ui/checkbox' ;
7+ import { Icon } from '@/components/ui/icon' ;
78import { Input } from '@/components/ui/input' ;
89import { Label } from '@/components/ui/label' ;
10+ import { Separator } from '@/components/ui/separator' ;
911import { Spinner } from '@/components/ui/spinner' ;
12+ import { Github , Chrome } from 'lucide-react' ;
1013import { register } from '@/routes' ;
14+ import { redirect } from '@/routes/socialite' ;
1115import { store } from '@/routes/login' ;
1216import { request } from '@/routes/password' ;
1317
@@ -26,14 +30,41 @@ export default function Login({
2630 < >
2731 < Head title = "Log in" />
2832
29- < Form
30- { ...store . form ( ) }
31- resetOnSuccess = { [ 'password' ] }
32- className = "flex flex-col gap-6"
33- >
34- { ( { processing, errors } ) => (
35- < >
36- < div className = "grid gap-6" >
33+ < div className = "flex flex-col gap-6" >
34+ < div className = "grid grid-cols-2 gap-4" >
35+ < Button variant = "outline" className = "w-full" asChild >
36+ < a href = { redirect . url ( 'github' ) } >
37+ < Icon iconNode = { Github } className = "mr-2 h-4 w-4" />
38+ Github
39+ </ a >
40+ </ Button >
41+ < Button variant = "outline" className = "w-full" asChild >
42+ < a href = { redirect . url ( 'google' ) } >
43+ < Icon iconNode = { Chrome } className = "mr-2 h-4 w-4" />
44+ Google
45+ </ a >
46+ </ Button >
47+ </ div >
48+
49+ < div className = "relative" >
50+ < div className = "absolute inset-0 flex items-center" >
51+ < Separator />
52+ </ div >
53+ < div className = "relative flex justify-center text-xs uppercase" >
54+ < span className = "bg-background px-2 text-muted-foreground" >
55+ Or continue with
56+ </ span >
57+ </ div >
58+ </ div >
59+
60+ < Form
61+ { ...store . form ( ) }
62+ resetOnSuccess = { [ 'password' ] }
63+ className = "flex flex-col gap-6"
64+ >
65+ { ( { processing, errors } ) => (
66+ < >
67+ < div className = "grid gap-6" >
3768 < div className = "grid gap-2" >
3869 < Label htmlFor = "email" > Email address</ Label >
3970 < Input
@@ -94,17 +125,18 @@ export default function Login({
94125 </ Button >
95126 </ div >
96127
97- { canRegister && (
98- < div className = "text-center text-sm text-muted-foreground" >
99- Don't have an account?{ ' ' }
100- < TextLink href = { register ( ) } tabIndex = { 5 } >
101- Sign up
102- </ TextLink >
103- </ div >
104- ) }
105- </ >
106- ) }
107- </ Form >
128+ { canRegister && (
129+ < div className = "text-center text-sm text-muted-foreground" >
130+ Don't have an account?{ ' ' }
131+ < TextLink href = { register ( ) } tabIndex = { 5 } >
132+ Sign up
133+ </ TextLink >
134+ </ div >
135+ ) }
136+ </ >
137+ ) }
138+ </ Form >
139+ </ div >
108140
109141 { status && (
110142 < div className = "mb-4 text-center text-sm font-medium text-green-600" >
0 commit comments