feat(auth): redesign auth UI to match Dart original

- Full-bleed bg_login.png background outside 500px MobileShell
- Facebook landing: logo + Facebook pill button + "Other Sign In Options" link
- Replace centered Dialog with true bottom sheet (drag handle, top radius 28px)
- Email panel: internal login/register toggle, no separate route
- Pink gradient primary button (#f96ADE → #f657A0)
- Pill input fields (46px, white, radius 24, pink 10% shadow)
- Pink circular checkbox + bold Privacy/Terms rich text (visual only, non-blocking)
- Floating 40x40 white back button (top:20/left:20)
- Wire AuthPanelModeChanged dispatch for panel switching
- New design tokens (--color-auth-*, --auth-*, --radius-bottom-sheet)
- New generic BottomSheet component
- Copy ic-logo-login.png (+@2x, +@3x) from Dart assets

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-10 14:27:06 +08:00
parent 4e27b4c512
commit 90bb711a45
30 changed files with 967 additions and 335 deletions
+14 -24
View File
@@ -5,10 +5,11 @@
* 原始 Dart: lib/ui/auth/auth_screen.dart
*
* 行为对齐:
* - 500px 移动端宽度(MobileShell
* - 已登录用户:自动跳 /chat
* - 登录:渲染 AuthPanel(含 Facebook/Email 两种面板)
* - 登录成功:通知 ChatBloc + UserBloc,然后 router.replace(/chat)
* - 500px 移动端宽度(MobileShell
* - 全屏 `bg_login.png` 背景(cover 模式,扩展到 viewport
* - 登录用户:自动跳 /chat
* - 登录:渲染 AuthPanel(含 Facebook/Email 两种面板)
* - 登录成功:通知 ChatBloc + UserBloc,然后 router.replace(/chat)
*/
import { useEffect, useRef } from "react";
import { useRouter } from "next/navigation";
@@ -20,14 +21,9 @@ import { ROUTES } from "@/router/routes";
import { MobileShell } from "@/app/_components/core/mobile-shell";
import { AuthPanel } from "@/app/auth/components/auth-panel";
export interface AuthScreenProps {
/** 自定义背景(默认紫粉渐变)。 */
background?: string;
}
import styles from "./auth-screen.module.css";
export function AuthScreen({
background = "var(--color-sidebar-background)",
}: AuthScreenProps) {
export function AuthScreen() {
// ===== 鉴权路由跳转已由 src/router/proxy.ts 集中处理 =====
// 本组件只负责:
// 1. 渲染登录面板
@@ -50,18 +46,12 @@ export function AuthScreen({
}, [state.isSuccess, chatDispatch, userDispatch, router]);
return (
<MobileShell background={background}>
<div
style={{
flex: 1,
display: "flex",
flexDirection: "column",
justifyContent: "center",
padding: "var(--spacing-lg)",
}}
>
<AuthPanel />
</div>
</MobileShell>
<div className={styles.fullBleed}>
<MobileShell>
<div className={styles.content}>
<AuthPanel />
</div>
</MobileShell>
</div>
);
}