mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
feat(settings): 设置页新增 Project Wiki 入口(fork 增量功能与用法说明)
This commit is contained in:
1 parent
95d2d792cc
commit
2110bf0cd6
4 files changed
+164
No files matched your search
@@ -313,6 +313,19 @@
|
|||||||
<string name="prefs_highlight_high">高 > %1$d°</string>
|
<string name="prefs_highlight_high">高 > %1$d°</string>
|
||||||
|
|
||||||
<string name="prefs_outro_title">致谢与声明</string>
|
<string name="prefs_outro_title">致谢与声明</string>
|
||||||
|
<string name="prefs_project_wiki">Project Wiki</string>
|
||||||
|
<string name="project_wiki_intro">Look4Sat-BA7OPF 是基于 Look4Sat 的定制版,保留上游全部功能,并新增:</string>
|
||||||
|
<string name="project_wiki_section_logbook">卫星日志本与 LoTW</string>
|
||||||
|
<string name="project_wiki_logbook_1">卫星通联日志本——通联时一键记录呼号、时间、频率、模式、信号报告和网格。</string>
|
||||||
|
<string name="project_wiki_logbook_2">LoTW 直传——导入 ARRL 证书后,直接在 App 内把日志上传到 LoTW,无需电脑。</string>
|
||||||
|
<string name="project_wiki_logbook_3">确认同步——一键同步 LoTW 官方确认,日志自动标记“已上传 / 已确认”;修改已上传的记录会自动新建一条,原记录不受影响。</string>
|
||||||
|
<string name="project_wiki_logbook_how">用法:通联后点“记录”→ 日志页点“上传”→ 设置里“同步”查看确认。</string>
|
||||||
|
<string name="project_wiki_section_mutual">双站过境匹配</string>
|
||||||
|
<string name="project_wiki_mutual_1">友台共视匹配——输入你和友台的位置,找出双方同时可见的卫星过境,点一下直接进雷达图。</string>
|
||||||
|
<string name="project_wiki_mutual_how">用法:Match 页 → 设置两站位置 → 查询。</string>
|
||||||
|
<string name="project_wiki_section_grids">通联网格地图</string>
|
||||||
|
<string name="project_wiki_grids_1">已通联网格——LoTW/Wavelog 同步的网格在地图上标绿,支持奖状边界和首通呼号标签;点格子看该网格的通联记录,还能一键去匹配友台。</string>
|
||||||
|
<string name="project_wiki_grids_how">用法:地图页开启网格模式 → 设置里同步 LoTW/Wavelog。</string>
|
||||||
<string name="prefs_outro_thanks" translatable="false">
|
<string name="prefs_outro_thanks" translatable="false">
|
||||||
• Look4Sat 所有用户及贡献者!
|
• Look4Sat 所有用户及贡献者!
|
||||||
\n• David A. B. Johnson (predict4java)
|
\n• David A. B. Johnson (predict4java)
|
||||||
|
|||||||
@@ -342,6 +342,19 @@
|
|||||||
<string name="prefs_highlight_high">High > %1$d°</string>
|
<string name="prefs_highlight_high">High > %1$d°</string>
|
||||||
|
|
||||||
<string name="prefs_outro_title">Credits & Notices</string>
|
<string name="prefs_outro_title">Credits & Notices</string>
|
||||||
|
<string name="prefs_project_wiki">Project Wiki</string>
|
||||||
|
<string name="project_wiki_intro">Look4Sat-BA7OPF is a customized fork of Look4Sat. All upstream features, plus:</string>
|
||||||
|
<string name="project_wiki_section_logbook">Satellite Logbook & LoTW</string>
|
||||||
|
<string name="project_wiki_logbook_1">Satellite logbook — one-tap logging of callsign, time, frequency, mode, report and grid.</string>
|
||||||
|
<string name="project_wiki_logbook_2">Direct LoTW upload — import your ARRL certificate and upload logs to LoTW right from the app, no PC needed.</string>
|
||||||
|
<string name="project_wiki_logbook_3">Confirmation sync — one-tap sync of LoTW confirmations, marked as uploaded/confirmed. Editing an uploaded entry creates a new one, leaving the original untouched.</string>
|
||||||
|
<string name="project_wiki_logbook_how">How: tap Record after a QSO → Upload on the log page → Sync in Settings.</string>
|
||||||
|
<string name="project_wiki_section_mutual">Mutual Pass Matching</string>
|
||||||
|
<string name="project_wiki_mutual_1">Enter your QTH and a friend\'s to find passes visible to both; tap a pass to open the radar.</string>
|
||||||
|
<string name="project_wiki_mutual_how">How: Match tab → set both stations → Query.</string>
|
||||||
|
<string name="project_wiki_section_grids">Worked-Grid Map</string>
|
||||||
|
<string name="project_wiki_grids_1">Grids synced from LoTW/Wavelog shown in green, with award boundaries and first-QSO callsign labels; tap a grid to see its QSOs and match a friend.</string>
|
||||||
|
<string name="project_wiki_grids_how">How: enable Grid mode on the map → sync LoTW/Wavelog in Settings.</string>
|
||||||
<string name="prefs_outro_thanks" translatable="false">
|
<string name="prefs_outro_thanks" translatable="false">
|
||||||
* Look4Sat users and contributors!
|
* Look4Sat users and contributors!
|
||||||
\n* David A. B. Johnson (predict4java)
|
\n* David A. B. Johnson (predict4java)
|
||||||
|
|||||||
@@ -0,0 +1,113 @@
|
|||||||
|
/*
|
||||||
|
* Look4Sat. Amateur radio satellite tracker and pass predictor.
|
||||||
|
* Copyright (C) 2019-2026 Arty Bishop and contributors.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.rtbishop.look4sat.feature.settings
|
||||||
|
|
||||||
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.rememberScrollState
|
||||||
|
import androidx.compose.foundation.verticalScroll
|
||||||
|
import androidx.compose.material3.AlertDialog
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.material3.TextButton
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.res.stringResource
|
||||||
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import androidx.compose.ui.unit.sp
|
||||||
|
import com.rtbishop.look4sat.core.presentation.R
|
||||||
|
import com.rtbishop.look4sat.core.presentation.sheetDialogContainerColor
|
||||||
|
import com.rtbishop.look4sat.core.presentation.sheetDialogShape
|
||||||
|
import com.rtbishop.look4sat.core.presentation.SheetDialogTitle
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The fork's Project Wiki: a short overview of what Look4Sat-BA7OPF adds over upstream
|
||||||
|
* and how to use those features. Shown in the update-checker screen and behind the
|
||||||
|
* Settings → Project Wiki entry. Text lives in string resources (no release-body parsing),
|
||||||
|
* so it always renders even when the GitHub page is unreachable.
|
||||||
|
*/
|
||||||
|
@Composable
|
||||||
|
fun ProjectWikiBody(modifier: Modifier = Modifier) {
|
||||||
|
Column(modifier = modifier, verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.project_wiki_intro),
|
||||||
|
fontSize = 13.sp
|
||||||
|
)
|
||||||
|
WikiSection(stringResource(R.string.project_wiki_section_logbook))
|
||||||
|
WikiEntry(stringResource(R.string.project_wiki_logbook_1))
|
||||||
|
WikiEntry(stringResource(R.string.project_wiki_logbook_2))
|
||||||
|
WikiEntry(stringResource(R.string.project_wiki_logbook_3))
|
||||||
|
WikiHow(stringResource(R.string.project_wiki_logbook_how))
|
||||||
|
WikiSection(stringResource(R.string.project_wiki_section_mutual))
|
||||||
|
WikiEntry(stringResource(R.string.project_wiki_mutual_1))
|
||||||
|
WikiHow(stringResource(R.string.project_wiki_mutual_how))
|
||||||
|
WikiSection(stringResource(R.string.project_wiki_section_grids))
|
||||||
|
WikiEntry(stringResource(R.string.project_wiki_grids_1))
|
||||||
|
WikiHow(stringResource(R.string.project_wiki_grids_how))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun ProjectWikiDialog(onDismiss: () -> Unit) {
|
||||||
|
AlertDialog(
|
||||||
|
onDismissRequest = onDismiss,
|
||||||
|
shape = sheetDialogShape(),
|
||||||
|
containerColor = sheetDialogContainerColor(),
|
||||||
|
title = { SheetDialogTitle(stringResource(R.string.prefs_project_wiki)) },
|
||||||
|
text = {
|
||||||
|
ProjectWikiBody(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.verticalScroll(rememberScrollState())
|
||||||
|
)
|
||||||
|
},
|
||||||
|
confirmButton = {
|
||||||
|
TextButton(onClick = onDismiss) {
|
||||||
|
Text(stringResource(android.R.string.ok))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun WikiSection(text: String) {
|
||||||
|
Text(
|
||||||
|
text = text,
|
||||||
|
color = MaterialTheme.colorScheme.primary,
|
||||||
|
fontWeight = FontWeight.Medium,
|
||||||
|
fontSize = 13.sp
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun WikiEntry(text: String) {
|
||||||
|
Text(text = text, fontSize = 12.sp)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun WikiHow(text: String) {
|
||||||
|
Text(
|
||||||
|
text = text,
|
||||||
|
fontSize = 12.sp,
|
||||||
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
|
modifier = Modifier.padding(start = 8.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
+25
@@ -101,6 +101,10 @@ fun SettingsDestination() {
|
|||||||
private fun SettingsScreen(uiState: SettingsState, onAction: (SettingsAction) -> Unit) {
|
private fun SettingsScreen(uiState: SettingsState, onAction: (SettingsAction) -> Unit) {
|
||||||
var showUpdateChecker by rememberSaveable { mutableStateOf(false) }
|
var showUpdateChecker by rememberSaveable { mutableStateOf(false) }
|
||||||
var showMapSettings by rememberSaveable { mutableStateOf(false) }
|
var showMapSettings by rememberSaveable { mutableStateOf(false) }
|
||||||
|
var showProjectWiki by rememberSaveable { mutableStateOf(false) }
|
||||||
|
if (showProjectWiki) {
|
||||||
|
ProjectWikiDialog(onDismiss = { showProjectWiki = false })
|
||||||
|
}
|
||||||
if (showUpdateChecker) {
|
if (showUpdateChecker) {
|
||||||
UpdateCheckerScreen(
|
UpdateCheckerScreen(
|
||||||
currentVersion = uiState.appVersionName,
|
currentVersion = uiState.appVersionName,
|
||||||
@@ -421,6 +425,7 @@ private fun SettingsScreen(uiState: SettingsState, onAction: (SettingsAction) ->
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
item { MapSettingsCard(onClick = { showMapSettings = true }) }
|
item { MapSettingsCard(onClick = { showMapSettings = true }) }
|
||||||
|
item { ProjectWikiCard(onClick = { showProjectWiki = true }) }
|
||||||
item { CardCredits() }
|
item { CardCredits() }
|
||||||
item(span = { GridItemSpan(maxLineSpan) }) {
|
item(span = { GridItemSpan(maxLineSpan) }) {
|
||||||
CardButton(
|
CardButton(
|
||||||
@@ -852,6 +857,26 @@ private fun UpdateIndicator(isUpdating: Boolean, modifier: Modifier = Modifier)
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun ProjectWikiCard(onClick: () -> Unit, modifier: Modifier = Modifier) {
|
||||||
|
ElevatedCard(modifier = modifier) {
|
||||||
|
Row(
|
||||||
|
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
||||||
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
|
modifier = Modifier
|
||||||
|
.height(48.dp)
|
||||||
|
.clickable { onClick() }) {
|
||||||
|
Spacer(Modifier)
|
||||||
|
Icon(painter = painterResource(id = R.drawable.ic_policy), contentDescription = null)
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.prefs_project_wiki),
|
||||||
|
fontSize = 16.sp,
|
||||||
|
fontWeight = FontWeight.Medium
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Preview(showBackground = true)
|
@Preview(showBackground = true)
|
||||||
@Composable
|
@Composable
|
||||||
private fun CardCreditsPreview() = MainTheme { CardCredits() }
|
private fun CardCreditsPreview() = MainTheme { CardCredits() }
|
||||||
|
|||||||
Reference in new issue
Block a user