v3.24 设置页导出配色/类型设置行去标题/统计页顶部文案
This commit is contained in:
27
CHANGELOG.md
27
CHANGELOG.md
@@ -1,5 +1,32 @@
|
||||
# 变更记录
|
||||
|
||||
## 2026-12-03 09:46:00 · 设置页导出配色 / 类型设置行去标题 / 统计页顶部文案(v3.24)
|
||||
|
||||
**起因**(用户三项要求,均为外观/文案,不动功能)
|
||||
|
||||
1. 设置页「导出数据」黑字,下面两条(清理未关联数据、清空所有数据)是红色,要求颜色一致;
|
||||
2. 「项目类型」分区的设置行,标题「类型设置」四个字去掉,空间让给类型列表;
|
||||
3. 统计页顶部「专注时长」改「今日累计时长」、「完成任务」改「任务数」。
|
||||
|
||||
**改动**
|
||||
|
||||
- `SettingsFragment.action()` 新增可选参数 `titleColorRes: Int = 0`(默认 0 = 原逻辑,
|
||||
其余行不受影响);导出数据行传 `R.color.danger`,与下方两条危险操作同色。
|
||||
没有直接给导出行传 `danger = true`,避免误触危险语义。
|
||||
- 类型设置行标题传空串,值(类型列表)仍单行省略、点整行弹同一个编辑弹窗;
|
||||
`type_settings` 字符串保留(弹窗标题还在用)。
|
||||
- `strings.xml`:`focus_minutes`「专注时长」→「今日累计时长」、
|
||||
`completed_tasks`「完成任务」→「任务数」。两键均只被 fragment_stats.xml 顶部卡引用;
|
||||
统计页汇总行的 `total_done_tasks`(完成任务)是另一个键,未动。
|
||||
|
||||
**未改动**
|
||||
|
||||
其余设置行颜色与布局、统计页其余文案与逻辑、任务页/项目页/计时逻辑、数据库(仍 v11)。
|
||||
|
||||
**验证**
|
||||
|
||||
APK `versionCode 81 / 3.24`,证书 SHA-256 `7bcbd511…cc8c83` 与已装版本一致,覆盖升级不丢数据。
|
||||
|
||||
## 2026-12-02 21:30:44 · 正计时右侧按钮改为「结束」(v3.23)
|
||||
|
||||
**起因**
|
||||
|
||||
@@ -148,9 +148,10 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
|
||||
|
||||
section(R.string.section_types)
|
||||
card(
|
||||
// 类型只是给项目打的标签:值列表可改,改完项目弹层与统计页的类型分布立刻跟着变
|
||||
// 类型只是给项目打的标签:值列表可改,改完项目弹层与统计页的类型分布立刻跟着变。
|
||||
// 行标题「类型设置」按用户要求去掉,空间让给类型列表;点击弹窗等行为不变
|
||||
action(
|
||||
getString(R.string.type_settings),
|
||||
"",
|
||||
Prefs.projectTypes.joinToString("、"),
|
||||
) { inputProjectTypes() },
|
||||
)
|
||||
@@ -171,8 +172,13 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
|
||||
|
||||
section(R.string.section_data)
|
||||
card(
|
||||
// 导出排在最前:删除即真删、系统备份也已关闭,误清空后只能靠这份文件
|
||||
action(getString(R.string.export_data), getString(R.string.export_value)) {
|
||||
// 导出排在最前:删除即真删、系统备份也已关闭,误清空后只能靠这份文件。
|
||||
// 标题与下面两条危险操作同色(红色),看起来是一组的
|
||||
action(
|
||||
getString(R.string.export_data),
|
||||
getString(R.string.export_value),
|
||||
titleColorRes = R.color.danger,
|
||||
) {
|
||||
exportDoc.launch("focusbox-" + Dates.dayKey(System.currentTimeMillis()) + ".json")
|
||||
},
|
||||
// 清理旧版本删除任务后残留的孤儿记录,排在「清空所有数据」前面:
|
||||
@@ -296,6 +302,7 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
|
||||
value: String,
|
||||
danger: Boolean = false,
|
||||
showArrow: Boolean = true,
|
||||
titleColorRes: Int = 0,
|
||||
onClick: (() -> Unit)? = null,
|
||||
): View {
|
||||
val ctx = requireContext()
|
||||
@@ -311,7 +318,15 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
|
||||
row.addView(TextView(ctx).apply {
|
||||
text = title
|
||||
textSize = 15f
|
||||
setTextColor(col(if (danger) R.color.danger else R.color.text))
|
||||
setTextColor(
|
||||
col(
|
||||
when {
|
||||
danger -> R.color.danger
|
||||
titleColorRes != 0 -> titleColorRes
|
||||
else -> R.color.text
|
||||
}
|
||||
)
|
||||
)
|
||||
isSingleLine = true
|
||||
layoutParams = LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||
@@ -763,6 +778,6 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val VERSION = "3.23"
|
||||
const val VERSION = "3.24"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,9 +133,9 @@
|
||||
|
||||
<string name="stats_title">统计</string>
|
||||
<string name="today">今日</string>
|
||||
<string name="focus_minutes">专注时长</string>
|
||||
<string name="focus_minutes">今日累计时长</string>
|
||||
<string name="pomodoro_count">番茄数</string>
|
||||
<string name="completed_tasks">完成任务</string>
|
||||
<string name="completed_tasks">任务数</string>
|
||||
<string name="goal_short">%1$dM</string>
|
||||
<string name="trend_title">趋势</string>
|
||||
<string name="heatmap_title">频率</string>
|
||||
|
||||
Reference in New Issue
Block a user