mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-08 21:47:23 +00:00
feat(lotw): 漫游核验改用「当前定位 vs 证书台址」,移除记录网格核对
- 新增 LoTWPositionWarning + positionWarning(currentGrid, stationGrids):当前定位网格不在 证书台址网格集内 → 提示(4 位归一;任一侧缺失不报) - ISettingsRepo.getCurrentGrid():只读取「≤24h 系统最后已知定位」与「存储台址」中较新者, 不写任何设置(避开 setStationPosition 的写副作用) - 上传前核对弹窗(雷达 / 日志本两入口)改由 VM 在 prepare 后计算;雷达记录页新增提示行 (stationMismatch,点击=跳转改台址并预填当前格) - 移除旧「记录 vs 台址」核对:uploadGridWarning / LoTWGridWarning / preview.gridWarning 及 相关 UI / 字符串全删;LoTWPositionWarningDialog 重命名替代 LoTWGridWarningDialog - 测试:LoTWPositionWarningTest ×5 替代 LoTWGridWarningTest;domain 171 / data 116 / mutual 28 全绿
This commit is contained in:
1 parent
2e704ee1d3
commit
56a788138b
19 files changed
+222
-158
No files matched your search
+6
-7
@@ -23,17 +23,17 @@ import androidx.compose.material3.TextButton
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.rtbishop.look4sat.core.domain.repository.LoTWGridWarning
|
||||
import com.rtbishop.look4sat.core.domain.repository.LoTWPositionWarning
|
||||
|
||||
/**
|
||||
* Pre-upload grid check: the prepared batch holds records whose own grids fall outside the
|
||||
* station-location grids they would be signed with — the fingerprint of uploading while
|
||||
* Pre-upload position check: the operator's current position grid falls outside the station
|
||||
* location the prepared batch would be signed with — the fingerprint of operating while
|
||||
* roaming with a station location that was never updated. The operator either jumps to the
|
||||
* station location to fix it, or ignores the warning and proceeds to the normal preview.
|
||||
*/
|
||||
@Composable
|
||||
fun LoTWGridWarningDialog(
|
||||
warning: LoTWGridWarning,
|
||||
fun LoTWPositionWarningDialog(
|
||||
warning: LoTWPositionWarning,
|
||||
onFixStation: () -> Unit,
|
||||
onIgnore: () -> Unit
|
||||
) {
|
||||
@@ -46,8 +46,7 @@ fun LoTWGridWarningDialog(
|
||||
Text(
|
||||
text = stringResource(
|
||||
R.string.lotw_upload_grid_mismatch,
|
||||
warning.count,
|
||||
gridsLabel(warning.recordGrids),
|
||||
warning.currentGrid,
|
||||
gridsLabel(warning.stationGrids)
|
||||
),
|
||||
fontSize = 14.sp
|
||||
@@ -204,7 +204,8 @@
|
||||
<string name="lotw_upload_grid_title">上传前核对</string>
|
||||
<string name="lotw_upload_grid_fix">修改台址</string>
|
||||
<string name="lotw_upload_grid_ignore">忽略</string>
|
||||
<string name="lotw_upload_grid_mismatch">有 %1$d 条记录的自己的网格不在上传台址内(记录:%2$s;台址:%3$s)——请确认台址是通联时实际所在的网格。</string>
|
||||
<string name="lotw_upload_grid_mismatch">当前定位 %1$s 不在证书台址网格 %2$s 内——如果正在此处操作,请先更新台址再上传。</string>
|
||||
<string name="lotw_upload_pos_hint">当前定位 %1$s 不在证书台址网格 %2$s 内 · 点此更新</string>
|
||||
<string name="prefs_lotw_upload_title">LoTW 上传证书</string>
|
||||
<string name="prefs_lotw_upload_configured">证书已导入 · 台址网格 %1$s</string>
|
||||
<string name="prefs_lotw_upload_not_configured">未配置 — 导入 TrustedQSL 证书后即可上传通联</string>
|
||||
|
||||
@@ -233,7 +233,8 @@
|
||||
<string name="lotw_upload_grid_title">Upload check</string>
|
||||
<string name="lotw_upload_grid_fix">Fix station location</string>
|
||||
<string name="lotw_upload_grid_ignore">Ignore</string>
|
||||
<string name="lotw_upload_grid_mismatch">%1$d record(s) log a grid outside the upload station location (records: %2$s; station: %3$s). Verify the station location is where you actually operated.</string>
|
||||
<string name="lotw_upload_grid_mismatch">Current position %1$s is outside the certificate station grids %2$s — if you are operating here, update the station location before uploading.</string>
|
||||
<string name="lotw_upload_pos_hint">Current position %1$s is outside the station grids %2$s — tap to update</string>
|
||||
<string name="prefs_lotw_upload_title">LoTW upload certificate</string>
|
||||
<string name="prefs_lotw_upload_configured">Certificate imported · station grid %1$s</string>
|
||||
<string name="prefs_lotw_upload_not_configured">Not configured — import your TrustedQSL certificate to upload QSOs</string>
|
||||
|
||||
Reference in new issue
Block a user