diff --git a/src/app/_components/core/mobile-shell.tsx b/src/app/_components/core/mobile-shell.tsx index cab15323..a0c432e0 100644 --- a/src/app/_components/core/mobile-shell.tsx +++ b/src/app/_components/core/mobile-shell.tsx @@ -1,11 +1,12 @@ -"use client"; /** - * 500px 移动端 Shell + * 500px 移动端 Shell(Server Component) * * 原始 Dart: 每个屏幕的 `Scaffold → SafeArea → Center → ConstrainedBox(maxWidth: 500)` 模式 * (`Breakpoints.mobileMaxWidth = 500.0`)。 * * 集中封装,调用方仅需 `{...}` 即可获得统一的移动端宽度约束。 + * + * 本组件无 hooks,可作为 Server Component 直接 SSR。 */ import type { ReactNode } from "react"; diff --git a/src/app/splash/components/splash-button.tsx b/src/app/splash/components/splash-button.tsx index 155b68b4..ba5a6286 100644 --- a/src/app/splash/components/splash-button.tsx +++ b/src/app/splash/components/splash-button.tsx @@ -5,36 +5,63 @@ * 原始 Dart: lib/ui/splash/widgets/splash_button.dart * `Row(children: [Skip 文本, SizedBox 26, Facebook 登录按钮])` * - * 关键对齐点: + * 本组件是 splash 鉴权流程的**自治单元**: + * - 直接消费 `useAuthGate` / `useAuthState` / `useAuthDispatch` + * - 直接消费 `useChatDispatch` / `useUserDispatch`(登录成功后初始化) + * - 自管路由跳转(已登录 / 登录成功 → /chat) + * - Skip 用 `` 保留 SPA 体验 + * + * 设计要点: * - 仅两个元素:Skip 文本 + Facebook 登录按钮 * - 居中布局 (MainAxisAlignment.center) * - Facebook 按钮:带渐变(primaryGradient)+ 圆角 24 + 高度 48 * - 加载中:按钮内显示 spinner - * - * Skip 按钮使用 `` 而非 `