summaryrefslogtreecommitdiff
path: root/Hutch/Views/Settings/SafariExtensionHelpView.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-05-14 12:41:55 -0500
committerChristian Cleberg <[email protected]>2026-05-14 12:41:55 -0500
commit0d61e05e98f6f020722ee4d43f024c1da348d2a9 (patch)
treeb388972b86cf83de380381c52c4390c3beafc69a /Hutch/Views/Settings/SafariExtensionHelpView.swift
parentf28e5cee1643e3f99d7bf90476d1dcf9347229a0 (diff)
downloadhutch-3.4.0.tar.gz
hutch-3.4.0.tar.bz2
hutch-3.4.0.zip
feat: add Safari extension for sourcehut deep linksv3.4.0
Diffstat (limited to 'Hutch/Views/Settings/SafariExtensionHelpView.swift')
-rw-r--r--Hutch/Views/Settings/SafariExtensionHelpView.swift59
1 files changed, 59 insertions, 0 deletions
diff --git a/Hutch/Views/Settings/SafariExtensionHelpView.swift b/Hutch/Views/Settings/SafariExtensionHelpView.swift
new file mode 100644
index 0000000..5da1a3d
--- /dev/null
+++ b/Hutch/Views/Settings/SafariExtensionHelpView.swift
@@ -0,0 +1,59 @@
+import SwiftUI
+
+struct SafariExtensionHelpView: View {
+ private let supportedServices = [
+ "git.sr.ht",
+ "hg.sr.ht",
+ "todo.sr.ht",
+ "builds.sr.ht",
+ "lists.sr.ht",
+ "meta.sr.ht",
+ "sr.ht",
+ ]
+
+ var body: some View {
+ Form {
+ Section {
+ Text("Enable Open in Hutch from Settings > Apps > Safari > Extensions, then turn on Hutch and allow it for SourceHut websites.")
+ .font(.subheadline)
+ .foregroundStyle(.secondary)
+ .themedRow()
+ } header: {
+ Text("Enable")
+ }
+
+ Section("Supported Services") {
+ ForEach(supportedServices, id: \.self) { service in
+ Label(service, systemImage: "checkmark.circle")
+ .themedRow()
+ }
+ }
+
+ Section {
+ Text("The extension adds a Safari action named Open in Hutch. It converts supported SourceHut web URLs into Hutch deep links, then opens the matching screen in the app.")
+ .font(.subheadline)
+ .foregroundStyle(.secondary)
+ .themedRow()
+
+ Text("This is separate from Universal Links. Hutch cannot claim sr.ht links system-wide because those domains are owned by SourceHut and would need Apple App Site Association files hosted there.")
+ .font(.subheadline)
+ .foregroundStyle(.secondary)
+ .themedRow()
+ } header: {
+ Text("How It Works")
+ }
+
+ Section {
+ Text("Pages are never redirected automatically by default. The optional in-page Open in Hutch banner is off unless the extension setting is explicitly enabled.")
+ .font(.subheadline)
+ .foregroundStyle(.secondary)
+ .themedRow()
+ } header: {
+ Text("Privacy")
+ }
+ }
+ .themedList()
+ .navigationTitle("Safari Extension")
+ .navigationBarTitleDisplayMode(.inline)
+ }
+}