Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19c66efff3 | ||
|
|
9da043e68a | ||
|
|
ce89434a39 |
@@ -22,6 +22,7 @@
|
||||
android:label="SportsX裁判工作台"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:usesCleartextTraffic="true">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
@@ -35,7 +35,11 @@ class _EventInfoPageState extends ConsumerState<EventInfoPage> {
|
||||
// allowByeMatch = 0 (直接晋级)
|
||||
// allowByeMatch = 1 (和败方对战)
|
||||
// allowByeMatch = -1 (个人赛不适用此配置,所以 = -1)
|
||||
if (item.allowByeMatch == 0) {
|
||||
// 如果比赛已结束 点击反应
|
||||
if (item.completed) return;
|
||||
final opponent = item.opponentName.trim();
|
||||
if (opponent.isEmpty &&
|
||||
(item.allowByeMatch == 0 || item.allowByeMatch == 1)) {
|
||||
return;
|
||||
}
|
||||
detail = await ref
|
||||
@@ -57,14 +61,15 @@ class _EventInfoPageState extends ConsumerState<EventInfoPage> {
|
||||
);
|
||||
return;
|
||||
}
|
||||
await ref
|
||||
.read(competitionTeamsServerProvider)
|
||||
.fetchTeamDetail(
|
||||
itemId: item.itemId,
|
||||
eventId: item.eventId,
|
||||
scheduleId: item.scheduleId,
|
||||
opponentId: item.opponentId,
|
||||
);
|
||||
try {
|
||||
await ref
|
||||
.read(eventInfoProvider.notifier)
|
||||
.loadRegistrationList(
|
||||
request: PlayerRegistrationListReq(userId: widget.playerId),
|
||||
);
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
|
||||
if (!mounted) return;
|
||||
|
||||
@@ -432,7 +437,12 @@ class _ScheduleDetails extends StatelessWidget {
|
||||
],
|
||||
if (opponentLine.isNotEmpty) ...[
|
||||
SizedBox(height: 3.h),
|
||||
_MetaText(opponentLine),
|
||||
Row(
|
||||
children: [
|
||||
_MetaText('对手:'),
|
||||
_MetaText(opponentLine, color: _opponentLineColor(opponentLine)),
|
||||
],
|
||||
),
|
||||
],
|
||||
],
|
||||
);
|
||||
@@ -440,10 +450,12 @@ class _ScheduleDetails extends StatelessWidget {
|
||||
}
|
||||
|
||||
class _MetaText extends StatelessWidget {
|
||||
const _MetaText(this.text);
|
||||
const _MetaText(this.text, {this.color = const Color(0xFF6E747D)});
|
||||
|
||||
final String text;
|
||||
|
||||
final Color color;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Text(
|
||||
@@ -453,7 +465,7 @@ class _MetaText extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
height: 1.2,
|
||||
color: const Color(0xFF6E747D),
|
||||
color: color,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
);
|
||||
@@ -530,8 +542,19 @@ String _formatMemberLine(EventRegistrationItem item) {
|
||||
|
||||
String _formatOpponentLine(EventRegistrationItem item) {
|
||||
final opponent = item.opponentName.trim();
|
||||
if (opponent.isEmpty) return '';
|
||||
return '对手:$opponent';
|
||||
if (opponent.isEmpty && item.allowByeMatch == 0) {
|
||||
return item.completed ? '轮空' : '';
|
||||
}
|
||||
if (opponent.isEmpty && item.allowByeMatch == 1) {
|
||||
return '待分配';
|
||||
}
|
||||
return opponent;
|
||||
}
|
||||
|
||||
Color _opponentLineColor(String opponentLine) {
|
||||
if (opponentLine.contains('待分配')) return const Color(0xFFF1C585);
|
||||
if (opponentLine.contains('轮空')) return const Color(0xFF41BFBF);
|
||||
return const Color(0xFF6E747D);
|
||||
}
|
||||
|
||||
String _formatNumberBadge(EventRegistrationItem item) {
|
||||
|
||||