From 330bbd050283585e06d1d5a155f8927f19f735e8 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 20 Dec 2024 09:10:54 -0800 Subject: [PATCH] macos: add "Docs" button to the About window --- macos/Sources/Features/About/AboutView.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/macos/Sources/Features/About/AboutView.swift b/macos/Sources/Features/About/AboutView.swift index d9372aa15..a011984d4 100644 --- a/macos/Sources/Features/About/AboutView.swift +++ b/macos/Sources/Features/About/AboutView.swift @@ -4,6 +4,7 @@ struct AboutView: View { @Environment(\.openURL) var openURL private let githubURL = URL(string: "https://github.com/ghostty-org/ghostty") + private let docsURL = URL(string: "https://ghostty.org/docs") /// Read the commit from the bundle. private var build: String? { Bundle.main.infoDictionary?["CFBundleVersion"] as? String } @@ -77,12 +78,16 @@ struct AboutView: View { .frame(maxWidth: .infinity) HStack(spacing: 8) { + if let url = docsURL { + Button("Docs") { + openURL(url) + } + } if let url = githubURL { Button("GitHub") { openURL(url) } } - } if let copy = self.copyright {