Merge pull request #148 from writeas/add-a-support-link-to-the-help-menu

Add "Visit Support Forum" item to Help menu
This commit is contained in:
Angelo Stavrow 2020-12-03 12:12:55 -05:00 committed by GitHub
commit 30ec1581ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,9 +39,16 @@ struct WriteFreely_MultiPlatformApp: App {
.disabled(!model.account.isLoggedIn) .disabled(!model.account.isLoggedIn)
.keyboardShortcut("r", modifiers: [.command]) .keyboardShortcut("r", modifiers: [.command])
} }
#if os(macOS)
SidebarCommands() SidebarCommands()
#endif CommandGroup(after: .help) {
Button("Visit Support Forum") {
#if os(macOS)
NSWorkspace().open(model.helpURL)
#else
UIApplication.shared.open(model.helpURL)
#endif
}
}
} }
#if os(macOS) #if os(macOS)