diff options
Diffstat (limited to 'iGopherBrowser/BrowserView.swift')
-rw-r--r-- | iGopherBrowser/BrowserView.swift | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/iGopherBrowser/BrowserView.swift b/iGopherBrowser/BrowserView.swift index f745fc8..29c28d0 100644 --- a/iGopherBrowser/BrowserView.swift +++ b/iGopherBrowser/BrowserView.swift @@ -369,11 +369,18 @@ struct BrowserView: View { .autocapitalization(.none) #endif .padding(10) - Spacer() } //.background(Color.white) .cornerRadius(30) - + if (shareThroughProxy) { + ShareLink(item: URL(string: "https://gopher.navan.dev/\(url)")!) { + Label("Share", systemImage: "square.and.arrow.up").labelStyle(.iconOnly) + } + } else { + ShareLink(item: URL(string: "gopher://\(url)")!) { + Label("Share", systemImage: "square.and.arrow.up").labelStyle(.iconOnly) + } + } Button( "Go", action: { @@ -395,6 +402,10 @@ struct BrowserView: View { performGopherRequest(host: node.host, port: node.port, selector: node.selector) } } + .onOpenURL { gopherURL in + self.url = gopherURL.absoluteString + performGopherRequest() + } .sheet( isPresented: $showPreferences, onDismiss: { |