fix(mining-admin): correct ContributionSyncStatus property names

Property names should match what's used in the UI component:
- miningNetworkTotal (was miningTotal)
- networkTotalContribution (was contributionTotal)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-16 07:41:59 -08:00
parent 2534068f70
commit 854bb7a0ac
3 changed files with 20 additions and 149 deletions

View File

@ -3,8 +3,8 @@ import type { SystemConfig } from '@/types/config';
export interface ContributionSyncStatus {
isSynced: boolean;
miningTotal: string;
contributionTotal: string;
miningNetworkTotal: string;
networkTotalContribution: string;
}
export interface MiningStatus {

View File

@ -89,96 +89,15 @@ class AssetPage extends ConsumerWidget {
return Container(
color: _bgGray.withOpacity(0.9),
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
child: Row(
children: [
//
Container(
width: 36,
height: 36,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(18),
border: Border.all(color: _green, width: 2),
),
child: ClipRRect(
borderRadius: BorderRadius.circular(16),
child: Center(
child: Text(
user.nickname?.substring(0, 1) ?? 'U',
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: _darkText,
),
),
),
),
child: const Center(
child: Text(
'我的资产',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Color(0xFF111827),
),
const Spacer(),
//
const Text(
'我的资产',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Color(0xFF111827),
),
),
const Spacer(),
//
Container(
width: 36,
height: 36,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(18),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 4,
offset: const Offset(0, 2),
),
],
),
child: const Icon(Icons.settings_outlined, size: 20, color: _grayText),
),
const SizedBox(width: 12),
//
Container(
width: 36,
height: 36,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(18),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 4,
offset: const Offset(0, 2),
),
],
),
child: Stack(
children: [
const Center(
child: Icon(Icons.notifications_outlined, size: 20, color: _grayText),
),
Positioned(
right: 8,
top: 8,
child: Container(
width: 8,
height: 8,
decoration: const BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
),
),
],
),
),
],
),
),
);
}
@ -324,8 +243,7 @@ class AssetPage extends ConsumerWidget {
children: [
_buildQuickActionItem(Icons.add, '接收', _orange),
_buildQuickActionItem(Icons.remove, '发送', _orange),
_buildQuickActionItem(Icons.swap_horiz, '划转', _orange),
_buildQuickActionItem(Icons.download, '提现', _orange),
_buildQuickActionItem(Icons.people_outline, 'C2C', _orange),
],
);
}
@ -387,9 +305,6 @@ class AssetPage extends ConsumerWidget {
amount: asset?.cashBalance,
isLoading: isLoading,
valueInCny: asset != null ? '¥${formatAmount(asset.cashBalance)}' : null,
badge: '可提现',
badgeColor: _jewel,
badgeBgColor: _scandal,
),
const SizedBox(height: 16),
//

View File

@ -92,60 +92,16 @@ class _TradingPageState extends ConsumerState<TradingPage> {
Widget _buildAppBar() {
return Container(
color: _bgGray.withValues(alpha: 0.9),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
decoration: BoxDecoration(
color: _orange,
borderRadius: BorderRadius.circular(9999),
),
child: const Text(
'积分股交易',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.white,
),
),
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
child: const Center(
child: Text(
'积分股交易',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Color(0xFF111827),
),
Container(
width: 40,
height: 40,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.1),
blurRadius: 4,
offset: const Offset(0, 2),
),
],
),
child: Stack(
children: [
const Center(
child: Icon(Icons.notifications_outlined, color: _grayText),
),
Positioned(
right: 10,
top: 10,
child: Container(
width: 8,
height: 8,
decoration: const BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
),
),
],
),
),
],
),
),
);
}