summaryrefslogtreecommitdiff
path: root/Hutch/Views/Settings/SettingsView.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-14 10:42:05 -0500
committerChristian Cleberg <[email protected]>2026-04-14 10:42:05 -0500
commit205c8ea9b2c6dfa62bc8b2342d1aa71e2da7d6ac (patch)
treee7e9b8190ffc15d3cd3e696da4c8acf8c472a193 /Hutch/Views/Settings/SettingsView.swift
parentd6968ea122d910b432bd539cf2fa3d1cee962fdb (diff)
downloadhutch-205c8ea9b2c6dfa62bc8b2342d1aa71e2da7d6ac.tar.gz
hutch-205c8ea9b2c6dfa62bc8b2342d1aa71e2da7d6ac.tar.bz2
hutch-205c8ea9b2c6dfa62bc8b2342d1aa71e2da7d6ac.zip
fix: remove prototype screens from developer menuv3.1.6
- removed prototype screens - limited Recent section to 3 items - added initial support for tips Fixes: https://todo.sr.ht/~ccleberg/hutch/65
Diffstat (limited to 'Hutch/Views/Settings/SettingsView.swift')
-rw-r--r--Hutch/Views/Settings/SettingsView.swift134
1 files changed, 0 insertions, 134 deletions
diff --git a/Hutch/Views/Settings/SettingsView.swift b/Hutch/Views/Settings/SettingsView.swift
index 577de8a..0046f92 100644
--- a/Hutch/Views/Settings/SettingsView.swift
+++ b/Hutch/Views/Settings/SettingsView.swift
@@ -14,7 +14,6 @@ struct SettingsView: View {
appearanceSection()
behaviorSection()
authenticationSection()
- aboutSection()
}
.themedList()
.navigationTitle("Settings")
@@ -142,17 +141,6 @@ struct SettingsView: View {
}
}
- @ViewBuilder
- private func aboutSection() -> some View {
- Section("App") {
- NavigationLink {
- AboutView()
- } label: {
- SwiftUI.Label("About Hutch", systemImage: "info.circle")
- }
- .themedRow()
- }
- }
}
func settingsBioAttributedString(_ markdown: String) -> AttributedString {
@@ -191,125 +179,3 @@ private enum SettingsDestructiveAction {
}
}
-private struct AboutView: View {
- @Environment(AppState.self) private var appState
- private let appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String
- ?? Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String
- ?? "Hutch"
- private let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String
- ?? "Unknown"
- private let build = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String
- ?? "Unknown"
- @State private var developerRevealCount = 0
-
- private var developerToolsVisible: Bool {
- appState.isDebugModeEnabled || developerRevealCount >= 5
- }
-
- private var developerRevealFooterText: String {
- developerRevealCount >= 5
- ? "Debug toggle unlocked. Scroll down to Developer to enable it."
- : "Tap the build number 5 times to reveal the debug toggle."
- }
-
- var body: some View {
- Form {
- Section {
- VStack(alignment: .leading, spacing: 6) {
- Text(appName)
- .font(.title2.weight(.semibold))
- Text("A native SourceHut client for iOS.")
- .font(.subheadline)
- .foregroundStyle(.secondary)
- }
- .padding(.vertical, 4)
- .themedRow()
-
- LabeledContent("Version", value: version)
- .onTapGesture {
- developerRevealCount = min(developerRevealCount + 1, 5)
- }
- .themedRow()
- LabeledContent("Build", value: build)
- .onTapGesture {
- developerRevealCount = min(developerRevealCount + 1, 5)
- }
- .themedRow()
- } footer: {
- Text(developerRevealFooterText)
- }
-
- Section("Links") {
- Link(destination: URL(string: "https://sr.ht")!) {
- SwiftUI.Label("SourceHut", systemImage: "link")
- }
- .themedRow()
- Link(destination: URL(string: "https://man.sr.ht")!) {
- SwiftUI.Label("SourceHut Manuals", systemImage: "book")
- }
- .themedRow()
- Link(destination: URL(string: "https://sr.ht/~ccleberg/Hutch")!) {
- SwiftUI.Label("Project Repository", systemImage: "folder")
- }
- .themedRow()
- }
-
- Section("Support") {
- Link(destination: URL(string: "mailto:[email protected]")!) {
- SwiftUI.Label("Email Support", systemImage: "envelope")
- }
- .themedRow()
- }
-
- Section("Privacy") {
- 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)
- .themedRow()
-
- Link(destination: URL(string: "https://zerolabs.sh/hutch/privacy-policy/")!) {
- SwiftUI.Label("Privacy Policy", systemImage: "hand.raised")
- }
- .themedRow()
- }
-
- Section("Acknowledgements") {
- Text("Built for SourceHut users who want quick access to repositories, builds, and tickets on iOS.")
- .font(.subheadline)
- .foregroundStyle(.secondary)
- .themedRow()
- }
-
- if developerToolsVisible {
- Section {
- Toggle("Debug Mode", isOn: Binding(
- get: { appState.isDebugModeEnabled },
- set: { appState.isDebugModeEnabled = $0 }
- ))
- .themedRow()
-
- NavigationLink {
- HomePrototypeView()
- } label: {
- SwiftUI.Label("Home Prototype", systemImage: "house")
- }
- .themedRow()
-
- NavigationLink {
- WorkPrototypeView()
- } label: {
- SwiftUI.Label("Work Prototype", systemImage: "tray.full")
- }
- .themedRow()
- } header: {
- Text("Developer")
- } footer: {
- Text("Shows raw API payloads and diagnostic details on builds and tickets screens. Home Prototype explores the dashboard structure, while Work Prototype evaluates the personal queue surface. This stays hidden until explicitly enabled.")
- }
- }
- }
- .themedList()
- .navigationTitle("About")
- .navigationBarTitleDisplayMode(.inline)
- }
-}