refactor(frontend): 优化参与记录和贡献值页面的文案显示
参与记录页面(planting_records_page.dart): - 将状态 "已开始挖矿" 改为 "已开始" - 将 "xx棵" 改为 "xx个" - 将 "单棵算力" 改为 "单个算力" 贡献值页面(contribution_page.dart): - 将贡献值明细中的 "本人种植" 改为 "本人" - 移除 "已解锁上级" 和 "已解锁下级" 后的 "级" 字后缀 实体类(planting_record.dart): - 同步更新状态显示文案 "已开始挖矿" → "已开始" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d957e5a841
commit
f7cfb4ef8c
|
|
@ -56,7 +56,7 @@ class PlantingRecord extends Equatable {
|
||||||
case PlantingStatus.fundAllocated:
|
case PlantingStatus.fundAllocated:
|
||||||
return '资金已分配';
|
return '资金已分配';
|
||||||
case PlantingStatus.miningEnabled:
|
case PlantingStatus.miningEnabled:
|
||||||
return '已开始挖矿';
|
return '已开始';
|
||||||
case PlantingStatus.cancelled:
|
case PlantingStatus.cancelled:
|
||||||
return '已取消';
|
return '已取消';
|
||||||
case PlantingStatus.expired:
|
case PlantingStatus.expired:
|
||||||
|
|
|
||||||
|
|
@ -415,7 +415,7 @@ class ContributionPage extends ConsumerWidget {
|
||||||
_buildDetailSummaryRow(
|
_buildDetailSummaryRow(
|
||||||
icon: Icons.eco_outlined,
|
icon: Icons.eco_outlined,
|
||||||
iconColor: _orange,
|
iconColor: _orange,
|
||||||
title: '本人种植',
|
title: '本人',
|
||||||
subtitle: '个人参与产生的贡献值',
|
subtitle: '个人参与产生的贡献值',
|
||||||
amount: contribution?.personalContribution ?? '0',
|
amount: contribution?.personalContribution ?? '0',
|
||||||
hideAmounts: hideAmounts,
|
hideAmounts: hideAmounts,
|
||||||
|
|
@ -467,7 +467,7 @@ class ContributionPage extends ConsumerWidget {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: const [
|
children: const [
|
||||||
ShimmerText(
|
ShimmerText(
|
||||||
placeholder: '本人种植',
|
placeholder: '本人',
|
||||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: _darkText),
|
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: _darkText),
|
||||||
),
|
),
|
||||||
SizedBox(height: 2),
|
SizedBox(height: 2),
|
||||||
|
|
@ -558,7 +558,7 @@ class ContributionPage extends ConsumerWidget {
|
||||||
_buildTeamStatItem(
|
_buildTeamStatItem(
|
||||||
'已解锁上级',
|
'已解锁上级',
|
||||||
'15',
|
'15',
|
||||||
'级',
|
'',
|
||||||
isLoading,
|
isLoading,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -570,7 +570,7 @@ class ContributionPage extends ConsumerWidget {
|
||||||
_buildTeamStatItem(
|
_buildTeamStatItem(
|
||||||
'已解锁下级',
|
'已解锁下级',
|
||||||
contribution?.unlockedLevelDepth.toString(),
|
contribution?.unlockedLevelDepth.toString(),
|
||||||
'级',
|
'',
|
||||||
isLoading,
|
isLoading,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
|
|
|
||||||
|
|
@ -341,13 +341,13 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
|
|
||||||
// 第二行:参与数量 + 单棵算力 + 总算力
|
// 第二行:参与数量 + 单个算力 + 总算力
|
||||||
Wrap(
|
Wrap(
|
||||||
spacing: 12,
|
spacing: 12,
|
||||||
runSpacing: 8,
|
runSpacing: 8,
|
||||||
children: [
|
children: [
|
||||||
_buildInfoItem('参与数量', '${record.treeCount}棵'),
|
_buildInfoItem('参与数量', '${record.treeCount}个'),
|
||||||
_buildInfoItem('单棵算力', formatAmount(record.contributionPerTree)),
|
_buildInfoItem('单个算力', formatAmount(record.contributionPerTree)),
|
||||||
_buildInfoItem('总算力', formatAmount(record.totalContribution), isHighlight: true),
|
_buildInfoItem('总算力', formatAmount(record.totalContribution), isHighlight: true),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -404,7 +404,7 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
|
||||||
borderRadius: BorderRadius.circular(4),
|
borderRadius: BorderRadius.circular(4),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
status.toString().split('.').last == 'miningEnabled' ? '已开始挖矿' : _getStatusText(status),
|
status.toString().split('.').last == 'miningEnabled' ? '已开始' : _getStatusText(status),
|
||||||
style: TextStyle(fontSize: 11, fontWeight: FontWeight.w500, color: textColor),
|
style: TextStyle(fontSize: 11, fontWeight: FontWeight.w500, color: textColor),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -419,7 +419,7 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
|
||||||
case PlantingStatus.fundAllocated:
|
case PlantingStatus.fundAllocated:
|
||||||
return '资金已分配';
|
return '资金已分配';
|
||||||
case PlantingStatus.miningEnabled:
|
case PlantingStatus.miningEnabled:
|
||||||
return '已开始挖矿';
|
return '已开始';
|
||||||
case PlantingStatus.cancelled:
|
case PlantingStatus.cancelled:
|
||||||
return '已取消';
|
return '已取消';
|
||||||
case PlantingStatus.expired:
|
case PlantingStatus.expired:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue