feat(amsat): 时隙判定照官网链(严格多数/并列=冲突/crew 紫)+ 弹窗「冲突」徽标

- 旧逻辑取槽内最新一条报告取色 → 官网图例「Conflicting」永不显示
- 判定链照 AMSAT 官方源码 index.php:crew>0 取紫;严格多数取色;并列/无多数=「冲突」
- SatSlot 新增 isConflicted 字段;弹窗冲突槽内全部报告加「冲突/Conflicting」小徽标(随系统语言)
- 天格子外观不变(B 未采纳);AmSatRepositoryTest +4 用例(共 9 例)
This commit is contained in:
atsunatsu committed 2026-10-05 03:54:22 +08:00
1 parent cbe3e50f86
commit 6f83740983
4 files changed
+178 -14

No files matched your search

@@ -400,6 +400,7 @@ private fun ReportDialog(
onDismiss: () -> Unit
) {
val dayReports = day.slots.flatMap { it.reportIds }.mapNotNull { reports[it] }
val conflictedIds = day.slots.filter { it.isConflicted }.flatMap { it.reportIds }.toSet()
InfoDialog(
title = "$statusName · ${day.dateLabel}",
onDismiss = onDismiss,
@@ -448,6 +449,10 @@ private fun ReportDialog(
)
Spacer(modifier = Modifier.width(6.dp))
Text(text = report.statusText, fontSize = 14.sp, fontWeight = FontWeight.Bold)
if (report.id in conflictedIds) {
Spacer(modifier = Modifier.width(8.dp))
ConflictBadge()
}
}
Text(
text = "${report.call} ${report.dateUtc} ${report.timeUtc}" +
@@ -463,6 +468,23 @@ private fun ReportDialog(
}
}
/** Orange "冲突" tag on reports whose 2h slot has no strict majority (Conflicting reports). */
@Composable
private fun ConflictBadge() {
Box(
modifier = Modifier
.clip(RoundedCornerShape(4.dp))
.background(Color(0xFFFE6100).copy(alpha = 0.15f))
.padding(horizontal = 5.dp, vertical = 1.dp)
) {
Text(
text = stringResource(id = R.string.amsat_conflict),
fontSize = 11.sp,
color = Color(0xFFFE6100)
)
}
}
@Composable
private fun AmSatUploadPanel(
statusName: String,