diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift index 5f86e102f..cf9273d20 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift @@ -58,6 +58,7 @@ import Views struct ProfileView: View { @EnvironmentObject var authenticator: Authenticator @EnvironmentObject var dataService: DataService + @Environment(\.openURL) var openURL @StateObject private var viewModel = ProfileContainerViewModel() @@ -119,6 +120,22 @@ struct ProfileView: View { #endif Section { + Button( + action: { + if let url = URL(string: "https://docs.omnivore.app") { + openURL(url) + } + }, + label: { Text(LocalText.documentationGeneric) } + ) + + #if os(iOS) + Button( + action: { DataService.showIntercomMessenger?() }, + label: { Text(LocalText.feedbackGeneric) } + ) + #endif + NavigationLink( destination: BasicWebAppView.privacyPolicyWebView(baseURL: dataService.appEnvironment.webAppBaseURL) ) { @@ -130,13 +147,6 @@ struct ProfileView: View { ) { Text(LocalText.termsAndConditionsGeneric) } - - #if os(iOS) - Button( - action: { DataService.showIntercomMessenger?() }, - label: { Text(LocalText.feedbackGeneric) } - ) - #endif } Section(footer: Text(viewModel.appVersionString)) { diff --git a/apple/OmnivoreKit/Sources/Views/LocalText.swift b/apple/OmnivoreKit/Sources/Views/LocalText.swift index b4382db02..74c72257b 100644 --- a/apple/OmnivoreKit/Sources/Views/LocalText.swift +++ b/apple/OmnivoreKit/Sources/Views/LocalText.swift @@ -188,4 +188,5 @@ public enum LocalText { public static let pushNotificationsGeneric = localText(key: "pushNotificationsGeneric") public static let dismissButton = localText(key: "dismissButton") public static let errorNetwork = localText(key: "errorNetwork") + public static let documentationGeneric = localText(key: "documentationGeneric") } diff --git a/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings b/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings index 5b521c4f4..78d009711 100644 --- a/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings +++ b/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings @@ -192,6 +192,7 @@ "pushNotificationsGeneric" = "Push Notifications"; "dismissButton" = "Dismiss"; "errorNetwork" = "We are having trouble connecting to the internet."; +"documentationGeneric" = "Documentation"; // TODO: search navigationTitle, toggle, section, button, Label, title: ", CreateProfileViewModel, TextField, .keyboardShortcut diff --git a/apple/OmnivoreKit/Sources/Views/Resources/zh-Hans.lproj/Localizable.strings b/apple/OmnivoreKit/Sources/Views/Resources/zh-Hans.lproj/Localizable.strings index 40169cd31..2d30bb7fa 100644 --- a/apple/OmnivoreKit/Sources/Views/Resources/zh-Hans.lproj/Localizable.strings +++ b/apple/OmnivoreKit/Sources/Views/Resources/zh-Hans.lproj/Localizable.strings @@ -192,7 +192,7 @@ "pushNotificationsGeneric" = "推送通知"; "dismissButton" = "撤回"; "errorNetwork" = "我们在连接到互联网时遇到问题."; - +"documentationGeneric" = "文档"; // Unreferenced // "signInScreenHeadline" = "保存并分享喜爱的网页.";