fix(mining-app): rename ContributionRecordsListPage to avoid name conflict
- Rename page class from ContributionRecordsPage to ContributionRecordsListPage - Add typedef RecordsPageData for ContributionRecordsPage data model - Fix import statements and unused variable Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
caffb124d2
commit
7bc8547a96
|
|
@ -771,7 +771,10 @@
|
||||||
"Bash(ssh -o ConnectTimeout=10 ceshi@14.215.128.96 'find /home/ceshi/rwadurian/frontend/mining-admin-web -name \"\"*.tsx\"\" -o -name \"\"*.ts\"\" | xargs grep -l \"\"用户管理\\\\|users\"\" 2>/dev/null | head -10')",
|
"Bash(ssh -o ConnectTimeout=10 ceshi@14.215.128.96 'find /home/ceshi/rwadurian/frontend/mining-admin-web -name \"\"*.tsx\"\" -o -name \"\"*.ts\"\" | xargs grep -l \"\"用户管理\\\\|users\"\" 2>/dev/null | head -10')",
|
||||||
"Bash(dir /s /b \"c:\\\\Users\\\\dong\\\\Desktop\\\\rwadurian\")",
|
"Bash(dir /s /b \"c:\\\\Users\\\\dong\\\\Desktop\\\\rwadurian\")",
|
||||||
"Bash(dir /b \"c:\\\\Users\\\\dong\\\\Desktop\\\\rwadurian\\\\backend\\\\services\")",
|
"Bash(dir /b \"c:\\\\Users\\\\dong\\\\Desktop\\\\rwadurian\\\\backend\\\\services\")",
|
||||||
"Bash(ssh -J ceshi@103.39.231.231 ceshi@192.168.1.111 \"curl -s http://localhost:3021/api/v2/admin/status\")"
|
"Bash(ssh -J ceshi@103.39.231.231 ceshi@192.168.1.111 \"curl -s http://localhost:3021/api/v2/admin/status\")",
|
||||||
|
"Bash(del \"c:\\\\Users\\\\dong\\\\Desktop\\\\rwadurian\\\\frontend\\\\mining-app\\\\lib\\\\domain\\\\usecases\\\\trading\\\\buy_shares.dart\")",
|
||||||
|
"Bash(del \"c:\\\\Users\\\\dong\\\\Desktop\\\\rwadurian\\\\frontend\\\\mining-app\\\\lib\\\\domain\\\\usecases\\\\trading\\\\sell_shares.dart\")",
|
||||||
|
"Bash(ls -la \"c:\\\\Users\\\\dong\\\\Desktop\\\\rwadurian\\\\frontend\\\\mining-app\\\\lib\\\\presentation\\\\pages\"\" 2>/dev/null || dir /b \"c:UsersdongDesktoprwadurianfrontendmining-applibpresentationpages \")"
|
||||||
],
|
],
|
||||||
"deny": [],
|
"deny": [],
|
||||||
"ask": []
|
"ask": []
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ final appRouterProvider = Provider<GoRouter>((ref) {
|
||||||
),
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: Routes.contributionRecords,
|
path: Routes.contributionRecords,
|
||||||
builder: (context, state) => const ContributionRecordsPage(),
|
builder: (context, state) => const ContributionRecordsListPage(),
|
||||||
),
|
),
|
||||||
ShellRoute(
|
ShellRoute(
|
||||||
builder: (context, state, child) => MainShell(child: child),
|
builder: (context, state, child) => MainShell(child: child),
|
||||||
|
|
|
||||||
|
|
@ -6,17 +6,19 @@ import '../../../core/utils/format_utils.dart';
|
||||||
import '../../../domain/entities/contribution_record.dart';
|
import '../../../domain/entities/contribution_record.dart';
|
||||||
import '../../providers/user_providers.dart';
|
import '../../providers/user_providers.dart';
|
||||||
import '../../providers/contribution_providers.dart';
|
import '../../providers/contribution_providers.dart';
|
||||||
import '../../widgets/shimmer_loading.dart';
|
|
||||||
|
/// Type alias to avoid name conflict with page class
|
||||||
|
typedef RecordsPageData = ContributionRecordsPage;
|
||||||
|
|
||||||
/// 贡献值记录完整列表页面
|
/// 贡献值记录完整列表页面
|
||||||
class ContributionRecordsPage extends ConsumerStatefulWidget {
|
class ContributionRecordsListPage extends ConsumerStatefulWidget {
|
||||||
const ContributionRecordsPage({super.key});
|
const ContributionRecordsListPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ConsumerState<ContributionRecordsPage> createState() => _ContributionRecordsPageState();
|
ConsumerState<ContributionRecordsListPage> createState() => _ContributionRecordsListPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ContributionRecordsPageState extends ConsumerState<ContributionRecordsPage> {
|
class _ContributionRecordsListPageState extends ConsumerState<ContributionRecordsListPage> {
|
||||||
// 设计色彩
|
// 设计色彩
|
||||||
static const Color _orange = Color(0xFFFF6B00);
|
static const Color _orange = Color(0xFFFF6B00);
|
||||||
static const Color _green = Color(0xFF22C55E);
|
static const Color _green = Color(0xFF22C55E);
|
||||||
|
|
@ -227,7 +229,7 @@ class _ContributionRecordsPageState extends ConsumerState<ContributionRecordsPag
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildRecordsList(ContributionRecordsPage recordsPage, String currentAccountSequence) {
|
Widget _buildRecordsList(RecordsPageData recordsPage, String currentAccountSequence) {
|
||||||
// 根据筛选条件过滤
|
// 根据筛选条件过滤
|
||||||
final filteredRecords = _selectedSourceType == null
|
final filteredRecords = _selectedSourceType == null
|
||||||
? recordsPage.data
|
? recordsPage.data
|
||||||
|
|
@ -250,8 +252,6 @@ class _ContributionRecordsPageState extends ConsumerState<ContributionRecordsPag
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildRecordCard(ContributionRecord record, String currentAccountSequence) {
|
Widget _buildRecordCard(ContributionRecord record, String currentAccountSequence) {
|
||||||
final dateFormat = DateFormat('yyyy-MM-dd HH:mm');
|
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
margin: const EdgeInsets.only(bottom: 12),
|
margin: const EdgeInsets.only(bottom: 12),
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
|
|
@ -451,7 +451,7 @@ class _ContributionRecordsPageState extends ConsumerState<ContributionRecordsPag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildPaginationInfo(ContributionRecordsPage recordsPage) {
|
Widget _buildPaginationInfo(RecordsPageData recordsPage) {
|
||||||
final totalPages = (recordsPage.total / _pageSize).ceil();
|
final totalPages = (recordsPage.total / _pageSize).ceil();
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue