-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Privacy Protections and Main Settings
- Loading branch information
1 parent
3a25fe3
commit a375c39
Showing
66 changed files
with
616 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
// | ||
// WebTrackingProtectionView.swift | ||
// DuckDuckGo | ||
// | ||
// Copyright © 2017 DuckDuckGo. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import Core | ||
import SwiftUI | ||
import DesignResourcesKit | ||
|
||
struct CookiePopUpProtectionView: View { | ||
|
||
@EnvironmentObject var viewModel: SettingsViewModel | ||
|
||
var body: some View { | ||
List { | ||
CookiePopUpProtectionViewText() | ||
CookiePopUpProtectionViewSettings() | ||
} | ||
.applySettingsListModifiers(title: "Cookie Pop-Up Protection", | ||
displayMode: .inline, | ||
viewModel: viewModel) | ||
} | ||
} | ||
|
||
struct CookiePopUpProtectionViewText: View { | ||
|
||
@EnvironmentObject var viewModel: SettingsViewModel | ||
|
||
var body: some View { | ||
VStack(spacing: 8) { | ||
Image("CookiePopUpProtectionContent") | ||
.resizable() | ||
.frame(width: 128, height: 96) | ||
|
||
Text("Cookie Pop-Up Protection") | ||
.font(.title3) | ||
|
||
StatusIndicatorView(status: viewModel.cookiePopUpProtectionStatus) | ||
.padding(.top, -4) | ||
|
||
Text("When DuckDuckGo detects cookie pop-ups on sites you visit, we can automatically set your cookie preferences to minimize cookies and maximize privacy, then close pop-ups.\n[Learn More](ddgQuickLink://duckduckgo.com/duckduckgo-help-pages/privacy/web-tracking-protections/#cookie-pop-up-management)") | ||
.font(.system(size: 16)) | ||
.lineLimit(nil) | ||
.multilineTextAlignment(.center) | ||
.foregroundColor(.secondary) | ||
.tintIfAvailable(Color(designSystemColor: .accent)) | ||
.padding(.horizontal, 32) | ||
.padding(.top, 8) | ||
.padding(.bottom) | ||
|
||
Spacer() | ||
} | ||
.listRowInsets(EdgeInsets(top: -12, leading: -12, bottom: -12, trailing: -12)) | ||
.listRowBackground(Color(designSystemColor: .background).edgesIgnoringSafeArea(.all)) | ||
.frame(maxWidth: .infinity) | ||
} | ||
} | ||
|
||
struct CookiePopUpProtectionViewSettings: View { | ||
|
||
@EnvironmentObject var viewModel: SettingsViewModel | ||
|
||
var body: some View { | ||
Section { | ||
SettingsCellView(label: "Let DuckDuckGo manage cookie consent pop-ups", | ||
accesory: .toggle(isOn: viewModel.autoconsentBinding)) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// | ||
// PrivateSearchView.swift | ||
// DuckDuckGo | ||
// | ||
// Copyright © 2017 DuckDuckGo. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import Core | ||
import SwiftUI | ||
import DesignResourcesKit | ||
|
||
struct PrivateSearchView: View { | ||
|
||
@EnvironmentObject var viewModel: SettingsViewModel | ||
|
||
var body: some View { | ||
List { | ||
PrivateSearchViewText() | ||
PrivateSearchViewSettings() | ||
} | ||
.applySettingsListModifiers(title: "Private Search", | ||
displayMode: .inline, | ||
viewModel: viewModel) | ||
} | ||
} | ||
|
||
struct PrivateSearchViewText: View { | ||
|
||
var body: some View { | ||
VStack(spacing: 8) { | ||
Image("PrivateSearchContent") | ||
.resizable() | ||
.frame(width: 128, height: 96) | ||
|
||
Text("Private Search") | ||
.font(.title3) | ||
|
||
StatusIndicatorView(status: .alwaysOn) | ||
.padding(.top, -4) | ||
|
||
Text("DuckDuckGo Private Search is your default search engine, so you can search the web without being tracked.") | ||
.font(.system(size: 16)) | ||
.lineLimit(nil) | ||
.multilineTextAlignment(.center) | ||
.foregroundColor(.secondary) | ||
.tintIfAvailable(Color(designSystemColor: .accent)) | ||
.padding(.horizontal, 32) | ||
.padding(.top, 8) | ||
.padding(.bottom) | ||
|
||
Spacer() | ||
} | ||
.listRowInsets(EdgeInsets(top: -12, leading: -12, bottom: -12, trailing: -12)) | ||
.listRowBackground(Color(designSystemColor: .background).edgesIgnoringSafeArea(.all)) | ||
.frame(maxWidth: .infinity) | ||
} | ||
} | ||
|
||
struct PrivateSearchViewSettings: View { | ||
|
||
@EnvironmentObject var viewModel: SettingsViewModel | ||
|
||
var body: some View { | ||
Section(header: Text("Search Settings")) { | ||
SettingsCellView(label: UserText.settingsAutocomplete, | ||
accesory: .toggle(isOn: viewModel.autocompleteBinding)) | ||
SettingsCellView(label: "More Search Settings", | ||
subtitle: "Customize your language, region, and more", | ||
action: { viewModel.openMoreSearchSettings() }, | ||
disclosureIndicator: true, | ||
isButton: true) | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
DuckDuckGo/Settings.xcassets/Colors/AlertGreen.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0x00", | ||
"green" : "0xC0", | ||
"red" : "0x21" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
DuckDuckGo/Settings.xcassets/Images/CookiePopUpProtectionContent.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Cookie-Popups-128.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+9.65 KB
...ckGo/Settings.xcassets/Images/CookiePopUpProtectionContent.imageset/Cookie-Popups-128.pdf
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
DuckDuckGo/Settings.xcassets/Images/NetworkProtection.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "VPN-24-Multicolor.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+5.34 KB
DuckDuckGo/Settings.xcassets/Images/NetworkProtection.imageset/VPN-24-Multicolor.pdf
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
DuckDuckGo/Settings.xcassets/Images/PrivacyPro.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Privacy-Pro-24-Multicolor.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+4.56 KB
DuckDuckGo/Settings.xcassets/Images/PrivacyPro.imageset/Privacy-Pro-24-Multicolor.pdf
Binary file not shown.
Oops, something went wrong.