From cdee36c21bd3ffb29fd541662a8a934bcf3a353a Mon Sep 17 00:00:00 2001 From: Graeme Arthur <2030310+graeme@users.noreply.github.com> Date: Fri, 28 Jul 2023 13:24:34 +0200 Subject: [PATCH] Update NetP settings item to match design (#1861) Task/Issue URL: https://app.asana.com/0/0/1205084446087077/f Description: For iOS: Update NetworkProtection package to support iOS we added a settings menu item to access NetP but it was done to a speculative design and with the incorrect fonts. This task should: Update the fonts to match the other settings items Show Connected or Not connected depending on the PacketTunnelProvider`s status. For the designs, check https://app.asana.com/0/0/1205084446087077/f --- DuckDuckGo.xcodeproj/project.pbxproj | 12 + DuckDuckGo/Base.lproj/Settings.storyboard | 258 +++++++++--------- ...orkProtectionConvenienceInitialisers.swift | 32 +++ .../NetworkProtectionTunnelController.swift | 9 +- DuckDuckGo/SettingsViewController.swift | 31 ++- DuckDuckGo/UserText.swift | 2 + DuckDuckGo/en.lproj/Localizable.strings | 6 + 7 files changed, 211 insertions(+), 139 deletions(-) create mode 100644 DuckDuckGo/NetworkProtectionConvenienceInitialisers.swift diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index f595571e3a..71128d62ce 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -724,6 +724,7 @@ CBDD5DE129A6741300832877 /* MockBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBDD5DE029A6741300832877 /* MockBundle.swift */; }; EA39B7E2268A1A35000C62CD /* privacy-reference-tests in Resources */ = {isa = PBXBuildFile; fileRef = EA39B7E1268A1A35000C62CD /* privacy-reference-tests */; }; EAB19EDA268963510015D3EA /* DomainMatchingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB19ED9268963510015D3EA /* DomainMatchingTests.swift */; }; + EE0153E12A6EABE0002A8B26 /* NetworkProtectionConvenienceInitialisers.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE0153E02A6EABE0002A8B26 /* NetworkProtectionConvenienceInitialisers.swift */; }; EE3B226B29DE0F110082298A /* MockInternalUserStoring.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE3B226A29DE0F110082298A /* MockInternalUserStoring.swift */; }; EE3B226C29DE0FD30082298A /* MockInternalUserStoring.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE3B226A29DE0F110082298A /* MockInternalUserStoring.swift */; }; EE4FB1862A28CE7200E5CBA7 /* NetworkProtectionStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE4FB1852A28CE7200E5CBA7 /* NetworkProtectionStatusView.swift */; }; @@ -2279,6 +2280,7 @@ CBF14FC627970C8A001D94D0 /* HomeMessageCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeMessageCollectionViewCell.swift; sourceTree = ""; }; EA39B7E1268A1A35000C62CD /* privacy-reference-tests */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "privacy-reference-tests"; path = "submodules/privacy-reference-tests"; sourceTree = SOURCE_ROOT; }; EAB19ED9268963510015D3EA /* DomainMatchingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DomainMatchingTests.swift; sourceTree = ""; }; + EE0153E02A6EABE0002A8B26 /* NetworkProtectionConvenienceInitialisers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionConvenienceInitialisers.swift; sourceTree = ""; }; EE3B226A29DE0F110082298A /* MockInternalUserStoring.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockInternalUserStoring.swift; sourceTree = ""; }; EE4FB1852A28CE7200E5CBA7 /* NetworkProtectionStatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionStatusView.swift; sourceTree = ""; }; EE4FB1872A28D11900E5CBA7 /* NetworkProtectionStatusViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionStatusViewModel.swift; sourceTree = ""; }; @@ -4218,6 +4220,14 @@ name = PrivacyReferenceTests; sourceTree = ""; }; + EE0153DF2A6EABAF002A8B26 /* Helpers */ = { + isa = PBXGroup; + children = ( + EE0153E02A6EABE0002A8B26 /* NetworkProtectionConvenienceInitialisers.swift */, + ); + name = Helpers; + sourceTree = ""; + }; EE3B226929DE0EE10082298A /* FeatureFlags */ = { isa = PBXGroup; children = ( @@ -4247,6 +4257,7 @@ EECD94B22A28B8580085C66E /* NetworkProtection */ = { isa = PBXGroup; children = ( + EE0153DF2A6EABAF002A8B26 /* Helpers */, EEFD562D2A65B68B00DAEC48 /* Invite */, EECD94B32A28B96C0085C66E /* Status */, EE8594982A44791C008A6D06 /* NetworkProtectionTunnelController.swift */, @@ -5972,6 +5983,7 @@ 1E8AD1C927BFAD1500ABA377 /* DirectoryMonitor.swift in Sources */, 1E8AD1D127C000AB00ABA377 /* OngoingDownloadRow.swift in Sources */, 85058366219AE9EA00ED4EDB /* HomePageConfiguration.swift in Sources */, + EE0153E12A6EABE0002A8B26 /* NetworkProtectionConvenienceInitialisers.swift in Sources */, C17B595B2A03AAD30055F2D1 /* PasswordGenerationPromptView.swift in Sources */, 98AA92B32456FBE100ED4B9E /* SearchFieldContainerView.swift in Sources */, 3157B43827F4C8490042D3D7 /* FaviconsHelper.swift in Sources */, diff --git a/DuckDuckGo/Base.lproj/Settings.storyboard b/DuckDuckGo/Base.lproj/Settings.storyboard index 5d7d393a39..bccbbaeb3e 100644 --- a/DuckDuckGo/Base.lproj/Settings.storyboard +++ b/DuckDuckGo/Base.lproj/Settings.storyboard @@ -3,7 +3,7 @@ - + @@ -31,7 +31,7 @@ @@ -55,7 +55,7 @@ @@ -79,7 +79,7 @@ @@ -110,7 +110,7 @@ - + @@ -138,7 +138,7 @@ - + @@ -161,16 +161,16 @@ @@ -193,7 +193,7 @@ - + @@ -233,17 +233,17 @@ @@ -354,7 +354,7 @@ - + @@ -396,7 +396,7 @@ @@ -419,7 +419,7 @@ - + @@ -463,7 +463,7 @@ - + @@ -507,7 +507,7 @@ - + @@ -547,7 +547,7 @@ @@ -565,16 +565,16 @@ -