Adds a settings button that loads MacOS Notification when user denies access

This commit is contained in:
Matt Kiazyk 2021-04-29 17:04:38 -05:00
parent 094bb6f0cc
commit 11e8fdecf8
No known key found for this signature in database
GPG key ID: 33D9938D5D45EFE2

View file

@ -11,8 +11,11 @@ struct NotificationsView: View {
Text("Access Granted. You will receive notifications from Xcodes.")
.fixedSize(horizontal: false, vertical: true)
case .shownAndDenied:
Text("⚠️ Access Denied ⚠️\n\nPlease open your Notification Settings if you wish to allow access.")
Text("⚠️ Access Denied ⚠️\n\nPlease open your Notification Settings and select Xcodes if you wish to allow access.")
.fixedSize(horizontal: false, vertical: true)
Button("Notification Settings", action: {
NSWorkspace.shared.open(URL(string: "x-apple.systempreferences:com.apple.preference.notifications")!)
})
default:
Button("Enable Notifications", action: {