Add link to documentation, move feedback button above privacy/tos

This commit is contained in:
Jackson Harper
2023-01-26 13:51:08 +08:00
parent 68fcbae6dc
commit 8f532aa846
4 changed files with 20 additions and 8 deletions

View File

@ -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)) {

View File

@ -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")
}

View File

@ -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

View File

@ -192,7 +192,7 @@
"pushNotificationsGeneric" = "推送通知";
"dismissButton" = "撤回";
"errorNetwork" = "我们在连接到互联网时遇到问题.";
"documentationGeneric" = "文档";
// Unreferenced
// "signInScreenHeadline" = "保存并分享喜爱的网页.";