add eula and privacy buttons
This commit is contained in:
@@ -12,6 +12,7 @@ import StoreKit
|
|||||||
|
|
||||||
struct SettingsView: View {
|
struct SettingsView: View {
|
||||||
@Environment(\.dismiss) var dismiss
|
@Environment(\.dismiss) var dismiss
|
||||||
|
@Environment(\.openURL) var openURL
|
||||||
@EnvironmentObject var iapManager: IAPManager
|
@EnvironmentObject var iapManager: IAPManager
|
||||||
|
|
||||||
@State private var showingExporter = false
|
@State private var showingExporter = false
|
||||||
@@ -41,6 +42,8 @@ struct SettingsView: View {
|
|||||||
subscriptionInfoView
|
subscriptionInfoView
|
||||||
canDelete
|
canDelete
|
||||||
showOnboardingButton
|
showOnboardingButton
|
||||||
|
eulaButton
|
||||||
|
privacyButton
|
||||||
// specialThanksCell
|
// specialThanksCell
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -339,6 +342,38 @@ struct SettingsView: View {
|
|||||||
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
.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 {
|
private var cloudKitEnable: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
theme.currentTheme.secondaryBGColor
|
theme.currentTheme.secondaryBGColor
|
||||||
|
|||||||
@@ -49,6 +49,8 @@
|
|||||||
"settings_view_special_thanks_to_title" = "Special thanks";
|
"settings_view_special_thanks_to_title" = "Special thanks";
|
||||||
"settings_view_show_onboarding" = "Show onboarding";
|
"settings_view_show_onboarding" = "Show onboarding";
|
||||||
"settings_use_delete_enable" = "Allow deletion of entry";
|
"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_great" = "Great";
|
||||||
"mood_value_good" = "Good";
|
"mood_value_good" = "Good";
|
||||||
|
|||||||
Reference in New Issue
Block a user