Skip to content

Commit ae36b3f

Browse files
authored
Update set-as-default onboarding illustration for dark mode (duckduckgo#2694)
1 parent 161bad3 commit ae36b3f

File tree

12 files changed

+234
-108
lines changed

12 files changed

+234
-108
lines changed

DuckDuckGo.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@
318318
6AC6DAB328804F97002723C0 /* BarsAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AC6DAB228804F97002723C0 /* BarsAnimator.swift */; };
319319
6AC98419288055C1005FA9CA /* BarsAnimatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AC98418288055C1005FA9CA /* BarsAnimatorTests.swift */; };
320320
6F655BE22BAB289E00AC3597 /* DefaultTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F655BE12BAB289E00AC3597 /* DefaultTheme.swift */; };
321+
6F8496412BC3D8EE00ADA54E /* OnboardingButtonsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F8496402BC3D8EE00ADA54E /* OnboardingButtonsView.swift */; };
321322
6FDA1FB32B59584400AC962A /* AddressDisplayHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FDA1FB22B59584400AC962A /* AddressDisplayHelper.swift */; };
322323
83004E802193BB8200DA013C /* WKNavigationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83004E7F2193BB8200DA013C /* WKNavigationExtension.swift */; };
323324
83004E862193E5ED00DA013C /* TabViewControllerBrowsingMenuExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83004E852193E5ED00DA013C /* TabViewControllerBrowsingMenuExtension.swift */; };
@@ -1433,6 +1434,7 @@
14331434
6AC6DAB228804F97002723C0 /* BarsAnimator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BarsAnimator.swift; sourceTree = "<group>"; };
14341435
6AC98418288055C1005FA9CA /* BarsAnimatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BarsAnimatorTests.swift; sourceTree = "<group>"; };
14351436
6F655BE12BAB289E00AC3597 /* DefaultTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultTheme.swift; sourceTree = "<group>"; };
1437+
6F8496402BC3D8EE00ADA54E /* OnboardingButtonsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingButtonsView.swift; sourceTree = "<group>"; };
14361438
6FB030C7234331B400A10DB9 /* Configuration.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Configuration.xcconfig; path = Configuration/Configuration.xcconfig; sourceTree = "<group>"; };
14371439
6FDA1FB22B59584400AC962A /* AddressDisplayHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressDisplayHelper.swift; sourceTree = "<group>"; };
14381440
83004E7F2193BB8200DA013C /* WKNavigationExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WKNavigationExtension.swift; sourceTree = "<group>"; };
@@ -5400,6 +5402,7 @@
54005402
F4B0B795252CB35700830156 /* OnboardingWidgetsDetailsViewController.swift */,
54015403
851B128B2220483A004781BC /* OnboardingViewController.swift */,
54025404
F47E53DA250A9A1C0037C686 /* Onboarding.xcassets */,
5405+
6F8496402BC3D8EE00ADA54E /* OnboardingButtonsView.swift */,
54035406
);
54045407
name = Onboarding;
54055408
sourceTree = "<group>";
@@ -6612,6 +6615,7 @@
66126615
D6E83C2E2B1EA06E006C8AFB /* SettingsViewModel.swift in Sources */,
66136616
8590CB612684D0600089F6BF /* CookieDebugViewController.swift in Sources */,
66146617
319A37152829A55F0079FBCE /* AutofillListItemTableViewCell.swift in Sources */,
6618+
6F8496412BC3D8EE00ADA54E /* OnboardingButtonsView.swift in Sources */,
66156619
1EA513782866039400493C6A /* TrackerAnimationLogic.swift in Sources */,
66166620
854A01332A558B3A00FCC628 /* UIView+Constraints.swift in Sources */,
66176621
C12726EE2A5FF88C00215B02 /* EmailSignupPromptView.swift in Sources */,

DuckDuckGo/Base.lproj/Onboarding.storyboard

Lines changed: 25 additions & 69 deletions
Large diffs are not rendered by default.

DuckDuckGo/DaxOnboardingPadViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class DaxOnboardingPadViewController: UIViewController, Onboarding {
2727
if let navController = segue.destination as? UINavigationController,
2828
let onboarding = navController.viewControllers.first as? OnboardingViewController {
2929
onboarding.delegate = delegate
30+
self.view.backgroundColor = onboarding.view.backgroundColor
3031
}
3132
}
3233

DuckDuckGo/Onboarding.xcassets/OnboardingDefaultBrowserImage.imageset/Contents.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"images" : [
33
{
4-
"filename" : "illustration.pdf",
4+
"filename" : "Default-Browser.svg",
55
"idiom" : "universal"
66
}
77
],
Lines changed: 33 additions & 0 deletions
Loading
Binary file not shown.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
//
2+
// OnboardingButtonsView.swift
3+
// DuckDuckGo
4+
//
5+
// Copyright © 2024 DuckDuckGo. All rights reserved.
6+
//
7+
// Licensed under the Apache License, Version 2.0 (the "License");
8+
// you may not use this file except in compliance with the License.
9+
// You may obtain a copy of the License at
10+
//
11+
// http://www.apache.org/licenses/LICENSE-2.0
12+
//
13+
// Unless required by applicable law or agreed to in writing, software
14+
// distributed under the License is distributed on an "AS IS" BASIS,
15+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
// See the License for the specific language governing permissions and
17+
// limitations under the License.
18+
//
19+
20+
import SwiftUI
21+
import DuckUI
22+
23+
struct OnboardingActions: View {
24+
25+
@ObservedObject var viewModel: Model
26+
27+
var primaryAction: (() -> Void)?
28+
var secondaryAction: (() -> Void)?
29+
30+
var body: some View {
31+
VStack(spacing: 8) {
32+
Button(action: {
33+
self.primaryAction?()
34+
}, label: {
35+
Text(viewModel.primaryButtonTitle)
36+
})
37+
.buttonStyle(PrimaryButtonStyle())
38+
.disabled(!viewModel.isContinueEnabled)
39+
40+
Button(action: {
41+
self.secondaryAction?()
42+
}, label: {
43+
Text(viewModel.secondaryButtonTitle)
44+
})
45+
.buttonStyle(GhostButtonStyle())
46+
}
47+
}
48+
}
49+
50+
extension OnboardingActions {
51+
class Model: ObservableObject {
52+
@Published var primaryButtonTitle = ""
53+
@Published var secondaryButtonTitle = ""
54+
@Published var isContinueEnabled = true
55+
}
56+
}

DuckDuckGo/OnboardingDefaultBroswerViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import UIKit
2121
import Core
2222

2323
class OnboardingDefaultBroswerViewController: OnboardingContentViewController {
24-
24+
2525
override var header: String {
2626
return UserText.onboardingDefaultBrowserTitle
2727
}

0 commit comments

Comments
 (0)