add eula and privacy buttons

This commit is contained in:
Trey t
2022-12-27 14:52:01 -06:00
parent 86c64c51c9
commit 384a57a4bd
2 changed files with 37 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ import StoreKit
struct SettingsView: View {
@Environment(\.dismiss) var dismiss
@Environment(\.openURL) var openURL
@EnvironmentObject var iapManager: IAPManager
@State private var showingExporter = false
@@ -41,6 +42,8 @@ struct SettingsView: View {
subscriptionInfoView
canDelete
showOnboardingButton
eulaButton
privacyButton
// specialThanksCell
}
@@ -339,6 +342,38 @@ struct SettingsView: View {
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
}
private var eulaButton: some View {
ZStack {
theme.currentTheme.secondaryBGColor
Button(action: {
EventLogger.log(event: "show_eula")
openURL(URL(string: "https://ifeels.app/eula.html")!)
}, label: {
Text(String(localized: "settings_view_show_eula"))
.foregroundColor(textColor)
})
.padding()
}
.fixedSize(horizontal: false, vertical: true)
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
}
private var privacyButton: some View {
ZStack {
theme.currentTheme.secondaryBGColor
Button(action: {
EventLogger.log(event: "show_privacy")
openURL(URL(string: "https://ifeels.app/privacy.html")!)
}, label: {
Text(String(localized: "settings_view_show_privacy"))
.foregroundColor(textColor)
})
.padding()
}
.fixedSize(horizontal: false, vertical: true)
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
}
private var cloudKitEnable: some View {
ZStack {
theme.currentTheme.secondaryBGColor

View File

@@ -49,6 +49,8 @@
"settings_view_special_thanks_to_title" = "Special thanks";
"settings_view_show_onboarding" = "Show onboarding";
"settings_use_delete_enable" = "Allow deletion of entry";
"settings_view_show_eula" = "EULA";
"settings_view_show_privacy" = "Privacy Policy";
"mood_value_great" = "Great";
"mood_value_good" = "Good";