diff --git a/frontend/components/auth/LoginClient.tsx b/frontend/components/auth/LoginClient.tsx index 25ce5195..edd004af 100644 --- a/frontend/components/auth/LoginClient.tsx +++ b/frontend/components/auth/LoginClient.tsx @@ -7,11 +7,13 @@ import { ArrowRight, ChevronLeft, Chrome, - Cloud, CloudRain, + CloudSun, Lock, Mail, Sun, + Eye, + EyeOff, } from "lucide-react"; import { getSupabaseBrowserClient, @@ -36,12 +38,15 @@ export function LoginClient({ nextPath }: LoginClientProps) { const [errorText, setErrorText] = useState(""); const [infoText, setInfoText] = useState(""); const [resetSent, setResetSent] = useState(false); + const [showPassword, setShowPassword] = useState(false); const supabaseReady = hasSupabasePublicEnv(); + const isLogin = mode === "login"; const siteOrigin = getConfiguredSiteUrl() || (typeof window !== "undefined" ? window.location.origin : PRODUCTION_SITE_URL); const isEn = locale === "en-US"; + const copy = { backHome: isEn ? "Back to Home" : "返回首页", subtitle: isEn @@ -57,7 +62,7 @@ export function LoginClient({ nextPath }: LoginClientProps) { passwordSignupPlaceholder: isEn ? "Set at least 6 characters" : "设置至少 6 位密码", - loginSubmit: isEn ? "Start your weather journey" : "开启天气之旅", + loginSubmit: isEn ? "Start your weather journey" : "开启天气交易之旅", signupSubmit: isEn ? "Create account now" : "立即创建账号", loginHint: isEn ? "After signing in, your homepage will be personalized." @@ -87,6 +92,21 @@ export function LoginClient({ nextPath }: LoginClientProps) { loginFailedHint: isEn ? "If you just signed up, please verify your email first. Check your inbox or spam folder." : "如果刚注册,请先点击邮箱中的验证链接。检查收件箱或垃圾邮件。", + + // New translations for Koyfin-style layouts + workEmail: isEn ? "Work email" : "工作邮箱", + password: isEn ? "Password" : "密码", + welcomeBack: isEn ? "Welcome Back" : "欢迎回来", + signUpTitle: isEn ? "Sign up for your PolyWeather account" : "注册您的 PolyWeather 账户", + newToPoly: isEn ? "New to PolyWeather?" : "还没有 PolyWeather 账号?", + alreadyHave: isEn ? "Already have an account?" : "已经有账号了?", + termsAgreement: isEn + ? "By proceeding, you agree to the Privacy Policy and Terms & Conditions." + : "继续操作即代表您同意隐私政策与服务条款。", + desc: isEn + ? "Access robust METAR observations, advanced DEB forecast blends, and real-time AI decision cards that bring clarity to your weather-market portfolios." + : "提供精准的机场 METAR 实况、先进的 DEB 智能融合预测和实时 AI 决策卡片,助您看清天气市场脉络。", + trusted: isEn ? "Trusted by institutional traders" : "深受机构交易员信赖", } as const; const onResetPassword = async () => { @@ -214,152 +234,299 @@ export function LoginClient({ nextPath }: LoginClientProps) { } }; - const isLogin = mode === "login"; + if (mode === "signup") { + return ( +
+ {copy.desc} +
++ {copy.trusted} +
++ {copy.subtitle} +
+ + + +{errorText}
: null} + {infoText ?{infoText}
: null} + ++ {copy.alreadyHave}{" "} + +
+{copy.subtitle}
-