Refactor: Remove original Dart references from comments across multiple files
- Updated comments in various components, schemas, and repositories to remove references to original Dart files. - Ensured consistency in documentation while maintaining the context of the code.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* 底部弹层样式
|
||||
*
|
||||
* 原始 Dart: showModalBottomSheet(透明背景,底部白卡 + 顶部圆角 radius28)
|
||||
*
|
||||
*/
|
||||
.scrim {
|
||||
position: fixed;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* 通用底部弹层(Bottom Sheet)
|
||||
*
|
||||
* 原始 Dart: 散落在各处的 `showModalBottomSheet`(auth_other_options_dialog 等)
|
||||
*
|
||||
*
|
||||
* 设计目标:
|
||||
* - portal 渲染到 body
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* 通用 Dialog 基础组件(headless + 简单样式)
|
||||
*
|
||||
* 原始 Dart: 散落在各处的 `showDialog` + `Dialog` widget(quota_dialog, pwa_install_dialog,
|
||||
*
|
||||
* username_dialog, pronouns_dialog, subscription_dialog, environment_dialog, auth_other_options_dialog,
|
||||
* facebook_login_dialog, external_browser_dialog)。
|
||||
*
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* 通用加载指示器
|
||||
*
|
||||
* 原始 Dart: lib/ui/core/loading_indicator.dart
|
||||
*
|
||||
*
|
||||
* 行为对齐 Flutter `CircularProgressIndicator`:
|
||||
* - `size`:圆圈直径(默认 32)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* 500px 移动端 Shell(Server Component)
|
||||
*
|
||||
* 原始 Dart: 每个屏幕的 `Scaffold → SafeArea → Center → ConstrainedBox(maxWidth: 500)` 模式
|
||||
*
|
||||
* (`Breakpoints.mobileMaxWidth = 500.0`)。
|
||||
*
|
||||
* 集中封装,调用方仅需 `<MobileShell>{...}</MobileShell>` 即可获得统一的移动端宽度约束。
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* 设置项列表 Section
|
||||
*
|
||||
* 原始 Dart: lib/ui/core/settings_section.dart
|
||||
*
|
||||
*
|
||||
* 渲染一组 SettingItem:图标 + 标题 + 副标题/值 + 右侧 chevron + 可选 divider。
|
||||
*/
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Auth 屏
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/auth_screen.dart
|
||||
*
|
||||
*/
|
||||
import { useEffect, useSyncExternalStore } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* "OR" 分隔符
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/widgets/auth_divider.dart
|
||||
*
|
||||
*/
|
||||
import styles from "./auth-divider.module.css";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 原始 Dart: lib/ui/auth/widgets/auth_email_panel.dart
|
||||
/*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - 顶部:login 模式有 logo + 24px spacer;register 模式两个 24px spacer
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Email 面板(login/register 内部切换)
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/widgets/auth_email_panel.dart
|
||||
*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - login 模式:顶部 24px spacer + logo(120h) + 24px gap
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 原始 Dart: lib/ui/auth/widgets/auth_error_message.dart
|
||||
/*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - 细小红字,无背景,无圆角,无边框
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* 错误消息展示
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/widgets/auth_error_message.dart
|
||||
*
|
||||
*/
|
||||
import styles from "./auth-error-message.module.css";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 原始 Dart: lib/ui/auth/widgets/auth_facebook_panel.dart
|
||||
/*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - Spacer → logo(120h)→ Spacer → Facebook 主按钮 → 链接 → Spacer → 法律
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Facebook 面板(默认登录面板)
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/widgets/auth_facebook_panel.dart
|
||||
*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - Spacer → logo(120h)→ Spacer → Facebook 主按钮 → 链接 → Spacer → 法律
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 原始 Dart: lib/ui/auth/widgets/auth_legal_text.dart
|
||||
/*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - 行:16px 白色圆形复选框 + 12px 富文本
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* 法律声明(Terms / Privacy + 复选框)
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/widgets/auth_legal_text.dart
|
||||
*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - 行:16px 白色圆形复选框 + 12px 富文本
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 原始 Dart: lib/ui/auth/widgets/auth_other_options_dialog.dart
|
||||
/*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - drag handle 40×4 灰胶囊
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 原始 Dart: lib/ui/auth/widgets/auth_panel.dart
|
||||
/*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - panelShell 包裹整个面板(position: relative)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 原始 Dart: lib/ui/auth/widgets/auth_primary_button.dart
|
||||
/*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - 46px 高
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* 认证主按钮(粉渐变,46px)
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/widgets/auth_primary_button.dart
|
||||
*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - 46px 高
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 原始 Dart: lib/ui/auth/widgets/auth_social_button.dart
|
||||
/*
|
||||
*
|
||||
* 视觉规格(与 Dart 弹层按钮对齐):
|
||||
* - 40px 高
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* 社交/选项登录按钮(用于底部弹层)
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/widgets/auth_social_button.dart
|
||||
*
|
||||
*
|
||||
* 视觉规格(与 Dart 弹层按钮对齐):
|
||||
* - 40px 高
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* 社交登录按钮组合
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/widgets/auth_social_buttons.dart
|
||||
*
|
||||
*
|
||||
* 包含 Facebook / Google / Apple 三个按钮的竖排列表。
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 原始 Dart: lib/ui/auth/widgets/auth_text_field.dart
|
||||
/*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - 46px 高
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* 通用文本输入框
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/widgets/auth_text_field.dart
|
||||
*
|
||||
*/
|
||||
import {
|
||||
type ChangeEvent,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* 认证表单校验
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/widgets/auth_validators.dart
|
||||
*
|
||||
*
|
||||
* 业务行为:
|
||||
* - validateEmail:使用 Zod (项目已有依赖) 校验邮箱格式
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 邮箱登录/注册表单样式
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/widgets/email_login_form.dart
|
||||
*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - 字段间距 12px(Dart AppSpacing.md)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* 邮箱注册表单
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/widgets/email_register_form.dart
|
||||
*
|
||||
*
|
||||
* 视觉规格(与 Dart 对齐):
|
||||
* - 4 字段:username / email / password / confirmPassword(顺序与 Dart 一致)
|
||||
|
||||
@@ -116,7 +116,6 @@ export function ChatScreen() {
|
||||
return (
|
||||
<MobileShell>
|
||||
<div className={styles.shell}>
|
||||
{/* 背景图(与原 Dart MobileLayout 一致) */}
|
||||
<div className={styles.background}>
|
||||
<Image
|
||||
src="/images/chat/bg-chatpage.png"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* AiDisclosureBanner AI 声明横幅
|
||||
*
|
||||
* 原始 Dart: lib/ui/chat/widgets/ai_disclosure_banner.dart(17 行)
|
||||
*
|
||||
*
|
||||
* 视觉:居中灰色小字 "All content is generated by AI"
|
||||
* 用途:位于聊天区顶部,声明 AI 生成内容(合规 / 法律要求)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* BrowserHintOverlay 浏览器提示
|
||||
*
|
||||
* 原始 Dart: lib/ui/chat/widgets/browser_hint_overlay.dart(76 行)
|
||||
*
|
||||
*
|
||||
* 用途:在应用内浏览器(WebView、微信内置浏览器等)中显示提示,
|
||||
* 引导用户使用外部浏览器访问。
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* ChatInputTextField 输入框
|
||||
*
|
||||
* 原始 Dart: lib/ui/chat/widgets/chat_input_text_field.dart(75 行)
|
||||
*
|
||||
*
|
||||
* 行为:
|
||||
* - 多行输入(min 1 行 / max 5 行 ≈ max-height 120px)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* ChatSendButton 发送按钮
|
||||
*
|
||||
* 原始 Dart: lib/ui/chat/widgets/chat_send_button.dart(37 行)
|
||||
*
|
||||
*
|
||||
* 视觉:
|
||||
* - 默认:粉色背景 + 渐变边缘
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* DateHeader 日期分隔条
|
||||
*
|
||||
* 原始 Dart: lib/ui/chat/widgets/date_header.dart(26 行)
|
||||
*
|
||||
*
|
||||
* 视觉:居中灰色 chip("今天 14:32" / "昨天 09:15" / 具体日期)
|
||||
*/
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* FullscreenImageViewer 全屏图片查看器
|
||||
*
|
||||
* 原始 Dart: lib/ui/chat/widgets/fullscreen_image_viewer.dart(76 行)
|
||||
*
|
||||
*
|
||||
* 行为:
|
||||
* - 全屏黑色背景 + 图片居中(contain)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* LanguageDialog 语言切换弹窗
|
||||
*
|
||||
* 原始 Dart: lib/ui/chat/widgets/language_dialog.dart(222 行)
|
||||
*
|
||||
*
|
||||
* 简化版:单语种列表选择(保留可扩展性)
|
||||
* - 支持未来添加更多语言
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* LottieMessageBubble 动画消息气泡
|
||||
*
|
||||
* 原始 Dart: lib/ui/chat/widgets/lottie_message_bubble.dart(51 行)
|
||||
*
|
||||
*
|
||||
* 原始实现:使用 lottie SDK 渲染"打字指示器"动画
|
||||
* 本轮实现:使用 CSS keyframes 模拟(无 lottie 依赖)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* MessageBubble 消息气泡(容器)
|
||||
*
|
||||
* 原始 Dart: lib/ui/chat/widgets/message_bubble.dart(52 行)
|
||||
*
|
||||
*
|
||||
* 组成(从左到右):
|
||||
* - AI:[Avatar] [Content] [占位 spacer]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* PwaInstallDialog PWA 安装弹窗样式
|
||||
* 原始 Dart: lib/ui/chat/widgets/pwa_install_dialog.dart
|
||||
*
|
||||
* 视觉规格:白底 + 大圆角 + 渐变按钮 + 86×86 图标
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* PwaInstallDialog PWA 安装弹窗
|
||||
*
|
||||
* 原始 Dart: lib/ui/chat/widgets/pwa_install_dialog.dart(145 行)
|
||||
*
|
||||
*
|
||||
* 用途:引导用户将 Web App 安装到桌面
|
||||
* 触发:由 PwaInstallOverlay 在延迟 3.5s 后自动显示
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* TextBubble 文字气泡
|
||||
*
|
||||
* 原始 Dart: lib/ui/chat/widgets/text_bubble.dart(41 行)
|
||||
*
|
||||
*
|
||||
* 视觉差异:
|
||||
* - AI 消息:白底黑字 + 左上角尖角
|
||||
|
||||
@@ -28,7 +28,7 @@ const VIP_SUBSCRIPTION_URL = `${ROUTES.subscription}?type=vip`;
|
||||
* - member:已登录未购买 VIP
|
||||
* - vip:已登录且购买 VIP
|
||||
*
|
||||
* 原始 Dart: lib/ui/sidebar/sidebar_screen.dart + profile_view.dart
|
||||
*
|
||||
*/
|
||||
export function SidebarScreen() {
|
||||
const router = useRouter();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Splash 背景图片
|
||||
*
|
||||
* 原始 Dart: lib/ui/splash/widgets/splash_background.dart
|
||||
*
|
||||
* `SizedBox.expand(child: Assets.images.picBgHome.image(fit: BoxFit.cover))`
|
||||
* 资源: /public/images/splash/pic-bg-home.png (kebab-case 重命名后)
|
||||
* 原名: pic_bg_home.png (snake_case)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Splash 加载状态
|
||||
*
|
||||
* 原始 Dart: lib/ui/splash/widgets/splash_loading.dart
|
||||
*
|
||||
*
|
||||
* 包装 `<LoadingIndicator>`,splash 阶段可能用于等待 auth 检查。
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Splash 进度条
|
||||
*
|
||||
* 原始 Dart: lib/ui/splash/widgets/splash_progress.dart
|
||||
*
|
||||
*
|
||||
* 当前实现:简单 CSS 动画进度条,0 → 100% 1.5s。
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user