diff --git a/frontend/mining-app/lib/presentation/pages/contribution/contribution_page.dart b/frontend/mining-app/lib/presentation/pages/contribution/contribution_page.dart index 18dc7a64..2b06b026 100644 --- a/frontend/mining-app/lib/presentation/pages/contribution/contribution_page.dart +++ b/frontend/mining-app/lib/presentation/pages/contribution/contribution_page.dart @@ -279,7 +279,14 @@ class ContributionPage extends ConsumerWidget { padding: const EdgeInsets.symmetric(horizontal: 4), child: Column( children: [ - Text(label, style: TextStyle(fontSize: 12, color: AppColors.textSecondaryOf(context))), + FittedBox( + fit: BoxFit.scaleDown, + child: Text( + label, + style: TextStyle(fontSize: 12, color: AppColors.textSecondaryOf(context)), + maxLines: 1, + ), + ), const SizedBox(height: 4), DataText( data: value != null ? (hideAmounts ? '****' : formatAmount(value)) : null, diff --git a/frontend/mining-app/lib/presentation/pages/contribution/contribution_records_page.dart b/frontend/mining-app/lib/presentation/pages/contribution/contribution_records_page.dart index 2434d73b..5d68c1f0 100644 --- a/frontend/mining-app/lib/presentation/pages/contribution/contribution_records_page.dart +++ b/frontend/mining-app/lib/presentation/pages/contribution/contribution_records_page.dart @@ -41,6 +41,7 @@ class _ContributionRecordsListPageState extends ConsumerState r.sourceType == _selectedSourceType).toList(); - - if (filteredRecords.isEmpty) { - return _buildEmptyView(); - } - return ListView.builder( padding: const EdgeInsets.all(16), - itemCount: filteredRecords.length + 1, // +1 for pagination info + itemCount: recordsPage.data.length + 1, // +1 for pagination info itemBuilder: (context, index) { - if (index == filteredRecords.length) { + if (index == recordsPage.data.length) { return _buildPaginationInfo(recordsPage); } - return _buildRecordCard(filteredRecords[index], currentAccountSequence); + return _buildRecordCard(recordsPage.data[index], currentAccountSequence); }, ); } diff --git a/frontend/mining-app/lib/presentation/providers/contribution_providers.dart b/frontend/mining-app/lib/presentation/providers/contribution_providers.dart index b947ec86..e2799576 100644 --- a/frontend/mining-app/lib/presentation/providers/contribution_providers.dart +++ b/frontend/mining-app/lib/presentation/providers/contribution_providers.dart @@ -47,11 +47,13 @@ class ContributionRecordsParams { final String accountSequence; final int page; final int pageSize; + final ContributionSourceType? sourceType; const ContributionRecordsParams({ required this.accountSequence, this.page = 1, this.pageSize = 10, + this.sourceType, }); @override @@ -61,10 +63,11 @@ class ContributionRecordsParams { runtimeType == other.runtimeType && accountSequence == other.accountSequence && page == other.page && - pageSize == other.pageSize; + pageSize == other.pageSize && + sourceType == other.sourceType; @override - int get hashCode => accountSequence.hashCode ^ page.hashCode ^ pageSize.hashCode; + int get hashCode => accountSequence.hashCode ^ page.hashCode ^ pageSize.hashCode ^ sourceType.hashCode; } /// 贡献值记录 Provider @@ -78,6 +81,7 @@ final contributionRecordsProvider = FutureProvider.family