summaryrefslogtreecommitdiff
path: root/Hutch/Views/Settings
diff options
context:
space:
mode:
Diffstat (limited to 'Hutch/Views/Settings')
-rw-r--r--Hutch/Views/Settings/SettingsView.swift25
1 files changed, 25 insertions, 0 deletions
diff --git a/Hutch/Views/Settings/SettingsView.swift b/Hutch/Views/Settings/SettingsView.swift
index 91aa420..30758a8 100644
--- a/Hutch/Views/Settings/SettingsView.swift
+++ b/Hutch/Views/Settings/SettingsView.swift
@@ -48,6 +48,8 @@ struct SettingsView: View {
patSection(viewModel)
}
+ behaviorSection()
+
// Token / Sign Out
tokenSection()
@@ -383,6 +385,25 @@ struct SettingsView: View {
// MARK: - Token / Sign Out Section
@ViewBuilder
+ private func behaviorSection() -> some View {
+ Section {
+ Toggle(
+ "Swipe actions",
+ isOn: Binding(
+ get: {
+ UserDefaults.standard.object(forKey: AppStorageKeys.swipeActionsEnabled) as? Bool ?? true
+ },
+ set: { UserDefaults.standard.set($0, forKey: AppStorageKeys.swipeActionsEnabled) }
+ )
+ )
+ } header: {
+ Text("Behavior")
+ } footer: {
+ Text("When enabled, swipe list rows to quickly take actions like resolving tickets, cancelling builds, and deleting pastes.")
+ }
+ }
+
+ @ViewBuilder
private func tokenSection() -> some View {
Section {
HStack {
@@ -727,6 +748,10 @@ private struct AboutView: View {
Text("Hutch uses your SourceHut personal access token to make requests on your behalf. The token is stored locally in the iOS keychain.")
.font(.subheadline)
.foregroundStyle(.secondary)
+
+ Link(destination: URL(string: "https://hutch.cleberg.net/privacy.html")!) {
+ SwiftUI.Label("Privacy Policy", systemImage: "hand.raised")
+ }
}
Section("Acknowledgements") {