diff --git a/src/components/core/auth-back-button.module.css b/src/app/_components/core/auth-back-button.module.css similarity index 100% rename from src/components/core/auth-back-button.module.css rename to src/app/_components/core/auth-back-button.module.css diff --git a/src/components/core/auth-back-button.tsx b/src/app/_components/core/auth-back-button.tsx similarity index 100% rename from src/components/core/auth-back-button.tsx rename to src/app/_components/core/auth-back-button.tsx diff --git a/src/components/core/dialog.module.css b/src/app/_components/core/dialog.module.css similarity index 100% rename from src/components/core/dialog.module.css rename to src/app/_components/core/dialog.module.css diff --git a/src/components/core/dialog.tsx b/src/app/_components/core/dialog.tsx similarity index 100% rename from src/components/core/dialog.tsx rename to src/app/_components/core/dialog.tsx diff --git a/src/components/core/loading-indicator.module.css b/src/app/_components/core/loading-indicator.module.css similarity index 100% rename from src/components/core/loading-indicator.module.css rename to src/app/_components/core/loading-indicator.module.css diff --git a/src/components/core/loading-indicator.tsx b/src/app/_components/core/loading-indicator.tsx similarity index 100% rename from src/components/core/loading-indicator.tsx rename to src/app/_components/core/loading-indicator.tsx diff --git a/src/components/core/mobile-shell.module.css b/src/app/_components/core/mobile-shell.module.css similarity index 100% rename from src/components/core/mobile-shell.module.css rename to src/app/_components/core/mobile-shell.module.css diff --git a/src/components/core/mobile-shell.tsx b/src/app/_components/core/mobile-shell.tsx similarity index 100% rename from src/components/core/mobile-shell.tsx rename to src/app/_components/core/mobile-shell.tsx diff --git a/src/components/core/settings-section.module.css b/src/app/_components/core/settings-section.module.css similarity index 100% rename from src/components/core/settings-section.module.css rename to src/app/_components/core/settings-section.module.css diff --git a/src/components/core/settings-section.tsx b/src/app/_components/core/settings-section.tsx similarity index 100% rename from src/components/core/settings-section.tsx rename to src/app/_components/core/settings-section.tsx diff --git a/src/components/auth/__tests__/auth-validators.test.ts b/src/app/auth/components/__tests__/auth-validators.test.ts similarity index 95% rename from src/components/auth/__tests__/auth-validators.test.ts rename to src/app/auth/components/__tests__/auth-validators.test.ts index 3ade889b..321b6c22 100644 --- a/src/components/auth/__tests__/auth-validators.test.ts +++ b/src/app/auth/components/__tests__/auth-validators.test.ts @@ -4,7 +4,7 @@ import { validateEmail, validatePassword, validateUsername, -} from "@/components/auth/auth-validators"; +} from "@/app/auth/components/auth-validators"; describe("validateEmail", () => { it("accepts a valid email", () => { diff --git a/src/components/auth/auth-divider.module.css b/src/app/auth/components/auth-divider.module.css similarity index 100% rename from src/components/auth/auth-divider.module.css rename to src/app/auth/components/auth-divider.module.css diff --git a/src/components/auth/auth-divider.tsx b/src/app/auth/components/auth-divider.tsx similarity index 100% rename from src/components/auth/auth-divider.tsx rename to src/app/auth/components/auth-divider.tsx diff --git a/src/components/auth/auth-email-panel.module.css b/src/app/auth/components/auth-email-panel.module.css similarity index 100% rename from src/components/auth/auth-email-panel.module.css rename to src/app/auth/components/auth-email-panel.module.css diff --git a/src/components/auth/auth-email-panel.tsx b/src/app/auth/components/auth-email-panel.tsx similarity index 100% rename from src/components/auth/auth-email-panel.tsx rename to src/app/auth/components/auth-email-panel.tsx diff --git a/src/components/auth/auth-error-message.module.css b/src/app/auth/components/auth-error-message.module.css similarity index 100% rename from src/components/auth/auth-error-message.module.css rename to src/app/auth/components/auth-error-message.module.css diff --git a/src/components/auth/auth-error-message.tsx b/src/app/auth/components/auth-error-message.tsx similarity index 100% rename from src/components/auth/auth-error-message.tsx rename to src/app/auth/components/auth-error-message.tsx diff --git a/src/components/auth/auth-facebook-panel.module.css b/src/app/auth/components/auth-facebook-panel.module.css similarity index 100% rename from src/components/auth/auth-facebook-panel.module.css rename to src/app/auth/components/auth-facebook-panel.module.css diff --git a/src/components/auth/auth-facebook-panel.tsx b/src/app/auth/components/auth-facebook-panel.tsx similarity index 100% rename from src/components/auth/auth-facebook-panel.tsx rename to src/app/auth/components/auth-facebook-panel.tsx diff --git a/src/components/auth/auth-legal-text.module.css b/src/app/auth/components/auth-legal-text.module.css similarity index 100% rename from src/components/auth/auth-legal-text.module.css rename to src/app/auth/components/auth-legal-text.module.css diff --git a/src/components/auth/auth-legal-text.tsx b/src/app/auth/components/auth-legal-text.tsx similarity index 100% rename from src/components/auth/auth-legal-text.tsx rename to src/app/auth/components/auth-legal-text.tsx diff --git a/src/components/auth/auth-other-options-dialog.module.css b/src/app/auth/components/auth-other-options-dialog.module.css similarity index 100% rename from src/components/auth/auth-other-options-dialog.module.css rename to src/app/auth/components/auth-other-options-dialog.module.css diff --git a/src/components/auth/auth-other-options-dialog.tsx b/src/app/auth/components/auth-other-options-dialog.tsx similarity index 96% rename from src/components/auth/auth-other-options-dialog.tsx rename to src/app/auth/components/auth-other-options-dialog.tsx index b1f3477b..cd8565c5 100644 --- a/src/components/auth/auth-other-options-dialog.tsx +++ b/src/app/auth/components/auth-other-options-dialog.tsx @@ -4,7 +4,7 @@ * * 原始 Dart: lib/ui/auth/widgets/auth_other_options_dialog.dart */ -import { Dialog } from "@/components/core/dialog"; +import { Dialog } from "@/app/_components/core/dialog"; import { AuthSocialButtons } from "./auth-social-buttons"; import { AuthDivider } from "./auth-divider"; import styles from "./auth-other-options-dialog.module.css"; diff --git a/src/components/auth/auth-panel.module.css b/src/app/auth/components/auth-panel.module.css similarity index 100% rename from src/components/auth/auth-panel.module.css rename to src/app/auth/components/auth-panel.module.css diff --git a/src/components/auth/auth-panel.tsx b/src/app/auth/components/auth-panel.tsx similarity index 100% rename from src/components/auth/auth-panel.tsx rename to src/app/auth/components/auth-panel.tsx diff --git a/src/components/auth/auth-primary-button.module.css b/src/app/auth/components/auth-primary-button.module.css similarity index 100% rename from src/components/auth/auth-primary-button.module.css rename to src/app/auth/components/auth-primary-button.module.css diff --git a/src/components/auth/auth-primary-button.tsx b/src/app/auth/components/auth-primary-button.tsx similarity index 100% rename from src/components/auth/auth-primary-button.tsx rename to src/app/auth/components/auth-primary-button.tsx diff --git a/src/components/auth/auth-screen.tsx b/src/app/auth/components/auth-screen.tsx similarity index 94% rename from src/components/auth/auth-screen.tsx rename to src/app/auth/components/auth-screen.tsx index 427a33d9..7803d084 100644 --- a/src/components/auth/auth-screen.tsx +++ b/src/app/auth/components/auth-screen.tsx @@ -18,8 +18,8 @@ import { useChatDispatch } from "@/contexts/chat/chat-context"; import { useUserDispatch } from "@/contexts/user/user-context"; import { useAuthGate } from "@/lib/auth/use-auth-gate"; import { ROUTES } from "@/lib/routes"; -import { MobileShell } from "@/components/core/mobile-shell"; -import { AuthPanel } from "@/components/auth/auth-panel"; +import { MobileShell } from "@/app/_components/core/mobile-shell"; +import { AuthPanel } from "@/app/auth/components/auth-panel"; export interface AuthScreenProps { /** 自定义背景(默认紫粉渐变)。 */ diff --git a/src/components/auth/auth-social-button.module.css b/src/app/auth/components/auth-social-button.module.css similarity index 100% rename from src/components/auth/auth-social-button.module.css rename to src/app/auth/components/auth-social-button.module.css diff --git a/src/components/auth/auth-social-button.tsx b/src/app/auth/components/auth-social-button.tsx similarity index 100% rename from src/components/auth/auth-social-button.tsx rename to src/app/auth/components/auth-social-button.tsx diff --git a/src/components/auth/auth-social-buttons.module.css b/src/app/auth/components/auth-social-buttons.module.css similarity index 100% rename from src/components/auth/auth-social-buttons.module.css rename to src/app/auth/components/auth-social-buttons.module.css diff --git a/src/components/auth/auth-social-buttons.tsx b/src/app/auth/components/auth-social-buttons.tsx similarity index 100% rename from src/components/auth/auth-social-buttons.tsx rename to src/app/auth/components/auth-social-buttons.tsx diff --git a/src/components/auth/auth-text-field.module.css b/src/app/auth/components/auth-text-field.module.css similarity index 100% rename from src/components/auth/auth-text-field.module.css rename to src/app/auth/components/auth-text-field.module.css diff --git a/src/components/auth/auth-text-field.tsx b/src/app/auth/components/auth-text-field.tsx similarity index 100% rename from src/components/auth/auth-text-field.tsx rename to src/app/auth/components/auth-text-field.tsx diff --git a/src/components/auth/auth-validators.ts b/src/app/auth/components/auth-validators.ts similarity index 100% rename from src/components/auth/auth-validators.ts rename to src/app/auth/components/auth-validators.ts diff --git a/src/components/auth/email-form.module.css b/src/app/auth/components/email-form.module.css similarity index 100% rename from src/components/auth/email-form.module.css rename to src/app/auth/components/email-form.module.css diff --git a/src/components/auth/email-login-form.tsx b/src/app/auth/components/email-login-form.tsx similarity index 98% rename from src/components/auth/email-login-form.tsx rename to src/app/auth/components/email-login-form.tsx index 00c72724..a18d0e3f 100644 --- a/src/components/auth/email-login-form.tsx +++ b/src/app/auth/components/email-login-form.tsx @@ -10,7 +10,7 @@ import { useAuthDispatch } from "@/contexts/auth/auth-context"; import { validateEmail, validatePassword, -} from "@/components/auth/auth-validators"; +} from "@/app/auth/components/auth-validators"; import { AuthTextField } from "./auth-text-field"; import { AuthPrimaryButton } from "./auth-primary-button"; diff --git a/src/components/auth/email-register-form.tsx b/src/app/auth/components/email-register-form.tsx similarity index 98% rename from src/components/auth/email-register-form.tsx rename to src/app/auth/components/email-register-form.tsx index bf35c215..bdecf428 100644 --- a/src/components/auth/email-register-form.tsx +++ b/src/app/auth/components/email-register-form.tsx @@ -12,7 +12,7 @@ import { validateEmail, validatePassword, validateUsername, -} from "@/components/auth/auth-validators"; +} from "@/app/auth/components/auth-validators"; import { AuthTextField } from "./auth-text-field"; import { AuthPrimaryButton } from "./auth-primary-button"; diff --git a/src/components/auth/google-sign-in-button.module.css b/src/app/auth/components/google-sign-in-button.module.css similarity index 100% rename from src/components/auth/google-sign-in-button.module.css rename to src/app/auth/components/google-sign-in-button.module.css diff --git a/src/components/auth/google-sign-in-button.tsx b/src/app/auth/components/google-sign-in-button.tsx similarity index 100% rename from src/components/auth/google-sign-in-button.tsx rename to src/app/auth/components/google-sign-in-button.tsx diff --git a/src/app/auth/page.tsx b/src/app/auth/page.tsx index aef06df1..58603a6e 100644 --- a/src/app/auth/page.tsx +++ b/src/app/auth/page.tsx @@ -1,6 +1,6 @@ "use client"; -import { AuthScreen } from "@/components/auth/auth-screen"; +import { AuthScreen } from "@/app/auth/components/auth-screen"; export default function AuthPage() { return ; diff --git a/src/components/chat/chat-screen.module.css b/src/app/chat/components/chat-screen.module.css similarity index 100% rename from src/components/chat/chat-screen.module.css rename to src/app/chat/components/chat-screen.module.css diff --git a/src/components/chat/chat-screen.tsx b/src/app/chat/components/chat-screen.tsx similarity index 98% rename from src/components/chat/chat-screen.tsx rename to src/app/chat/components/chat-screen.tsx index 28e200a7..33958275 100644 --- a/src/components/chat/chat-screen.tsx +++ b/src/app/chat/components/chat-screen.tsx @@ -2,8 +2,8 @@ import { type FormEvent, useEffect, useRef, useState } from "react"; -import { MobileShell } from "@/components/core/mobile-shell"; -import { Dialog } from "@/components/core/dialog"; +import { MobileShell } from "@/app/_components/core/mobile-shell"; +import { Dialog } from "@/app/_components/core/dialog"; import { useChatDispatch, useChatState } from "@/contexts/chat/chat-context"; import { GuestChatQuota } from "@/contexts/chat/chat-types"; import type { UiMessage } from "@/models/chat/ui-message"; diff --git a/src/app/chat/page.tsx b/src/app/chat/page.tsx index df45c745..88b704c5 100644 --- a/src/app/chat/page.tsx +++ b/src/app/chat/page.tsx @@ -1,6 +1,6 @@ "use client"; -import { ChatScreen } from "@/components/chat/chat-screen"; +import { ChatScreen } from "@/app/chat/components/chat-screen"; export default function ChatPage() { return ; diff --git a/src/components/sidebar/sidebar-screen.module.css b/src/app/sidebar/components/sidebar-screen.module.css similarity index 100% rename from src/components/sidebar/sidebar-screen.module.css rename to src/app/sidebar/components/sidebar-screen.module.css diff --git a/src/components/sidebar/sidebar-screen.tsx b/src/app/sidebar/components/sidebar-screen.tsx similarity index 98% rename from src/components/sidebar/sidebar-screen.tsx rename to src/app/sidebar/components/sidebar-screen.tsx index c42ad89b..b9f8b941 100644 --- a/src/components/sidebar/sidebar-screen.tsx +++ b/src/app/sidebar/components/sidebar-screen.tsx @@ -3,7 +3,7 @@ import { useEffect } from "react"; import Link from "next/link"; -import { MobileShell } from "@/components/core/mobile-shell"; +import { MobileShell } from "@/app/_components/core/mobile-shell"; import { useUserDispatch, useUserState } from "@/contexts/user/user-context"; import styles from "./sidebar-screen.module.css"; diff --git a/src/app/sidebar/page.tsx b/src/app/sidebar/page.tsx index 69840d94..bf208d65 100644 --- a/src/app/sidebar/page.tsx +++ b/src/app/sidebar/page.tsx @@ -1,6 +1,6 @@ "use client"; -import { SidebarScreen } from "@/components/sidebar/sidebar-screen"; +import { SidebarScreen } from "@/app/sidebar/components/sidebar-screen"; export default function SidebarPage() { return ; diff --git a/src/components/splash/splash-background.module.css b/src/app/splash/components/splash-background.module.css similarity index 100% rename from src/components/splash/splash-background.module.css rename to src/app/splash/components/splash-background.module.css diff --git a/src/components/splash/splash-background.tsx b/src/app/splash/components/splash-background.tsx similarity index 100% rename from src/components/splash/splash-background.tsx rename to src/app/splash/components/splash-background.tsx diff --git a/src/components/splash/splash-button.module.css b/src/app/splash/components/splash-button.module.css similarity index 100% rename from src/components/splash/splash-button.module.css rename to src/app/splash/components/splash-button.module.css diff --git a/src/components/splash/splash-button.tsx b/src/app/splash/components/splash-button.tsx similarity index 81% rename from src/components/splash/splash-button.tsx rename to src/app/splash/components/splash-button.tsx index 9fcf4647..ef3e9043 100644 --- a/src/components/splash/splash-button.tsx +++ b/src/app/splash/components/splash-button.tsx @@ -6,9 +6,9 @@ */ import { useAuthState } from "@/contexts/auth/auth-context"; -import { AuthSocialButtons } from "@/components/auth/auth-social-buttons"; -import { AuthPrimaryButton } from "@/components/auth/auth-primary-button"; -import { AuthDivider } from "@/components/auth/auth-divider"; +import { AuthSocialButtons } from "@/app/auth/components/auth-social-buttons"; +import { AuthPrimaryButton } from "@/app/auth/components/auth-primary-button"; +import { AuthDivider } from "@/app/auth/components/auth-divider"; import { useAuthDispatch } from "@/contexts/auth/auth-context"; import styles from "./splash-button.module.css"; diff --git a/src/components/splash/splash-content.module.css b/src/app/splash/components/splash-content.module.css similarity index 100% rename from src/components/splash/splash-content.module.css rename to src/app/splash/components/splash-content.module.css diff --git a/src/components/splash/splash-content.tsx b/src/app/splash/components/splash-content.tsx similarity index 100% rename from src/components/splash/splash-content.tsx rename to src/app/splash/components/splash-content.tsx diff --git a/src/components/splash/splash-loading.tsx b/src/app/splash/components/splash-loading.tsx similarity index 79% rename from src/components/splash/splash-loading.tsx rename to src/app/splash/components/splash-loading.tsx index d74a353b..473ecec2 100644 --- a/src/components/splash/splash-loading.tsx +++ b/src/app/splash/components/splash-loading.tsx @@ -6,7 +6,7 @@ * * 包装 ``,splash 阶段可能用于等待 auth 检查。 */ -import { LoadingIndicator } from "@/components/core/loading-indicator"; +import { LoadingIndicator } from "@/app/_components/core/loading-indicator"; export function SplashLoading() { return ; diff --git a/src/components/splash/splash-logo.module.css b/src/app/splash/components/splash-logo.module.css similarity index 100% rename from src/components/splash/splash-logo.module.css rename to src/app/splash/components/splash-logo.module.css diff --git a/src/components/splash/splash-logo.tsx b/src/app/splash/components/splash-logo.tsx similarity index 100% rename from src/components/splash/splash-logo.tsx rename to src/app/splash/components/splash-logo.tsx diff --git a/src/components/splash/splash-progress.module.css b/src/app/splash/components/splash-progress.module.css similarity index 100% rename from src/components/splash/splash-progress.module.css rename to src/app/splash/components/splash-progress.module.css diff --git a/src/components/splash/splash-progress.tsx b/src/app/splash/components/splash-progress.tsx similarity index 100% rename from src/components/splash/splash-progress.tsx rename to src/app/splash/components/splash-progress.tsx diff --git a/src/components/splash/splash-screen.module.css b/src/app/splash/components/splash-screen.module.css similarity index 100% rename from src/components/splash/splash-screen.module.css rename to src/app/splash/components/splash-screen.module.css diff --git a/src/components/splash/splash-screen.tsx b/src/app/splash/components/splash-screen.tsx similarity index 86% rename from src/components/splash/splash-screen.tsx rename to src/app/splash/components/splash-screen.tsx index 5a44d742..d6d65f59 100644 --- a/src/components/splash/splash-screen.tsx +++ b/src/app/splash/components/splash-screen.tsx @@ -1,13 +1,5 @@ "use client"; -/** - * Splash 屏幕 - * - * 原始 Dart: lib/ui/splash/splash_screen.dart - * - * 行为: - * - 渐变背景 + 品牌区 + 内容文案 + Skip/Facebook 按钮 + 底部辅助信息 - * - 已登录用户:自动跳 /chat(由父级处理) - */ + import { useRouter } from "next/navigation"; import { useEffect, useRef } from "react"; @@ -16,7 +8,7 @@ import { useChatDispatch } from "@/contexts/chat/chat-context"; import { useUserDispatch } from "@/contexts/user/user-context"; import { useAuthGate } from "@/lib/auth/use-auth-gate"; import { ROUTES } from "@/lib/routes"; -import { MobileShell } from "@/components/core/mobile-shell"; +import { MobileShell } from "@/app/_components/core/mobile-shell"; import { SplashBackground } from "./splash-background"; import { SplashLogo } from "./splash-logo"; diff --git a/src/app/splash/page.tsx b/src/app/splash/page.tsx index afea87ae..34204d5a 100644 --- a/src/app/splash/page.tsx +++ b/src/app/splash/page.tsx @@ -1,6 +1,6 @@ "use client"; -import { SplashScreen } from "@/components/splash/splash-screen"; +import { SplashScreen } from "@/app/splash/components/splash-screen"; export default function SplashPage() { return ;