diff --git a/components/common/CallbackModal.tsx b/components/common/CallbackModal.tsx index 469e07a..49770a3 100644 --- a/components/common/CallbackModal.tsx +++ b/components/common/CallbackModal.tsx @@ -107,7 +107,6 @@ export default function CallbackModal({ onClose }: { onClose: () => void }) {

Payment Successful!

-

{`Order ID: ${paymentInfo?.orderId || 'N/A'}`}

@@ -139,7 +138,6 @@ export default function CallbackModal({ onClose }: { onClose: () => void }) {
-

Order ID: {paymentInfo?.orderId || 'N/A'}

If the problem persists, please contact customer service

diff --git a/components/pages/login.tsx b/components/pages/login.tsx index 45fcf9e..2a3905a 100644 --- a/components/pages/login.tsx +++ b/components/pages/login.tsx @@ -2,7 +2,6 @@ import { useState, useCallback, useEffect } from 'react'; import './style/login.css'; -import VantaHaloBackground from '@/components/vanta-halo-background'; import { useRouter, useSearchParams } from 'next/navigation'; import React from 'react'; import Link from 'next/link'; @@ -11,7 +10,6 @@ import { GradientText } from '@/components/ui/gradient-text'; import { Eye, EyeOff } from 'lucide-react'; export default function Login() { - const [isLoaded, setIsLoaded] = useState(false); const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [showPassword, setShowPassword] = useState(false); @@ -25,23 +23,19 @@ export default function Login() { useEffect(() => { const registered = searchParams?.get('registered'); if (registered === 'true') { - setSuccessMessage('注册成功!请使用您的新帐号登录。'); + setSuccessMessage('Registration successful! Please login with your new account.'); } - + const error = searchParams?.get('error'); if (error) { if (error === 'google_oauth') { - setFormError('Google登录失败,请重试。'); + setFormError('Google login failed, please try again.'); } else if (error === 'auth_failed') { - setFormError('身份验证失败,请重试。'); + setFormError('Authentication failed, please try again.'); } } }, [searchParams]); - const handleBackgroundLoaded = useCallback(() => { - setIsLoaded(true); - }, []); - const handleGoogleSignIn = () => { signInWithGoogle(); }; @@ -51,21 +45,21 @@ export default function Login() { setIsSubmitting(true); setFormError(''); setSuccessMessage(''); - + try { await loginUser(email, password); // 登录成功后跳转到首页 router.push('/'); } catch (error: any) { console.error('Login failed:', error); - + // 根据错误类型显示不同的错误消息 if (error.message) { setFormError(error.message); } else if (error.msg) { setFormError(error.msg); } else { - setFormError('登录失败,请检查您的凭据后重试。'); + setFormError('Login failed, please check your credentials and try again.'); } } finally { setIsSubmitting(false); @@ -73,11 +67,27 @@ export default function Login() { }; return ( -
- {/* logo Movie Flow */} -
+
+ {/* 背景视频 */} + + + {/* 视频遮罩层 */} +
+ + {/* Logo */} +
-
-
- -
-
-
-
-

登录

-

输入您的凭据以访问您的账户

+ {/* 登录框 - 居中显示 */} +
+
+
+

Login

+

Enter your credentials to access your account

-
+ {successMessage && (
{successMessage}
)} - -
- - + + setEmail(e.target.value)} />
-
- +
+
- setPassword(e.target.value)} @@ -137,32 +145,32 @@ export default function Login() { {!showPassword ? : }
- - + {formError && (
{formError}
)} - - - +
- + or
- - - -
+ +

- 还没有账户? 注册 + Don't have an account? Sign up

@@ -181,4 +189,4 @@ export default function Login() {
); -} \ No newline at end of file +} diff --git a/public/assets/home.mp4 b/public/assets/home.mp4 index 4845c00..1f22552 100644 Binary files a/public/assets/home.mp4 and b/public/assets/home.mp4 differ diff --git a/public/assets/login.mp4 b/public/assets/login.mp4 new file mode 100644 index 0000000..4cca61b Binary files /dev/null and b/public/assets/login.mp4 differ