Initial project setup - Phases 1-3 complete
This commit is contained in:
39
UI/More/AppSettingsView.swift
Normal file
39
UI/More/AppSettingsView.swift
Normal file
@@ -0,0 +1,39 @@
|
||||
import SwiftUI
|
||||
|
||||
struct AppSettingsView: View {
|
||||
@State private var analyticsEnabled = false
|
||||
@State private var crashReportingEnabled = true
|
||||
@State private var showClearCacheConfirmation = false
|
||||
|
||||
var body: some View {
|
||||
Form {
|
||||
Section {
|
||||
Toggle("Analytics", isOn: $analyticsEnabled)
|
||||
Toggle("Crash Reporting", isOn: $crashReportingEnabled)
|
||||
} footer: {
|
||||
Text("Help improve the app by sharing anonymous usage data.")
|
||||
}
|
||||
|
||||
Section {
|
||||
Button("Clear App Cache", role: .destructive) {
|
||||
showClearCacheConfirmation = true
|
||||
}
|
||||
} footer: {
|
||||
Text("Remove all cached data. This does not delete captured traffic.")
|
||||
}
|
||||
|
||||
Section("About") {
|
||||
LabeledContent("Version", value: "1.0.0")
|
||||
LabeledContent("Build", value: "1")
|
||||
}
|
||||
}
|
||||
.navigationTitle("App Settings")
|
||||
.confirmationDialog("Clear Cache", isPresented: $showClearCacheConfirmation) {
|
||||
Button("Clear Cache", role: .destructive) {
|
||||
// TODO: Clear URL cache, image cache, etc.
|
||||
}
|
||||
} message: {
|
||||
Text("This will clear all cached data.")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user