Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrivacyPro terms of service link #2907

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions DuckDuckGo/SettingsSubscriptionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ struct SettingsSubscriptionView: View {
@State var isShowingStripeView = false
@State var isShowingSubscriptionError = false
@State var isShowingPrivacyPro = false

enum Constants {
static let purchaseDescriptionPadding = 5.0
static let topCellPadding = 3.0
static let noEntitlementsIconWidth = 20.0
static let navigationDelay = 0.3
static let infoIcon = "info-16"
static let alertIcon = "Exclamation-Color-16"

static let privacyPolicyURL = URL(string: "https://duckduckgo.com/pro/privacy-terms")!
}

private var subscriptionDescriptionView: some View {
Expand Down Expand Up @@ -214,9 +216,12 @@ struct SettingsSubscriptionView: View {
var body: some View {
Group {
if isShowingPrivacyPro {

Section(header: Text(UserText.settingsPProSection)) {

let footerLink = Link(UserText.settingsPProSectionFooter,
destination: Constants.privacyPolicyURL
).daxFootnoteRegular().accentColor(Color.init(designSystemColor: .accent))

Section(header: Text(UserText.settingsPProSection), footer: footerLink) {

switch (
viewModel.state.subscription.isSignedIn,
viewModel.state.subscription.hasActiveSubscription,
Expand Down Expand Up @@ -253,7 +258,7 @@ struct SettingsSubscriptionView: View {
isShowingSubscribeFlow = false
}
}

}
}.onReceive(viewModel.$state) { state in
if state.subscription.enabled && state.subscription.canPurchase {
Expand Down
2 changes: 2 additions & 0 deletions DuckDuckGo/UserText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,8 @@ But if you *do* want a peek under the hood, you can find more information about

// Subscription Section
public static let settingsPProSection = NSLocalizedString("settings.ppro", value: "Privacy Pro", comment: "Product name for the subscription bundle")
public static let settingsPProSectionFooter = NSLocalizedString("settings.ppro.footer", value: "Privacy Policy and Terms of Service", comment: "Title for Link in the Footer of Privacy Pro section")

public static let settingsPProSubscribe = NSLocalizedString("settings.subscription.subscribe", value: "Subscribe to Privacy Pro", comment: "Call to action title for Privacy Pro")
public static let settingsPProDescription = NSLocalizedString("settings.subscription.description", value:"More seamless privacy with three new protections:", comment: "Privacy pro description subtext")
public static let settingsPProFeatures = NSLocalizedString("settings.subscription.features", value:
Expand Down
3 changes: 3 additions & 0 deletions DuckDuckGo/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1871,6 +1871,9 @@ But if you *do* want a peek under the hood, you can find more information about
/* Product name for the subscription bundle */
"settings.ppro" = "Privacy Pro";

/* Title for Link in the Footer of Privacy Pro section */
"settings.ppro.footer" = "Privacy Policy and Terms of Service";

/* Settings screen cell for long press previews */
"settings.previews" = "Long-Press Previews";

Expand Down
Loading