From a13dff84ba8b0796c49d3e03aad386ec87204e44 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Tue, 26 May 2026 00:37:18 +0800 Subject: [PATCH] =?UTF-8?q?LoginClient=20=E7=BB=86=E8=8A=82=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/components/auth/LoginClient.tsx | 365 +++++++++-------------- 1 file changed, 137 insertions(+), 228 deletions(-) diff --git a/frontend/components/auth/LoginClient.tsx b/frontend/components/auth/LoginClient.tsx index f4590c1d..8b2448b9 100644 --- a/frontend/components/auth/LoginClient.tsx +++ b/frontend/components/auth/LoginClient.tsx @@ -235,97 +235,116 @@ export function LoginClient({ nextPath, initialMode }: LoginClientProps) { } }; - if (mode === "signup") { - return ( -
- {/* Left Dark Column */} -
- {/* Ambient Glows */} -
-
- {/* Grid overlay */} -
+ return ( +
+ {/* Left Column (Shared Dark Column with Illustrative Widget) */} +
+ {/* Ambient Glows */} +
+
+ {/* Grid overlay */} +
-
- - PolyWeather - +
+ + PolyWeather + -
-

- {isEn ? ( - <> - Weather intelligence and risk management{" "} - - simplified. - - - ) : ( - <> - 天气信息与风险管理{" "} - - 化繁为简。 - - - )} -

-

- {copy.desc} -

-
-
- - {/* Sleek Terminal Preview Widget */} -
-
-
- - - {isEn ? "Runway 02L Settlement" : "跑道 02L 官方结算"} - -
- LIVE -
- -
-
- {isEn ? "Current Temp:" : "当前气温:"} - 28.8°C -
-
- {isEn ? "UMA Threshold:" : "UMA 结算阈值:"} - 30.0°C -
-
- {isEn ? "Model Probability:" : "模型预测概率:"} - 88.5% -
-
- {isEn ? "Market Price:" : "市场买卖价差:"} - $10.00 -
-
- - {/* Sparkline visualization */} -
-
- {[30, 45, 38, 52, 68, 85, 78, 92, 88].map((h, i) => ( -
- ))} -
-
+
+

+ {isEn ? ( + <> + Weather intelligence and risk management{" "} + + simplified. + + + ) : ( + <> + 天气信息与风险管理{" "} + + 化繁为简。 + + + )} +

+

+ {copy.desc} +

- {/* Right White Column (Signup Form) */} -
+ {/* Sleek Terminal Preview Widget */} +
+
+
+ + + {isEn ? "Runway 02L Settlement" : "跑道 02L 官方结算"} + +
+ LIVE +
+ +
+
+ {isEn ? "Current Temp:" : "当前气温:"} + 28.8°C +
+
+ {isEn ? "UMA Threshold:" : "UMA 结算阈值:"} + 30.0°C +
+
+ {isEn ? "Model Probability:" : "模型预测概率:"} + 88.5% +
+
+ {isEn ? "Market Price:" : "市场买卖价差:"} + $10.00 +
+
+ + {/* Sparkline visualization */} +
+
+ {[30, 45, 38, 52, 68, 85, 78, 92, 88].map((h, i) => ( +
+ ))} +
+
+
+
+ + {/* Right Column (Forms) */} +
+ {/* Top bar switch */} +
+ + {isLogin ? copy.newToPoly : copy.alreadyHave} + + +
+ + {/* Center Form Card */} +

- {copy.signUpTitle} + {isLogin ? copy.welcomeBack : copy.signUpTitle}

{copy.subtitle} @@ -350,9 +369,21 @@ export function LoginClient({ nextPath, initialMode }: LoginClientProps) {

- +
+ + {isLogin && !resetSent ? ( + + ) : null} +
setPassword(event.target.value)} - placeholder={copy.passwordSignupPlaceholder} + placeholder={isLogin ? copy.passwordLoginPlaceholder : copy.passwordSignupPlaceholder} className="w-full rounded-lg border border-slate-300 bg-white py-2.5 pl-10 pr-10 text-sm text-slate-950 placeholder:text-slate-400 transition-all focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20" />
-

- {copy.termsAgreement} -

+ {!isLogin && ( +

+ {copy.termsAgreement} +

+ )} @@ -407,144 +440,20 @@ export function LoginClient({ nextPath, initialMode }: LoginClientProps) { {errorText ?

{errorText}

: null} {infoText ?

{infoText}

: null} - -

- {copy.alreadyHave}{" "} - -

+ {errorText && isLogin && errorText.includes("Invalid login") ? ( +

{copy.loginFailedHint}

+ ) : null} + {infoText === copy.signupCheckEmail ? ( +

{copy.resendVerify}

+ ) : null}
+ + {/* Footer */} +
+ © {new Date().getFullYear()} PolyWeather. All rights reserved. +
- ); - } - - return ( -
- {/* Top Header */} -
- - PolyWeather - -
- {copy.newToPoly} - -
-
- - {/* Main Login Card Area */} -
-
-

- {copy.welcomeBack} -

-

- {copy.subtitle} -

- -
void onEmailSubmit(event)} className="space-y-4"> -
- -
- - setEmail(event.target.value)} - placeholder="yourname@email.com" - className="w-full rounded-lg border border-slate-300 bg-white py-2.5 pl-10 pr-4 text-sm text-slate-950 placeholder:text-slate-400 transition-all focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20" - /> -
-
- -
-
- - {isLogin && !resetSent ? ( - - ) : null} -
-
- - setPassword(event.target.value)} - placeholder={copy.passwordLoginPlaceholder} - className="w-full rounded-lg border border-slate-300 bg-white py-2.5 pl-10 pr-10 text-sm text-slate-950 placeholder:text-slate-400 transition-all focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20" - /> - -
-
- - -
- -
-
- - {isEn ? "or" : "或"} - -
-
- - - - {errorText ?

{errorText}

: null} - {infoText ?

{infoText}

: null} - {errorText && isLogin && errorText.includes("Invalid login") ? ( -

{copy.loginFailedHint}

- ) : null} - {infoText === copy.signupCheckEmail ? ( -

{copy.resendVerify}

- ) : null} -
-
); }