Add "Visit Support Forum" item to Help menu

This commit is contained in:
Angelo Stavrow 2020-12-03 08:21:50 -05:00
parent b987ab703f
commit 5dc5108354
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

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)