diff --git a/src/app/_components/core/settings-section.module.css b/src/app/_components/core/settings-section.module.css index 66fbde38..c16fd65d 100644 --- a/src/app/_components/core/settings-section.module.css +++ b/src/app/_components/core/settings-section.module.css @@ -6,40 +6,44 @@ .title { margin: 0; - padding: 0 var(--spacing-md); - font-size: var(--font-size-sm); - font-weight: 500; - color: var(--color-section-title); - text-transform: uppercase; - letter-spacing: 0.04em; + padding: 0 var(--spacing-xs); + font-size: var(--font-size-md); + font-weight: 600; + color: #000000; + text-transform: none; + letter-spacing: 0; } .list { margin: 0; padding: 0; list-style: none; - background: var(--color-settings-card-background); - border-radius: var(--radius-lg); + background: var(--color-settings-card-background, #ffffff); + border-radius: var(--radius-lg, 12px); overflow: hidden; } +.list > li { + background: var(--color-settings-row-background, #f5f5f5); +} + .row { display: flex; align-items: center; gap: var(--spacing-md); width: 100%; - padding: var(--spacing-md) var(--spacing-lg); + padding: var(--spacing-md); border: none; background: transparent; - color: var(--color-settings-text-primary); - font-size: var(--font-size-md); + color: #000000; + font-size: var(--font-size-lg); text-align: left; cursor: pointer; transition: background 0.15s ease; } .row:hover { - background: rgba(255, 255, 255, 0.04); + background: rgba(0, 0, 0, 0.04); } .row:focus-visible { @@ -53,7 +57,7 @@ justify-content: center; width: 24px; height: 24px; - color: var(--color-chevron-icon); + color: var(--color-chevron-icon, #000000); flex-shrink: 0; } @@ -66,9 +70,9 @@ } .rowTitle { - font-size: var(--font-size-md); - font-weight: 500; - color: var(--color-settings-text-primary); + font-size: var(--font-size-lg); + font-weight: 400; + color: #000000; } .subtitle { @@ -83,19 +87,21 @@ } .chevron { - color: var(--color-chevron-icon); + color: var(--color-chevron-icon, #000000); flex-shrink: 0; + width: 20px; + height: 20px; } .divider { - height: var(--border-light); - background: var(--color-settings-divider); - margin: 0 var(--spacing-lg); + height: 1px; + background: rgba(61, 49, 74, 0.5); + margin: 0 var(--spacing-md); } .destructive { - color: var(--color-destructive); + color: var(--color-destructive, #ff6b6b); } .destructive .rowTitle { - color: var(--color-destructive); + color: var(--color-destructive, #ff6b6b); } diff --git a/src/app/_components/core/settings-section.tsx b/src/app/_components/core/settings-section.tsx index affafa70..d8bcbc73 100644 --- a/src/app/_components/core/settings-section.tsx +++ b/src/app/_components/core/settings-section.tsx @@ -55,8 +55,8 @@ export function SettingsSection({ title, items }: SettingsSectionProps) { {item.trailing} ) : null}
-
- - ← + {/* 返回按钮:与 Flutter BackButton widget 一致 */} +
+ + + Back -

Profile

-
+
-
-
-
- {user.avatarUrl ? ( - - ) : ( - - {(user.currentUser?.username ?? "?").charAt(0).toUpperCase()} - - )} -
-
-

{user.currentUser?.username ?? "Guest"}

-

{user.currentUser?.email ?? "Sign in to get started"}

-
- {user.currentUser ? null : ( - - Sign in - - )} -
- - -
+ {/* 设置区域:与 Flutter SettingsSection 对齐 */} +
+ userDispatch({ type: "UserLogout" }), + }, + ]} + /> +
); } - -function SettingsList({ - user, - dispatch, -}: { - user: ReturnType; - dispatch: ReturnType; -}) { - const sections: Array<{ - title: string; - items: Array<{ label: string; onClick: () => void; danger?: boolean }>; - }> = [ - { - title: "Account", - items: [ - { label: "Edit username", onClick: () => {} }, - { label: "Edit pronouns", onClick: () => {} }, - { label: "Subscription", onClick: () => {} }, - ], - }, - { - title: "Data", - items: [ - { - label: "Delete chat history", - onClick: () => dispatch({ type: "UserDeleteChatHistory" }), - }, - { - label: "Delete account", - onClick: () => dispatch({ type: "UserDeleteAccount" }), - danger: true, - }, - ], - }, - { - title: "Session", - items: user.currentUser - ? [ - { - label: "Log out", - onClick: () => dispatch({ type: "UserLogout" }), - danger: true, - }, - ] - : [], - }, - ]; - - return ( -
- {sections - .filter((s) => s.items.length > 0) - .map((s) => ( -
-

{s.title}

-
    - {s.items.map((it) => ( -
  • - -
  • - ))} -
-
- ))} -
- ); -} diff --git a/src/tokens/colors.css b/src/tokens/colors.css index 6af14f1d..19c89ceb 100644 --- a/src/tokens/colors.css +++ b/src/tokens/colors.css @@ -83,4 +83,11 @@ /* 底部弹层 drag handle */ --color-auth-drag-handle: #3a3a3a; + + /* Settings section (对齐 Flutter lib/ui/core/settings_section.dart) */ + --color-settings-card-background: #ffffff; + --color-settings-row-background: #f5f5f5; + --color-settings-divider: #3d314a; + --color-chevron-icon: #000000; + --color-destructive: #ff6b6b; }