aboutsummaryrefslogtreecommitdiff
path: root/Hotline
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2024-01-18 11:33:54 -0800
committerDustin Mierau <dustin@mierau.me>2024-01-18 11:33:54 -0800
commit1ef83d2f20daa90ea34cb6867ea08d122c1be074 (patch)
treeb2b63b61f3acf1285d97d98aec7d8268910c8d27 /Hotline
parent184eeb7c873f91b9361f89cec27a999df41f1ab4 (diff)
Add Request Feature and Report Bug menu items to Help menu in macOS that link to GitHub issues with appropriate labels preselected.
Diffstat (limited to 'Hotline')
-rw-r--r--Hotline/Application.swift14
1 files changed, 14 insertions, 0 deletions
diff --git a/Hotline/Application.swift b/Hotline/Application.swift
index a8b4098..bf484ba 100644
--- a/Hotline/Application.swift
+++ b/Hotline/Application.swift
@@ -10,6 +10,7 @@ struct Application: App {
#if os(macOS)
@Environment(\.openWindow) private var openWindow
+ @Environment(\.openURL) private var openURL
#endif
@State private var preferences = Prefs()
@@ -55,6 +56,19 @@ struct Application: App {
}
.keyboardShortcut(.init("K"), modifiers: .command)
}
+ CommandGroup(after: .help) {
+ Divider()
+ Button("Request Feature...") {
+ if let url = URL(string: "https://github.com/mierau/hotline/issues/new?labels=enhancement") {
+ openURL(url)
+ }
+ }
+ Button("Report Bug...") {
+ if let url = URL(string: "https://github.com/mierau/hotline/issues/new?labels=bug") {
+ openURL(url)
+ }
+ }
+ }
CommandMenu("Server") {
Button("Disconnect") {
activeHotline?.disconnect()