diff --git a/frontend/components/auth/LoginClient.tsx b/frontend/components/auth/LoginClient.tsx index d4a1fcd8..3d094e6b 100644 --- a/frontend/components/auth/LoginClient.tsx +++ b/frontend/components/auth/LoginClient.tsx @@ -52,8 +52,8 @@ export function LoginClient({ nextPath, initialError, initialMode }: LoginClient const copy = { backHome: isEn ? "Back to Home" : "返回首页", subtitle: isEn - ? "Explore weather details from every corner of the world" - : "探索世界每一个角落的气象细节", + ? "Enter the live terminal, subscription center, and Telegram entitlement workflow." + : "进入实时终端、订阅中心和 Telegram 权益工作流。", googleOneClick: isEn ? "Continue with Google" : "使用 Google 账号一键登录", @@ -64,9 +64,9 @@ export function LoginClient({ nextPath, initialError, initialMode }: LoginClient passwordSignupPlaceholder: isEn ? "Set at least 6 characters" : "设置至少 6 位密码", - loginSubmit: isEn ? "Start your weather decision journey" : "开启气象决策之旅", + loginSubmit: isEn ? "Enter PolyWeather Terminal" : "进入 PolyWeather 终端", loginSubmitting: isEn ? "Signing in..." : "正在登录...", - signupSubmit: isEn ? "Create account now" : "立即创建账号", + signupSubmit: isEn ? "Create account and start trial" : "创建账号并领取试用", signupSubmitting: isEn ? "Creating account..." : "正在创建账号...", googleSubmitting: isEn ? "Connecting Google..." : "正在连接 Google...", loginHint: isEn @@ -101,8 +101,8 @@ export function LoginClient({ nextPath, initialError, initialMode }: LoginClient // 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 账户", + welcomeBack: isEn ? "Sign in to PolyWeather" : "登录 PolyWeather", + signUpTitle: isEn ? "Create your PolyWeather account" : "创建 PolyWeather 账号", newToPoly: isEn ? "New to PolyWeather?" : "还没有 PolyWeather 账号?", alreadyHave: isEn ? "Already have an account?" : "已经有账号了?", termsAgreement: isEn @@ -264,22 +264,28 @@ export function LoginClient({ nextPath, initialError, initialMode }: LoginClient
- - PolyWeather + + + PW + + PolyWeather

{isEn ? ( <> - Weather intelligence and risk management{" "} + Settlement-source evidence for temperature markets{" "} simplified. ) : ( <> - 天气信息与风险管理{" "} + 结算源实测与温度市场判断{" "} 化繁为简。 @@ -407,12 +413,18 @@ export function LoginClient({ nextPath, initialError, initialMode }: LoginClient {/* Top Header Switch */}
{/* Logo on top-left for mobile only */} - - PolyWeather + + + PW + + PolyWeather
- + {isLogin ? copy.newToPoly : copy.alreadyHave} @@ -430,8 +442,8 @@ export function LoginClient({ nextPath, initialError, initialMode }: LoginClient
{/* Center Form Card */} -
-
+
+

{isLogin ? copy.welcomeBack : copy.signUpTitle} diff --git a/frontend/components/auth/__tests__/authDesign.test.ts b/frontend/components/auth/__tests__/authDesign.test.ts new file mode 100644 index 00000000..f04629cb --- /dev/null +++ b/frontend/components/auth/__tests__/authDesign.test.ts @@ -0,0 +1,42 @@ +import fs from "node:fs"; +import path from "node:path"; + +function assert(condition: unknown, message: string) { + if (!condition) throw new Error(message); +} + +export function runTests() { + const source = fs.readFileSync( + path.join(process.cwd(), "components", "auth", "LoginClient.tsx"), + "utf8", + ); + + assert( + source.includes("登录 PolyWeather") && + source.includes("创建 PolyWeather 账号") && + source.includes("创建账号并领取试用"), + "auth entry copy must be product-specific and explain the signup trial path", + ); + assert( + source.includes("PW") && source.includes("PolyWeather"), + "auth pages must show a readable PolyWeather brand mark", + ); + assert( + !source.includes("brightness-0 invert"), + "auth dark panel must not invert the square logo image into a white block", + ); + assert( + source.includes("items-start justify-center pt-10") && + source.includes("lg:items-center lg:pt-0"), + "auth form must sit higher on mobile while staying centered on desktop", + ); + assert( + !source.includes("hover:-translate-y-1"), + "auth form card must not shift position on hover", + ); + assert( + source.includes("hidden text-xs text-slate-500 sm:inline") && + source.includes("whitespace-nowrap rounded-xl"), + "auth mode switch prompt must not crowd or wrap the mobile header", + ); +} diff --git a/frontend/components/landing/InstitutionalLandingPage.tsx b/frontend/components/landing/InstitutionalLandingPage.tsx index b25ffe11..f1af8210 100644 --- a/frontend/components/landing/InstitutionalLandingPage.tsx +++ b/frontend/components/landing/InstitutionalLandingPage.tsx @@ -249,8 +249,11 @@ function InstitutionalLandingScreen({ locale }: { locale: LandingLocale }) {
- - PolyWeather + + PolyWeather