feat(mine): 我的 Tab UI 重设计(#39~#41)
- ProfileHeroCard:72pt 渐变头像(8色 uid%8 主题)、@J{uid} handle、bio 简介、掩码手机号
- AppBar:compact,右侧 QR 图标 + 编辑铅笔
- 彩色图标行(_IconBox 36pt 圆角)+ 4 卡片组对齐 iOS SettingsView
- 账户:我的钱包 / 账户安全
- 工具:收藏 / 最近呼叫 / 链接设备 / 聊天文件夹
- 偏好设置:通知和声音 / 隐私设置 / 黑名单 / 语言 / 主题
- 关于:用户协议 / 隐私政策 / 版本号
- SettingsState 增加 bio 字段(#41),loadProfile 同步赋值
- Doc/mine_tab_architecture.md 补充 UI 重设计章节(§7)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ class SettingsState {
|
||||
final String? avatarUrl;
|
||||
final String maskedContact;
|
||||
final int uid;
|
||||
final String bio;
|
||||
final bool isLoading;
|
||||
final bool isLoggingOut;
|
||||
final String? error;
|
||||
@@ -21,6 +22,7 @@ class SettingsState {
|
||||
this.avatarUrl,
|
||||
this.maskedContact = '',
|
||||
this.uid = 0,
|
||||
this.bio = '',
|
||||
this.isLoading = false,
|
||||
this.isLoggingOut = false,
|
||||
this.error,
|
||||
@@ -32,6 +34,7 @@ class SettingsState {
|
||||
bool clearAvatarUrl = false,
|
||||
String? maskedContact,
|
||||
int? uid,
|
||||
String? bio,
|
||||
bool? isLoading,
|
||||
bool? isLoggingOut,
|
||||
String? error,
|
||||
@@ -42,6 +45,7 @@ class SettingsState {
|
||||
avatarUrl: clearAvatarUrl ? null : (avatarUrl ?? this.avatarUrl),
|
||||
maskedContact: maskedContact ?? this.maskedContact,
|
||||
uid: uid ?? this.uid,
|
||||
bio: bio ?? this.bio,
|
||||
isLoading: isLoading ?? this.isLoading,
|
||||
isLoggingOut: isLoggingOut ?? this.isLoggingOut,
|
||||
error: clearError ? null : (error ?? this.error),
|
||||
@@ -84,6 +88,7 @@ class SettingsViewModel extends Notifier<SettingsState> {
|
||||
avatarUrl: profile.profilePic.isEmpty ? null : profile.profilePic,
|
||||
maskedContact: _maskContact(profile.contact, profile.countryCode),
|
||||
uid: profile.uid,
|
||||
bio: profile.bio,
|
||||
);
|
||||
} catch (e) {
|
||||
state = state.copyWith(isLoading: false, error: e.toString());
|
||||
|
||||
Reference in New Issue
Block a user