mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
Add bug report and feature request options to Help menu
This will support error messages that instruct the user to go to the Help menu for these things.
This commit is contained in:
parent
9a2057bcd5
commit
6b5a64010e
2 changed files with 22 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ import SwiftUI
|
|||
|
||||
struct AboutView: View {
|
||||
let showAcknowledgementsWindow: () -> Void
|
||||
@SwiftUI.Environment(\.openURL) var openURL: OpenURLAction
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
|
|
@ -18,7 +19,7 @@ struct AboutView: View {
|
|||
|
||||
HStack(spacing: 32) {
|
||||
Button(action: {
|
||||
NSWorkspace.shared.open(URL(string: "https://github.com/RobotsAndPencils/XcodesApp/")!)
|
||||
openURL(URL(string: "https://github.com/RobotsAndPencils/XcodesApp/")!)
|
||||
}) {
|
||||
Label("GitHub Repo", systemImage: "link")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import SwiftUI
|
|||
struct XcodesApp: App {
|
||||
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate: AppDelegate
|
||||
@SwiftUI.Environment(\.scenePhase) private var scenePhase: ScenePhase
|
||||
@SwiftUI.Environment(\.openURL) var openURL: OpenURLAction
|
||||
@StateObject private var appState = AppState()
|
||||
|
||||
var body: some Scene {
|
||||
|
|
@ -51,6 +52,25 @@ struct XcodesApp: App {
|
|||
}
|
||||
|
||||
XcodeCommands(appState: appState)
|
||||
|
||||
CommandGroup(replacing: CommandGroupPlacement.help) {
|
||||
Button("Xcodes GitHub Repo") {
|
||||
let xcodesRepoURL = URL(string: "https://github.com/RobotsAndPencils/XcodesApp/")!
|
||||
openURL(xcodesRepoURL)
|
||||
}
|
||||
|
||||
Divider()
|
||||
|
||||
Button("Report a Bug") {
|
||||
let bugReportURL = URL(string: "https://github.com/RobotsAndPencils/XcodesApp/issues/new?assignees=&labels=bug&template=bug_report.md&title=")!
|
||||
openURL(bugReportURL)
|
||||
}
|
||||
|
||||
Button("Request a New Feature") {
|
||||
let featureRequestURL = URL(string: "https://github.com/RobotsAndPencils/XcodesApp/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=")!
|
||||
openURL(featureRequestURL)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue