fix:折算设置
This commit is contained in:
@@ -102,8 +102,6 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
title: '邀请好友,各得奖励',
|
title: '邀请好友,各得奖励',
|
||||||
subtitle: '需登录',
|
subtitle: '需登录',
|
||||||
icon: Icons.card_giftcard_outlined,
|
icon: Icons.card_giftcard_outlined,
|
||||||
backgroundColor: const Color(0xFFF6ECD6),
|
|
||||||
iconColor: const Color(0xFFB5862A),
|
|
||||||
onTap: () => _showInviteSheet(context),
|
onTap: () => _showInviteSheet(context),
|
||||||
),
|
),
|
||||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||||
@@ -111,8 +109,6 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
title: '分享我的贵金属估值卡',
|
title: '分享我的贵金属估值卡',
|
||||||
subtitle: '免登录 · 自动打码金额',
|
subtitle: '免登录 · 自动打码金额',
|
||||||
icon: Icons.share_outlined,
|
icon: Icons.share_outlined,
|
||||||
backgroundColor: const Color(0xFFEAF1FF),
|
|
||||||
iconColor: const Color(0xFF4F7DD1),
|
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
_showShareCardSheet(context, currentUser?.nickname),
|
_showShareCardSheet(context, currentUser?.nickname),
|
||||||
),
|
),
|
||||||
@@ -129,8 +125,6 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
title: '本地导出备份',
|
title: '本地导出备份',
|
||||||
trailing: '导出',
|
trailing: '导出',
|
||||||
onTap: () => _showLocalBackupSheet(context),
|
onTap: () => _showLocalBackupSheet(context),
|
||||||
backgroundColor: const Color(0xFFF3EFE7),
|
|
||||||
iconColor: const Color(0xFF8A8780),
|
|
||||||
),
|
),
|
||||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||||
_SettingRow(
|
_SettingRow(
|
||||||
@@ -138,8 +132,6 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
title: '云备份 · 多端同步',
|
title: '云备份 · 多端同步',
|
||||||
trailing: loggedIn ? '已登录' : '登录解锁',
|
trailing: loggedIn ? '已登录' : '登录解锁',
|
||||||
onTap: () => _showCloudBackupSheet(context, loggedIn),
|
onTap: () => _showCloudBackupSheet(context, loggedIn),
|
||||||
backgroundColor: const Color(0xFFEAF2ED),
|
|
||||||
iconColor: const Color(0xFF5E8E75),
|
|
||||||
),
|
),
|
||||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||||
_SettingRow(
|
_SettingRow(
|
||||||
@@ -147,8 +139,6 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
title: '添加桌面小组件',
|
title: '添加桌面小组件',
|
||||||
trailing: '占位',
|
trailing: '占位',
|
||||||
onTap: () => _showWidgetSheet(context),
|
onTap: () => _showWidgetSheet(context),
|
||||||
backgroundColor: const Color(0xFFF6ECD6),
|
|
||||||
iconColor: const Color(0xFFB5862A),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -163,8 +153,6 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
title: '纯度系数管理',
|
title: '纯度系数管理',
|
||||||
trailing: '${settings.purityPresets.length} 项',
|
trailing: '${settings.purityPresets.length} 项',
|
||||||
onTap: () => _showPuritySheet(context, settings),
|
onTap: () => _showPuritySheet(context, settings),
|
||||||
backgroundColor: const Color(0xFFF4EAF8),
|
|
||||||
iconColor: const Color(0xFF8A5CBF),
|
|
||||||
),
|
),
|
||||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||||
_SettingRow(
|
_SettingRow(
|
||||||
@@ -173,8 +161,6 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
trailing:
|
trailing:
|
||||||
'金 ${(settings.recycleDiscounts.values.first * 100).toStringAsFixed(0)}%',
|
'金 ${(settings.recycleDiscounts.values.first * 100).toStringAsFixed(0)}%',
|
||||||
onTap: () => _showRecycleSheet(context, settings),
|
onTap: () => _showRecycleSheet(context, settings),
|
||||||
backgroundColor: const Color(0xFFF8EFE0),
|
|
||||||
iconColor: const Color(0xFFB07A32),
|
|
||||||
),
|
),
|
||||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||||
_SettingRow(
|
_SettingRow(
|
||||||
@@ -192,8 +178,6 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
.setPriceColorMode(nextMode);
|
.setPriceColorMode(nextMode);
|
||||||
_toast(context, '已切换为「${nextMode.label}」');
|
_toast(context, '已切换为「${nextMode.label}」');
|
||||||
},
|
},
|
||||||
backgroundColor: const Color(0xFFE9F3F1),
|
|
||||||
iconColor: const Color(0xFF4E8B7B),
|
|
||||||
),
|
),
|
||||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||||
_SettingRow(
|
_SettingRow(
|
||||||
@@ -201,8 +185,6 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
title: '显示币种',
|
title: '显示币种',
|
||||||
trailing: '¥ CNY',
|
trailing: '¥ CNY',
|
||||||
onTap: () => _toast(context, '当前仅支持 ¥ CNY'),
|
onTap: () => _toast(context, '当前仅支持 ¥ CNY'),
|
||||||
backgroundColor: const Color(0xFFF1EFE9),
|
|
||||||
iconColor: const Color(0xFF7F7A73),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -217,8 +199,6 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
title: '设置',
|
title: '设置',
|
||||||
trailing: null,
|
trailing: null,
|
||||||
onTap: () => context.push(AppRoutes.settings),
|
onTap: () => context.push(AppRoutes.settings),
|
||||||
backgroundColor: const Color(0xFFF1EFE9),
|
|
||||||
iconColor: const Color(0xFF7F7A73),
|
|
||||||
),
|
),
|
||||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||||
_SettingRow(
|
_SettingRow(
|
||||||
@@ -231,8 +211,6 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
mode: LaunchMode.inAppBrowserView,
|
mode: LaunchMode.inAppBrowserView,
|
||||||
),
|
),
|
||||||
backgroundColor: const Color(0xFFF1EFE9),
|
|
||||||
iconColor: const Color(0xFF7F7A73),
|
|
||||||
),
|
),
|
||||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||||
_SettingRow(
|
_SettingRow(
|
||||||
@@ -240,8 +218,6 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
title: '免责声明 · 数据来源',
|
title: '免责声明 · 数据来源',
|
||||||
trailing: null,
|
trailing: null,
|
||||||
onTap: () => _showDisclaimer(context),
|
onTap: () => _showDisclaimer(context),
|
||||||
backgroundColor: const Color(0xFFF7F0E2),
|
|
||||||
iconColor: const Color(0xFFB07A32),
|
|
||||||
),
|
),
|
||||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||||
_SettingRow(
|
_SettingRow(
|
||||||
@@ -249,8 +225,6 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
title: '意见反馈 · 关于金值',
|
title: '意见反馈 · 关于金值',
|
||||||
trailing: null,
|
trailing: null,
|
||||||
onTap: () => _showAbout(context),
|
onTap: () => _showAbout(context),
|
||||||
backgroundColor: const Color(0xFFEAF1FF),
|
|
||||||
iconColor: const Color(0xFF4F7DD1),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -332,16 +306,12 @@ class _MenuRow extends StatelessWidget {
|
|||||||
required this.title,
|
required this.title,
|
||||||
required this.subtitle,
|
required this.subtitle,
|
||||||
required this.icon,
|
required this.icon,
|
||||||
required this.backgroundColor,
|
|
||||||
required this.iconColor,
|
|
||||||
required this.onTap,
|
required this.onTap,
|
||||||
});
|
});
|
||||||
|
|
||||||
final String title;
|
final String title;
|
||||||
final String subtitle;
|
final String subtitle;
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
final Color backgroundColor;
|
|
||||||
final Color iconColor;
|
|
||||||
final VoidCallback onTap;
|
final VoidCallback onTap;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -353,15 +323,7 @@ class _MenuRow extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Icon(icon, size: 20, color: const Color(0xFF8A8780)),
|
||||||
width: 34,
|
|
||||||
height: 34,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: backgroundColor,
|
|
||||||
borderRadius: BorderRadius.circular(10),
|
|
||||||
),
|
|
||||||
child: Icon(icon, size: 18, color: iconColor),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -395,8 +357,6 @@ class _SettingRow extends StatelessWidget {
|
|||||||
required this.icon,
|
required this.icon,
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.onTap,
|
required this.onTap,
|
||||||
required this.backgroundColor,
|
|
||||||
required this.iconColor,
|
|
||||||
this.trailing,
|
this.trailing,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -404,8 +364,6 @@ class _SettingRow extends StatelessWidget {
|
|||||||
final String title;
|
final String title;
|
||||||
final String? trailing;
|
final String? trailing;
|
||||||
final VoidCallback onTap;
|
final VoidCallback onTap;
|
||||||
final Color backgroundColor;
|
|
||||||
final Color iconColor;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -416,15 +374,7 @@ class _SettingRow extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Icon(icon, size: 20, color: const Color(0xFF8A8780)),
|
||||||
width: 34,
|
|
||||||
height: 34,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: backgroundColor,
|
|
||||||
borderRadius: BorderRadius.circular(10),
|
|
||||||
),
|
|
||||||
child: Icon(icon, size: 18, color: iconColor),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|||||||
@@ -337,13 +337,15 @@ class SettingsPage extends HookConsumerWidget {
|
|||||||
_ChoiceButton(
|
_ChoiceButton(
|
||||||
label: PriceColorMode.redUpGreenDown.label,
|
label: PriceColorMode.redUpGreenDown.label,
|
||||||
selected: current == PriceColorMode.redUpGreenDown,
|
selected: current == PriceColorMode.redUpGreenDown,
|
||||||
onTap: () => Navigator.of(ctx).pop(PriceColorMode.redUpGreenDown),
|
onTap: () =>
|
||||||
|
Navigator.of(ctx).pop(PriceColorMode.redUpGreenDown),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
_ChoiceButton(
|
_ChoiceButton(
|
||||||
label: PriceColorMode.greenUpRedDown.label,
|
label: PriceColorMode.greenUpRedDown.label,
|
||||||
selected: current == PriceColorMode.greenUpRedDown,
|
selected: current == PriceColorMode.greenUpRedDown,
|
||||||
onTap: () => Navigator.of(ctx).pop(PriceColorMode.greenUpRedDown),
|
onTap: () =>
|
||||||
|
Navigator.of(ctx).pop(PriceColorMode.greenUpRedDown),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -351,9 +353,9 @@ class SettingsPage extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (selected != null && context.mounted) {
|
if (selected != null && context.mounted) {
|
||||||
ref.read(profileSettingsControllerProvider.notifier).setPriceColorMode(
|
ref
|
||||||
selected,
|
.read(profileSettingsControllerProvider.notifier)
|
||||||
);
|
.setPriceColorMode(selected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -779,7 +781,7 @@ class _ThemeSegmentCard extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final cs = ShadTheme.of(context).colorScheme;
|
final cs = ShadTheme.of(context).colorScheme;
|
||||||
final options = <(ThemeMode, String, IconData)>[
|
final options = <(ThemeMode, String, IconData)>[
|
||||||
(ThemeMode.system, '跟随系统', Icons.brightness_auto_outlined),
|
(ThemeMode.system, '系统主题', Icons.brightness_auto_outlined),
|
||||||
(ThemeMode.light, '浅色', Icons.light_mode_outlined),
|
(ThemeMode.light, '浅色', Icons.light_mode_outlined),
|
||||||
(ThemeMode.dark, '深色', Icons.dark_mode_outlined),
|
(ThemeMode.dark, '深色', Icons.dark_mode_outlined),
|
||||||
];
|
];
|
||||||
@@ -1081,9 +1083,7 @@ class _ChoiceButton extends StatelessWidget {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: selected ? cs.primary : cs.secondary,
|
color: selected ? cs.primary : cs.secondary,
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
border: Border.all(
|
border: Border.all(color: selected ? cs.primary : cs.border),
|
||||||
color: selected ? cs.primary : cs.border,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
label,
|
label,
|
||||||
@@ -1182,10 +1182,7 @@ class _ValueRow extends StatelessWidget {
|
|||||||
style: TextStyle(fontSize: 15, color: cs.foreground),
|
style: TextStyle(fontSize: 15, color: cs.foreground),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(value, style: TextStyle(fontSize: 13, color: cs.mutedForeground)),
|
||||||
value,
|
|
||||||
style: TextStyle(fontSize: 13, color: cs.mutedForeground),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user