Skip to content

Commit

Permalink
WIP changes for the waitlist.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsymons committed Nov 1, 2023
1 parent cc1a50b commit 546882f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 35 deletions.
20 changes: 13 additions & 7 deletions DuckDuckGo/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class SettingsViewController: UITableViewController {
private lazy var shouldShowNetPCell: Bool = {
#if NETWORK_PROTECTION
if #available(iOS 15, *) {
return featureFlagger.isFeatureOn(.networkProtection)
return true // featureFlagger.isFeatureOn(.networkProtection)
} else {
return false
}
Expand Down Expand Up @@ -421,14 +421,20 @@ class SettingsViewController: UITableViewController {
#if NETWORK_PROTECTION
@available(iOS 15, *)
private func showNetP() {
// This will be tidied up as part of https://app.asana.com/0/0/1205084446087078/f
let rootViewController = NetworkProtectionRootViewController { [weak self] in
self?.navigationController?.popViewController(animated: true)
let newRootViewController = NetworkProtectionRootViewController()
self?.pushNetP(newRootViewController)
if NetworkProtectionKeychainTokenStore().isFeatureActivated {
// This will be tidied up as part of https://app.asana.com/0/0/1205084446087078/f
let rootViewController = NetworkProtectionRootViewController { [weak self] in
self?.navigationController?.popViewController(animated: true)
let newRootViewController = NetworkProtectionRootViewController()
self?.pushNetP(newRootViewController)
}

pushNetP(rootViewController)
} else {
navigationController?.pushViewController(VPNWaitlistViewController(nibName: nil, bundle: nil), animated: true)
}
pushNetP(rootViewController)
}

@available(iOS 15, *)
private func pushNetP(_ rootViewController: NetworkProtectionRootViewController) {
navigationController?.pushViewController(
Expand Down
3 changes: 2 additions & 1 deletion DuckDuckGo/VPNWaitlist.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ final class VPNWaitlist: Waitlist {
let waitlistStorage: WaitlistStorage
let waitlistRequest: WaitlistRequest

init(store: WaitlistStorage, request: WaitlistRequest,
init(store: WaitlistStorage,
request: WaitlistRequest,
privacyConfigurationManager: PrivacyConfigurationManaging = ContentBlocking.shared.privacyConfigurationManager) {
self.waitlistStorage = store
self.waitlistRequest = request
Expand Down
28 changes: 3 additions & 25 deletions DuckDuckGo/VPNWaitlistView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ struct VPNWaitlistSignUpView: View {
GeometryReader { proxy in
ScrollView {
VStack(alignment: .center, spacing: 8) {
HeaderView(imageName: "WindowsWaitlistJoinWaitlist", title: UserText.windowsWaitlistTryDuckDuckGoForWindows)
HeaderView(imageName: "WindowsWaitlistJoinWaitlist", title: "Title")

Text(UserText.windowsWaitlistSummary)
Text("Summary")
.daxBodyRegular()
.foregroundColor(.waitlistTextSecondary)
.multilineTextAlignment(.center)
Expand All @@ -83,29 +83,7 @@ struct VPNWaitlistSignUpView: View {
.padding(.top, 14)
}

Spacer(minLength: 24)

Button(
action: {
action(.custom(.openMacBrowserWaitlist))
}, label: {
Text(UserText.windowsWaitlistMac)
.daxHeadline()
.foregroundColor(.waitlistBlue)
.multilineTextAlignment(.center)
.lineSpacing(5)
}
)
.padding(.bottom, 12)
.fixedSize(horizontal: false, vertical: true)

Text(UserText.waitlistPrivacyDisclaimer)
.daxFootnoteRegular()
.foregroundColor(.waitlistTextSecondary)
.multilineTextAlignment(.center)
.lineSpacing(5)
.padding(.bottom, 12)
.fixedSize(horizontal: false, vertical: true)
Spacer()
}
.padding([.leading, .trailing], 24)
.frame(minHeight: proxy.size.height)
Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo/VPNWaitlistViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ final class VPNWaitlistViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

title = "VPN Waitlist"
title = "Network Protection Preview"

addHostingControllerToViewHierarchy()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public class ProductWaitlistRequest: WaitlistRequest {

private var endpoint: URL {
#if DEBUG
return URL(string: "https://quackdev.duckduckgo.com/api/auth/waitlist/")!
return URL(string: "https://quack.duckduckgo.com/api/auth/waitlist/")!
#else
return URL(string: "https://quack.duckduckgo.com/api/auth/waitlist/")!
#endif
Expand Down

0 comments on commit 546882f

Please sign in to comment.