From 5dc510835463fc9bbfa880e2ad790a8c8d10ca00 Mon Sep 17 00:00:00 2001 From: Angelo Stavrow Date: Thu, 3 Dec 2020 08:21:50 -0500 Subject: [PATCH] Add "Visit Support Forum" item to Help menu --- Shared/WriteFreely_MultiPlatformApp.swift | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Shared/WriteFreely_MultiPlatformApp.swift b/Shared/WriteFreely_MultiPlatformApp.swift index 4aeb385..fda2397 100644 --- a/Shared/WriteFreely_MultiPlatformApp.swift +++ b/Shared/WriteFreely_MultiPlatformApp.swift @@ -39,9 +39,16 @@ struct WriteFreely_MultiPlatformApp: App { .disabled(!model.account.isLoggedIn) .keyboardShortcut("r", modifiers: [.command]) } - #if os(macOS) 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)