commit aaaca2d8aad86d0278ea854dc44e0220b951cc74
parent c73ad2240a5d8dd12ef2fe4d0c34e59b3636a346
Author: Michael Camilleri <[email protected]>
Date: Tue, 20 Oct 2026 12:24:12 +0900
Tweak display of Settings tab
Diffstat
| M | Reportage/Views/Settings/DataSection.swift | | | 29 | +++-------------------------- |
| M | Reportage/Views/Settings/DiagnosticsSection.swift | | | 5 | ----- |
| M | Reportage/Views/Settings/SettingsView.swift | | | 4 | ++-- |
3 files changed, 5 insertions(+), 33 deletions(-)
diff --git a/Reportage/Views/Settings/DataSection.swift b/Reportage/Views/Settings/DataSection.swift
@@ -10,7 +10,6 @@ struct DataSection: View {
@Environment(HealthFiller.self) private var healthFiller: HealthFiller?
@State private var task: DataTask?
@State private var isChoosingImport = false
- @State private var includeLegacy = false
@State private var exported: ExportFile?
@State private var outcome: Outcome?
@State private var isConfirmingDelete = false
@@ -38,13 +37,6 @@ struct DataSection: View {
}
.disabled(task != nil || store == nil)
.settingsRow()
- SettingsNote {
- Text(
- "Adds the reports from a Reporter JSON export. Reports already imported are left alone, so a newer export can be imported again."
- )
- }
- Toggle("Include Reporter Snapshots", isOn: $includeLegacy)
- .settingsRow()
Button {
Task { await export() }
} label: {
@@ -52,11 +44,6 @@ struct DataSection: View {
}
.disabled(task != nil || store == nil)
.settingsRow()
- SettingsNote {
- Text(
- "Saves every question, answer and report as a JSON file. Reporter snapshots are the original records of imported reports, kept exactly as Reporter exported them."
- )
- }
if let healthFiller {
Button {
if healthFiller.isFillingPast {
@@ -71,13 +58,9 @@ struct DataSection: View {
}
.disabled(task != nil || store == nil)
.settingsRow()
- SettingsNote {
- if let count = healthFiller.pastCount {
+ if let count = healthFiller.pastCount {
+ SettingsNote {
Text("Filled in \(count) reports so far. Keep Reportage open until it finishes.")
- } else {
- Text(
- "Adds Health data to reports filed before Reportage was given access to Health, including imported reports. Newer reports are filled in automatically."
- )
}
}
}
@@ -88,11 +71,6 @@ struct DataSection: View {
}
.disabled(task != nil || store == nil || healthFiller?.isFillingPast == true)
.settingsRow()
- SettingsNote {
- Text(
- "Deletes every report, question, place and person, and starts again with the default questions. Prompt settings are kept."
- )
- }
} header: {
SettingsHeading("Data")
}
@@ -168,9 +146,8 @@ struct DataSection: View {
let date = Date().formatted(.iso8601.year().month().day())
let url = URL.temporaryDirectory.appending(path: "Reportage \(date).json")
do {
- let options = ReportageExportOptions(includeLegacy: includeLegacy)
let summary = try await ReportageExporter(persistence: store.persistence)
- .export(to: url, options: options)
+ .export(to: url, options: ReportageExportOptions())
logger.info("Exported \(summary.reports) reports, \(summary.questions) questions, \(summary.tokens) tokens")
exported = ExportFile(url: url)
} catch {
diff --git a/Reportage/Views/Settings/DiagnosticsSection.swift b/Reportage/Views/Settings/DiagnosticsSection.swift
@@ -7,11 +7,6 @@ struct DiagnosticsSection: View {
Section {
NavigationLink("Event Log") { EventLogView() }
.settingsRow()
- SettingsNote {
- Text(
- "A day of notes on what Reportage did in the background, such as filing an instant report. They say what happened, not what was recorded."
- )
- }
} header: {
SettingsHeading("Diagnostics")
}
diff --git a/Reportage/Views/Settings/SettingsView.swift b/Reportage/Views/Settings/SettingsView.swift
@@ -1,6 +1,6 @@
import SwiftUI
-/// Settings: the surveys, when random prompts come, and importing and
+/// Settings: the questions, when random prompts come, and importing and
/// exporting.
struct SettingsView: View {
@State private var settings = PromptSettings.load()
@@ -28,7 +28,7 @@ struct SettingsView: View {
}
.settingsRow()
} header: {
- SettingsHeading("Surveys")
+ SettingsHeading("Reports")
}
DataSection()
DiagnosticsSection()