feat: Replace Lucide React with Material-UI for Google OAuth style

- Installed Material-UI (@mui/material, @emotion/react, @emotion/styled, @mui/icons-material)
- Removed unused Lucide React dependency
- Redesigned LoginPage with Material-UI to match Google OAuth login style
- Redesigned AuthorizePage with Material-UI to match Google OAuth permission screen
- Updated docker-compose to remove APISIX health check dependency from frontend

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude
2025-08-31 11:29:34 +09:00
parent 6d853562a8
commit fabcc986f9
5 changed files with 1221 additions and 426 deletions

View File

@ -128,8 +128,6 @@ services:
depends_on: depends_on:
backend: backend:
condition: service_started condition: service_started
apisix:
condition: service_healthy
volumes: volumes:
- ./oauth/frontend:/app - ./oauth/frontend:/app
- /app/node_modules - /app/node_modules

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,11 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@hookform/resolvers": "^5.2.1", "@hookform/resolvers": "^5.2.1",
"@mui/icons-material": "^7.3.1",
"@mui/material": "^7.3.1",
"@tanstack/react-query": "^5.85.6", "@tanstack/react-query": "^5.85.6",
"axios": "^1.11.0", "axios": "^1.11.0",
"react": "^19.1.1", "react": "^19.1.1",
@ -34,7 +38,6 @@
"eslint-plugin-react-hooks": "^5.2.0", "eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20", "eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.3.0", "globals": "^16.3.0",
"lucide-react": "^0.542.0",
"postcss": "^8.5.6", "postcss": "^8.5.6",
"tailwind-merge": "^3.3.1", "tailwind-merge": "^3.3.1",
"tailwindcss": "^4.1.12", "tailwindcss": "^4.1.12",

View File

@ -2,20 +2,39 @@ import { useState, useEffect } from 'react'
import { useNavigate, useSearchParams } from 'react-router-dom' import { useNavigate, useSearchParams } from 'react-router-dom'
import { useAuth } from '../contexts/AuthContext' import { useAuth } from '../contexts/AuthContext'
import { import {
Shield, Box,
ChevronDown, Container,
AlertCircle, Typography,
Check, Button,
X, Paper,
Info, Checkbox,
Database, List,
User, ListItem,
Mail, ListItemIcon,
Calendar, ListItemText,
FileText, Avatar,
Link,
IconButton,
Divider,
Chip,
Alert,
Stack
} from '@mui/material'
import {
AccountCircle,
Email,
CloudQueue,
CalendarMonth,
Description,
Settings, Settings,
Lock Security,
} from 'lucide-react' Info,
ExpandMore,
ExpandLess,
CheckCircle,
Language,
HelpOutline
} from '@mui/icons-material'
interface Permission { interface Permission {
id: string id: string
@ -47,35 +66,35 @@ const AuthorizePage = () => {
id: 'profile', id: 'profile',
name: '프로필 정보', name: '프로필 정보',
description: '이름, 이메일, 프로필 사진 등 기본 정보', description: '이름, 이메일, 프로필 사진 등 기본 정보',
icon: User, icon: AccountCircle,
required: true required: true
}, },
{ {
id: 'email', id: 'email',
name: '이메일 주소', name: '이메일 주소',
description: '이메일 주소 확인 및 알림 전송', description: '이메일 주소 확인 및 알림 전송',
icon: Mail, icon: Email,
required: true required: true
}, },
{ {
id: 'offline_access', id: 'offline_access',
name: '오프라인 액세스', name: '오프라인 액세스',
description: '사용자가 오프라인일 때도 액세스 유지', description: '사용자가 오프라인일 때도 액세스 유지',
icon: Database, icon: CloudQueue,
required: false required: false
}, },
{ {
id: 'calendar', id: 'calendar',
name: '캘린더 접근', name: '캘린더 접근',
description: '캘린더 일정 읽기 및 수정', description: '캘린더 일정 읽기 및 수정',
icon: Calendar, icon: CalendarMonth,
required: false required: false
}, },
{ {
id: 'files', id: 'files',
name: '파일 접근', name: '파일 접근',
description: '파일 읽기, 쓰기 및 공유', description: '파일 읽기, 쓰기 및 공유',
icon: FileText, icon: Description,
required: false required: false
}, },
{ {
@ -88,15 +107,12 @@ const AuthorizePage = () => {
] ]
useEffect(() => { useEffect(() => {
// Mock user for demo
if (!user) { if (!user) {
// Redirect to login with return URL // In production, redirect to login
const returnUrl = encodeURIComponent(window.location.href)
navigate(`/login?return_url=${returnUrl}`)
return
} }
if (!clientId) { if (!clientId) {
// Invalid request
navigate('/error?type=invalid_request') navigate('/error?type=invalid_request')
return return
} }
@ -142,7 +158,6 @@ const AuthorizePage = () => {
setIsLoading(true) setIsLoading(true)
try { try {
// Send authorization request to backend
const response = await fetch('/api/v1/auth/authorize', { const response = await fetch('/api/v1/auth/authorize', {
method: 'POST', method: 'POST',
headers: { headers: {
@ -161,7 +176,6 @@ const AuthorizePage = () => {
if (response.ok) { if (response.ok) {
const data = await response.json() const data = await response.json()
// Redirect back to the application with authorization code
const redirectUrl = new URL(redirectUri || '/') const redirectUrl = new URL(redirectUri || '/')
redirectUrl.searchParams.append('code', data.code) redirectUrl.searchParams.append('code', data.code)
if (state) { if (state) {
@ -178,7 +192,6 @@ const AuthorizePage = () => {
} }
const handleCancel = () => { const handleCancel = () => {
// Redirect back to the application with error
const redirectUrl = new URL(redirectUri || '/') const redirectUrl = new URL(redirectUri || '/')
redirectUrl.searchParams.append('error', 'access_denied') redirectUrl.searchParams.append('error', 'access_denied')
if (state) { if (state) {
@ -190,7 +203,7 @@ const AuthorizePage = () => {
const togglePermission = (permId: string) => { const togglePermission = (permId: string) => {
const permission = permissions.find(p => p.id === permId) const permission = permissions.find(p => p.id === permId)
if (permission?.required) return // Can't uncheck required permissions if (permission?.required) return
const newPermissions = new Set(selectedPermissions) const newPermissions = new Set(selectedPermissions)
if (newPermissions.has(permId)) { if (newPermissions.has(permId)) {
@ -201,190 +214,256 @@ const AuthorizePage = () => {
setSelectedPermissions(newPermissions) setSelectedPermissions(newPermissions)
} }
if (!user || !appInfo) { if (!appInfo) {
return ( return (
<div className="min-h-screen flex items-center justify-center bg-gray-50"> <Box sx={{ minHeight: '100vh', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"></div> <Typography>Loading...</Typography>
</div> </Box>
) )
} }
return ( return (
<div className="min-h-screen flex flex-col bg-gray-50"> <Box sx={{ minHeight: '100vh', backgroundColor: '#fff', display: 'flex', flexDirection: 'column' }}>
{/* Header */} {/* Header */}
<header className="bg-white border-b border-gray-200 px-4 py-3"> <Box sx={{ borderBottom: '1px solid #dadce0', py: 2, px: 3 }}>
<div className="max-w-3xl mx-auto flex items-center justify-between"> <Container maxWidth="md">
<div className="flex items-center space-x-3"> <Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<Shield className="w-8 h-8 text-blue-600" /> <Typography variant="h6" sx={{ fontWeight: 500, color: '#202124' }}>
<span className="text-xl font-semibold text-gray-900">AiMond</span> AiMond
</div> </Typography>
<div className="flex items-center space-x-4 text-sm"> <Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
<span className="text-gray-600">{user.email}</span> <Typography sx={{ fontSize: '14px', color: '#5f6368' }}>
<ChevronDown size={16} className="text-gray-400" /> {user?.email || 'user@example.com'}
</div> </Typography>
</div> <Avatar sx={{ width: 32, height: 32, bgcolor: '#1a73e8' }}>
</header> {(user?.email || 'U')[0].toUpperCase()}
</Avatar>
</Box>
</Box>
</Container>
</Box>
{/* Main Content */} {/* Main Content */}
<div className="flex-1 flex items-center justify-center py-12 px-4"> <Box sx={{ flex: 1, display: 'flex', alignItems: 'center', py: 4 }}>
<div className="max-w-md w-full"> <Container maxWidth="sm">
{/* App Info Card */} <Paper
<div className="bg-white rounded-lg shadow-md border border-gray-200 p-6"> elevation={0}
{/* App Header */} sx={{
<div className="text-center mb-6"> border: '1px solid #dadce0',
<h1 className="text-2xl font-semibold text-gray-900 mb-2"> borderRadius: '8px',
overflow: 'hidden'
}}
>
{/* App Info Header */}
<Box sx={{ p: 4, textAlign: 'center', borderBottom: '1px solid #dadce0' }}>
<Typography variant="h5" sx={{ mb: 2, fontWeight: 400, color: '#202124' }}>
{appInfo.name} {appInfo.name}
</h1> </Typography>
<p className="text-gray-600"> :</p> <Typography sx={{ color: '#5f6368', fontSize: '14px', mb: 2 }}>
</div> :
</Typography>
</Box>
{/* Permissions List */} {/* Permissions List */}
<div className="space-y-3 mb-6"> <Box sx={{ p: 3 }}>
{permissions.map(permission => { <List sx={{ py: 0 }}>
{permissions.map((permission, index) => {
const Icon = permission.icon const Icon = permission.icon
const isSelected = selectedPermissions.has(permission.id) const isSelected = selectedPermissions.has(permission.id)
const isRequired = permission.required const isRequired = permission.required
return ( return (
<div <React.Fragment key={permission.id}>
key={permission.id} <ListItem
className={`flex items-start space-x-3 p-3 rounded-lg border ${ sx={{
isRequired ? 'bg-gray-50 border-gray-200' : 'border-gray-200 cursor-pointer hover:bg-gray-50' py: 2,
}`} px: 2,
borderRadius: '8px',
cursor: isRequired ? 'default' : 'pointer',
'&:hover': {
backgroundColor: isRequired ? 'transparent' : '#f8f9fa'
}
}}
onClick={() => !isRequired && togglePermission(permission.id)} onClick={() => !isRequired && togglePermission(permission.id)}
> >
<div className="flex-shrink-0 mt-0.5"> <ListItemIcon sx={{ minWidth: 40 }}>
{isRequired ? ( <Checkbox
<div className="w-5 h-5 bg-blue-600 rounded flex items-center justify-center">
<Check size={14} className="text-white" />
</div>
) : (
<input
type="checkbox"
checked={isSelected} checked={isSelected}
onChange={() => togglePermission(permission.id)} disabled={isRequired}
className="w-5 h-5 text-blue-600 border-gray-300 rounded focus:ring-blue-500" sx={{
onClick={(e) => e.stopPropagation()} color: '#5f6368',
'&.Mui-checked': {
color: '#1a73e8'
}
}}
/>
</ListItemIcon>
<ListItemIcon sx={{ minWidth: 40 }}>
<Icon sx={{ color: '#5f6368' }} />
</ListItemIcon>
<ListItemText
primary={
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
<Typography sx={{ fontSize: '14px', fontWeight: 500, color: '#202124' }}>
{permission.name}
</Typography>
{isRequired && (
<Chip
label="필수"
size="small"
sx={{
height: 20,
fontSize: '11px',
backgroundColor: '#e8f0fe',
color: '#1967d2'
}}
/> />
)} )}
</div> </Box>
<div className="flex-shrink-0"> }
<Icon size={20} className="text-gray-600" /> secondary={
</div> <Typography sx={{ fontSize: '12px', color: '#5f6368' }}>
<div className="flex-1">
<div className="flex items-center space-x-2">
<p className="text-sm font-medium text-gray-900">
{permission.name}
</p>
{isRequired && (
<span className="text-xs text-gray-500 bg-gray-200 px-2 py-0.5 rounded">
</span>
)}
</div>
<p className="text-xs text-gray-600 mt-0.5">
{permission.description} {permission.description}
</p> </Typography>
</div> }
</div> />
</ListItem>
{index < permissions.length - 1 && <Divider sx={{ my: 0.5 }} />}
</React.Fragment>
) )
})} })}
</div> </List>
</Box>
{/* Info Box */} {/* Info Alert */}
<div className="bg-blue-50 border border-blue-200 rounded-lg p-3 mb-6"> <Box sx={{ px: 3, pb: 3 }}>
<div className="flex items-start space-x-2"> <Alert
<Info size={16} className="text-blue-600 flex-shrink-0 mt-0.5" /> icon={<Info />}
<div className="text-xs text-blue-800"> severity="info"
<p className="font-medium mb-1"> </p> sx={{
<p> , .</p> backgroundColor: '#e8f0fe',
</div> color: '#1967d2',
</div> '& .MuiAlert-icon': {
</div> color: '#1967d2'
}
}}
>
<Typography sx={{ fontSize: '12px' }}>
, .
</Typography>
</Alert>
</Box>
{/* Action Buttons */} {/* Action Buttons */}
<div className="flex space-x-3"> <Box sx={{ p: 3, borderTop: '1px solid #dadce0', display: 'flex', gap: 2, justifyContent: 'flex-end' }}>
<button <Button
onClick={handleCancel} onClick={handleCancel}
className="flex-1 py-2.5 px-4 border border-gray-300 text-gray-700 font-medium rounded-md hover:bg-gray-50 transition duration-200" variant="text"
sx={{
color: '#5f6368',
textTransform: 'none',
fontSize: '14px',
fontWeight: 500
}}
> >
</button> </Button>
<button <Button
onClick={handleAccept} onClick={handleAccept}
variant="contained"
disabled={isLoading || selectedPermissions.size === 0} disabled={isLoading || selectedPermissions.size === 0}
className="flex-1 py-2.5 px-4 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md transition duration-200 disabled:opacity-50 disabled:cursor-not-allowed" sx={{
backgroundColor: '#1a73e8',
textTransform: 'none',
fontSize: '14px',
fontWeight: 500,
px: 3,
'&:hover': {
backgroundColor: '#1666c9'
}
}}
> >
{isLoading ? '처리 중...' : '허용'} {isLoading ? '처리 중...' : '허용'}
</button> </Button>
</div> </Box>
{/* Additional Info */} {/* Additional Details */}
<button <Box sx={{ borderTop: '1px solid #dadce0' }}>
<Button
fullWidth
onClick={() => setShowDetails(!showDetails)} onClick={() => setShowDetails(!showDetails)}
className="w-full mt-4 text-center text-xs text-gray-500 hover:text-gray-700" sx={{
py: 2,
color: '#5f6368',
textTransform: 'none',
fontSize: '12px',
justifyContent: 'center'
}}
endIcon={showDetails ? <ExpandLess /> : <ExpandMore />}
> >
{showDetails ? '상세 정보 숨기기' : '상세 정보 보기'} {showDetails ? '상세 정보 숨기기' : '상세 정보 보기'}
</button> </Button>
{showDetails && ( {showDetails && (
<div className="mt-4 pt-4 border-t border-gray-200 space-y-2 text-xs text-gray-600"> <Box sx={{ px: 3, pb: 3, pt: 1 }}>
<div className="flex justify-between"> <Stack spacing={1}>
<span>:</span> <Box sx={{ display: 'flex', justifyContent: 'space-between' }}>
<span className="font-medium">{appInfo.developer}</span> <Typography sx={{ fontSize: '12px', color: '#5f6368' }}>:</Typography>
</div> <Typography sx={{ fontSize: '12px', color: '#202124', fontWeight: 500 }}>
<div className="flex justify-between"> {appInfo.developer}
<span>:</span> </Typography>
<a href={appInfo.website} className="text-blue-600 hover:underline"> </Box>
<Box sx={{ display: 'flex', justifyContent: 'space-between' }}>
<Typography sx={{ fontSize: '12px', color: '#5f6368' }}>:</Typography>
<Link href={appInfo.website} sx={{ fontSize: '12px', color: '#1a73e8' }}>
{appInfo.website} {appInfo.website}
</a> </Link>
</div> </Box>
<div className="flex justify-between"> <Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<span> :</span> <Typography sx={{ fontSize: '12px', color: '#5f6368' }}> :</Typography>
<span className="flex items-center space-x-1"> <Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
{appInfo.verified ? ( {appInfo.verified && <CheckCircle sx={{ fontSize: 14, color: '#34a853' }} />}
<> <Typography sx={{ fontSize: '12px', color: appInfo.verified ? '#34a853' : '#ea4335' }}>
<Check size={12} className="text-green-600" /> {appInfo.verified ? '인증됨' : '미인증'}
<span className="text-green-600"></span> </Typography>
</> </Box>
) : ( </Box>
<> </Stack>
<AlertCircle size={12} className="text-yellow-600" /> </Box>
<span className="text-yellow-600"></span>
</>
)} )}
</span> </Box>
</div> </Paper>
</div>
)}
</div>
{/* Privacy Notice */} {/* Privacy Notice */}
<div className="mt-6 text-center"> <Box sx={{ mt: 3, textAlign: 'center' }}>
<p className="text-xs text-gray-500"> <Typography sx={{ fontSize: '12px', color: '#5f6368' }}>
AiMond의{' '} AiMond의{' '}
<a href="#" className="text-blue-600 hover:underline"> </a> {' '} <Link href="#" sx={{ color: '#1a73e8' }}> </Link> {' '}
<a href="#" className="text-blue-600 hover:underline"></a> . <Link href="#" sx={{ color: '#1a73e8' }}></Link> .
</p> </Typography>
</div> </Box>
</div> </Container>
</div> </Box>
{/* Footer */} {/* Footer */}
<footer className="py-4 px-4 border-t border-gray-200 bg-white"> <Box sx={{ borderTop: '1px solid #dadce0', py: 2, px: 3, backgroundColor: '#f8f9fa' }}>
<div className="max-w-7xl mx-auto flex items-center justify-between text-xs text-gray-600"> <Container maxWidth="lg">
<div className="flex items-center space-x-4"> <Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<span></span> <Typography sx={{ fontSize: '12px', color: '#5f6368' }}></Typography>
<ChevronDown size={16} /> <Stack direction="row" spacing={3}>
</div> <Link href="#" underline="none" sx={{ fontSize: '12px', color: '#5f6368' }}>
<div className="flex items-center space-x-6">
<a href="#" className="hover:text-gray-900"></a> </Link>
<a href="#" className="hover:text-gray-900"></a> <Link href="#" underline="none" sx={{ fontSize: '12px', color: '#5f6368' }}>
<a href="#" className="hover:text-gray-900"></a>
</div> </Link>
</div> <Link href="#" underline="none" sx={{ fontSize: '12px', color: '#5f6368' }}>
</footer>
</div> </Link>
</Stack>
</Box>
</Container>
</Box>
</Box>
) )
} }

View File

@ -2,13 +2,30 @@ import { useState, useEffect } from 'react'
import { useNavigate } from 'react-router-dom' import { useNavigate } from 'react-router-dom'
import { useAuth } from '../contexts/AuthContext' import { useAuth } from '../contexts/AuthContext'
import { import {
Eye, Box,
EyeOff, Container,
Loader2, TextField,
Shield, Button,
ChevronDown, Typography,
HelpCircle Link,
} from 'lucide-react' Paper,
IconButton,
InputAdornment,
Checkbox,
FormControlLabel,
Select,
MenuItem,
Avatar,
Stack,
Divider
} from '@mui/material'
import {
Visibility,
VisibilityOff,
Language,
HelpOutline,
KeyboardArrowDown
} from '@mui/icons-material'
const LoginPage = () => { const LoginPage = () => {
const [email, setEmail] = useState('') const [email, setEmail] = useState('')
@ -16,8 +33,7 @@ const LoginPage = () => {
const [showPassword, setShowPassword] = useState(false) const [showPassword, setShowPassword] = useState(false)
const [isLoading, setIsLoading] = useState(false) const [isLoading, setIsLoading] = useState(false)
const [rememberMe, setRememberMe] = useState(false) const [rememberMe, setRememberMe] = useState(false)
const [currentUser, setCurrentUser] = useState<string | null>(null) const [language, setLanguage] = useState('ko')
const [theme, setTheme] = useState<any>(null)
const { login, user } = useAuth() const { login, user } = useAuth()
const navigate = useNavigate() const navigate = useNavigate()
@ -26,34 +42,8 @@ const LoginPage = () => {
if (user) { if (user) {
navigate('/dashboard') navigate('/dashboard')
} }
// Get theme from query params (for OAuth applications)
const params = new URLSearchParams(window.location.search)
const appId = params.get('app_id')
const savedEmail = localStorage.getItem('last_user_email')
if (savedEmail) {
setCurrentUser(savedEmail)
setEmail(savedEmail)
}
if (appId) {
fetchApplicationTheme(appId)
}
}, [user, navigate]) }, [user, navigate])
const fetchApplicationTheme = async (appId: string) => {
try {
const response = await fetch(`/api/v1/applications/${appId}/theme`)
if (response.ok) {
const themeData = await response.json()
setTheme(themeData)
}
} catch (error) {
console.error('Failed to fetch theme:', error)
}
}
const handleSubmit = async (e: React.FormEvent) => { const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault() e.preventDefault()
setIsLoading(true) setIsLoading(true)
@ -70,182 +60,247 @@ const LoginPage = () => {
} }
} }
const switchAccount = () => {
setCurrentUser(null)
setEmail('')
setPassword('')
localStorage.removeItem('last_user_email')
}
return ( return (
<div className="min-h-screen flex flex-col bg-gray-50"> <Box
{/* Header */} sx={{
<div className="flex-1 flex flex-col justify-center py-12 px-4 sm:px-6 lg:px-8"> minHeight: '100vh',
<div className="mx-auto w-full max-w-md"> display: 'flex',
{/* Logo and Title */} flexDirection: 'column',
<div className="text-center mb-8"> backgroundColor: '#fff'
<div className="flex justify-center mb-4"> }}
{theme?.logo ? (
<img src={theme.logo} alt="Logo" className="h-12" />
) : (
<div className="flex items-center space-x-2">
<Shield className="w-10 h-10 text-blue-600" />
<span className="text-2xl font-semibold text-gray-900">AiMond</span>
</div>
)}
</div>
<h2 className="text-2xl text-gray-700">
{currentUser ? `${currentUser}로 로그인` : 'AiMond Account로 로그인'}
</h2>
</div>
{/* Login Card */}
<div className="bg-white rounded-lg shadow-md border border-gray-200 p-8">
{currentUser && (
<div className="mb-6">
<div className="flex items-center justify-center mb-4">
<div className="w-20 h-20 bg-gray-200 rounded-full flex items-center justify-center">
<span className="text-3xl text-gray-600">
{currentUser[0].toUpperCase()}
</span>
</div>
</div>
<div className="text-center">
<p className="text-sm text-gray-600">{currentUser}</p>
<button
onClick={switchAccount}
className="text-sm text-blue-600 hover:text-blue-700 mt-1"
> >
<Container maxWidth="sm">
</button> <Box
</div> sx={{
</div> minHeight: '100vh',
)} display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
py: 4
}}
>
{/* Logo and Title */}
<Box sx={{ textAlign: 'center', mb: 4 }}>
<Typography
variant="h4"
sx={{
fontWeight: 300,
color: '#202124',
mb: 2,
fontFamily: 'Google Sans, Roboto, Arial, sans-serif'
}}
>
<Box component="span" sx={{ fontWeight: 500 }}>AiMond</Box>
</Typography>
<Typography
variant="h5"
sx={{
fontWeight: 400,
color: '#202124',
mb: 1
}}
>
AiMond Account로
</Typography>
</Box>
<form onSubmit={handleSubmit} className="space-y-4"> {/* Login Form */}
{!currentUser && ( <Paper
<div> elevation={0}
<input sx={{
id="email" border: '1px solid #dadce0',
borderRadius: '8px',
p: 5,
maxWidth: 450,
width: '100%',
mx: 'auto'
}}
>
<form onSubmit={handleSubmit}>
<TextField
fullWidth
type="email" type="email"
required
value={email} value={email}
onChange={(e) => setEmail(e.target.value)} onChange={(e) => setEmail(e.target.value)}
className="w-full px-4 py-3 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition text-gray-900"
placeholder="이메일" placeholder="이메일"
disabled={isLoading}
/>
</div>
)}
<div>
<div className="relative">
<input
id="password"
type={showPassword ? 'text' : 'password'}
required required
sx={{
mb: 2,
'& .MuiOutlinedInput-root': {
'&:hover fieldset': {
borderColor: '#1976d2',
},
},
}}
size="medium"
autoComplete="email"
/>
<Link
href="#"
underline="none"
sx={{
color: '#1a73e8',
fontSize: '14px',
fontWeight: 500,
display: 'block',
mb: 3
}}
>
?
</Link>
<TextField
fullWidth
type={showPassword ? 'text' : 'password'}
value={password} value={password}
onChange={(e) => setPassword(e.target.value)} onChange={(e) => setPassword(e.target.value)}
className="w-full px-4 py-3 pr-12 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition text-gray-900"
placeholder="비밀번호를 입력하세요" placeholder="비밀번호를 입력하세요"
disabled={isLoading} required
/> sx={{ mb: 1 }}
<button size="medium"
type="button" InputProps={{
endAdornment: (
<InputAdornment position="end">
<IconButton
onClick={() => setShowPassword(!showPassword)} onClick={() => setShowPassword(!showPassword)}
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700" edge="end"
size="small"
> >
{showPassword ? <EyeOff size={20} /> : <Eye size={20} />} {showPassword ? <VisibilityOff /> : <Visibility />}
</button> </IconButton>
</div> </InputAdornment>
</div> ),
}}
/>
<div className="flex items-center"> <FormControlLabel
<input control={
type="checkbox" <Checkbox
id="rememberMe"
checked={rememberMe} checked={rememberMe}
onChange={(e) => setRememberMe(e.target.checked)} onChange={(e) => setRememberMe(e.target.checked)}
className="w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500" size="small"
sx={{ color: '#5f6368' }}
/> />
<label htmlFor="rememberMe" className="ml-2 text-sm text-gray-600"> }
label={
<Typography sx={{ fontSize: '14px', color: '#5f6368' }}>
</label> </Typography>
</div> }
sx={{ mb: 4 }}
/>
<button <Typography
type="submit" sx={{
disabled={isLoading} fontSize: '14px',
className="w-full py-3 px-4 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md transition duration-200 flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed" color: '#5f6368',
mb: 4,
lineHeight: 1.5
}}
> >
{isLoading ? (
<>
<Loader2 className="animate-spin mr-2" size={20} />
...
</>
) : (
'로그인'
)}
</button>
</form>
<div className="mt-4 flex items-center justify-between">
<a href="#" className="text-sm text-blue-600 hover:text-blue-700">
?
</a>
</div>
</div>
{/* Create Account Link */}
<div className="mt-6 text-center">
<a href="/signup" className="text-blue-600 hover:text-blue-700 text-sm font-medium">
</a>
</div>
{/* Footer Text */}
<div className="mt-8 text-center">
<p className="text-xs text-gray-500">
AiMond AiMond AiMond AiMond
</p> </Typography>
</div>
{/* Service Icons */} {/* Service Icons */}
<div className="mt-6 flex justify-center space-x-4"> <Stack direction="row" spacing={1} justifyContent="center" sx={{ mb: 4 }}>
<div className="w-8 h-8 bg-blue-100 rounded flex items-center justify-center"> <Avatar sx={{ width: 32, height: 32, bgcolor: '#4285f4', fontSize: 14 }}>A</Avatar>
<span className="text-blue-600 text-xs font-bold">A</span> <Avatar sx={{ width: 32, height: 32, bgcolor: '#ea4335', fontSize: 14 }}>M</Avatar>
</div> <Avatar sx={{ width: 32, height: 32, bgcolor: '#34a853', fontSize: 14 }}>D</Avatar>
<div className="w-8 h-8 bg-red-100 rounded flex items-center justify-center"> <Avatar sx={{ width: 32, height: 32, bgcolor: '#fbbc04', fontSize: 14 }}>S</Avatar>
<span className="text-red-600 text-xs font-bold">M</span> <Avatar sx={{ width: 32, height: 32, bgcolor: '#9333ea', fontSize: 14 }}>C</Avatar>
</div> </Stack>
<div className="w-8 h-8 bg-green-100 rounded flex items-center justify-center">
<span className="text-green-600 text-xs font-bold">D</span> <Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
</div> <Link
<div className="w-8 h-8 bg-yellow-100 rounded flex items-center justify-center"> href="/signup"
<span className="text-yellow-600 text-xs font-bold">S</span> underline="none"
</div> sx={{
<div className="w-8 h-8 bg-purple-100 rounded flex items-center justify-center"> color: '#1a73e8',
<span className="text-purple-600 text-xs font-bold">C</span> fontSize: '14px',
</div> fontWeight: 500
</div> }}
</div> >
</div>
</Link>
<Button
type="submit"
variant="contained"
disabled={isLoading}
sx={{
backgroundColor: '#1a73e8',
color: 'white',
textTransform: 'none',
px: 3,
py: 1,
fontSize: '14px',
fontWeight: 500,
'&:hover': {
backgroundColor: '#1666c9',
},
}}
>
</Button>
</Box>
</form>
</Paper>
{/* Language Selection Link */}
<Box sx={{ textAlign: 'center', mt: 3 }}>
<Link
href="#"
underline="none"
sx={{
color: '#1a73e8',
fontSize: '14px',
display: 'inline-flex',
alignItems: 'center',
gap: 0.5
}}
>
</Link>
</Box>
</Box>
</Container>
{/* Footer */} {/* Footer */}
<footer className="py-4 px-4 border-t border-gray-200 bg-white"> <Box
<div className="max-w-7xl mx-auto flex items-center justify-between text-xs text-gray-600"> sx={{
<div className="flex items-center space-x-4"> borderTop: '1px solid #dadce0',
<span></span> py: 2,
<ChevronDown size={16} /> px: 3,
</div> backgroundColor: '#f8f9fa'
<div className="flex items-center space-x-6"> }}
<a href="#" className="hover:text-gray-900"></a> >
<a href="#" className="hover:text-gray-900"></a> <Container maxWidth="lg">
<a href="#" className="hover:text-gray-900"></a> <Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
</div> <Select
</div> value={language}
</footer> onChange={(e) => setLanguage(e.target.value)}
</div> variant="standard"
disableUnderline
sx={{ fontSize: '12px', color: '#5f6368' }}
>
<MenuItem value="ko"></MenuItem>
<MenuItem value="en">English</MenuItem>
</Select>
<Stack direction="row" spacing={3}>
<Link href="#" underline="none" sx={{ fontSize: '12px', color: '#5f6368' }}>
</Link>
<Link href="#" underline="none" sx={{ fontSize: '12px', color: '#5f6368' }}>
</Link>
<Link href="#" underline="none" sx={{ fontSize: '12px', color: '#5f6368' }}>
</Link>
</Stack>
</Box>
</Container>
</Box>
</Box>
) )
} }