From 866f9517dba3c878197b0290dd8b4d1becb153c3 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sun, 22 Mar 2026 20:40:50 -0500 Subject: feat: add privacy policy link and global swipe actions toggle to Settings --- Hutch/Views/Settings/SettingsView.swift | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'Hutch/Views/Settings') 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() @@ -382,6 +384,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 { @@ -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") { -- cgit v1.2.3