Skip to content

Commit

Permalink
Update set-as-default onboarding illustration for dark mode (#2694)
Browse files Browse the repository at this point in the history
  • Loading branch information
dus7 authored Apr 10, 2024
1 parent 161bad3 commit ae36b3f
Show file tree
Hide file tree
Showing 12 changed files with 234 additions and 108 deletions.
4 changes: 4 additions & 0 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@
6AC6DAB328804F97002723C0 /* BarsAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AC6DAB228804F97002723C0 /* BarsAnimator.swift */; };
6AC98419288055C1005FA9CA /* BarsAnimatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AC98418288055C1005FA9CA /* BarsAnimatorTests.swift */; };
6F655BE22BAB289E00AC3597 /* DefaultTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F655BE12BAB289E00AC3597 /* DefaultTheme.swift */; };
6F8496412BC3D8EE00ADA54E /* OnboardingButtonsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F8496402BC3D8EE00ADA54E /* OnboardingButtonsView.swift */; };
6FDA1FB32B59584400AC962A /* AddressDisplayHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FDA1FB22B59584400AC962A /* AddressDisplayHelper.swift */; };
83004E802193BB8200DA013C /* WKNavigationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83004E7F2193BB8200DA013C /* WKNavigationExtension.swift */; };
83004E862193E5ED00DA013C /* TabViewControllerBrowsingMenuExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83004E852193E5ED00DA013C /* TabViewControllerBrowsingMenuExtension.swift */; };
Expand Down Expand Up @@ -1433,6 +1434,7 @@
6AC6DAB228804F97002723C0 /* BarsAnimator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BarsAnimator.swift; sourceTree = "<group>"; };
6AC98418288055C1005FA9CA /* BarsAnimatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BarsAnimatorTests.swift; sourceTree = "<group>"; };
6F655BE12BAB289E00AC3597 /* DefaultTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultTheme.swift; sourceTree = "<group>"; };
6F8496402BC3D8EE00ADA54E /* OnboardingButtonsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingButtonsView.swift; sourceTree = "<group>"; };
6FB030C7234331B400A10DB9 /* Configuration.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Configuration.xcconfig; path = Configuration/Configuration.xcconfig; sourceTree = "<group>"; };
6FDA1FB22B59584400AC962A /* AddressDisplayHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressDisplayHelper.swift; sourceTree = "<group>"; };
83004E7F2193BB8200DA013C /* WKNavigationExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WKNavigationExtension.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -5400,6 +5402,7 @@
F4B0B795252CB35700830156 /* OnboardingWidgetsDetailsViewController.swift */,
851B128B2220483A004781BC /* OnboardingViewController.swift */,
F47E53DA250A9A1C0037C686 /* Onboarding.xcassets */,
6F8496402BC3D8EE00ADA54E /* OnboardingButtonsView.swift */,
);
name = Onboarding;
sourceTree = "<group>";
Expand Down Expand Up @@ -6612,6 +6615,7 @@
D6E83C2E2B1EA06E006C8AFB /* SettingsViewModel.swift in Sources */,
8590CB612684D0600089F6BF /* CookieDebugViewController.swift in Sources */,
319A37152829A55F0079FBCE /* AutofillListItemTableViewCell.swift in Sources */,
6F8496412BC3D8EE00ADA54E /* OnboardingButtonsView.swift in Sources */,
1EA513782866039400493C6A /* TrackerAnimationLogic.swift in Sources */,
854A01332A558B3A00FCC628 /* UIView+Constraints.swift in Sources */,
C12726EE2A5FF88C00215B02 /* EmailSignupPromptView.swift in Sources */,
Expand Down
94 changes: 25 additions & 69 deletions DuckDuckGo/Base.lproj/Onboarding.storyboard

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions DuckDuckGo/DaxOnboardingPadViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class DaxOnboardingPadViewController: UIViewController, Onboarding {
if let navController = segue.destination as? UINavigationController,
let onboarding = navController.viewControllers.first as? OnboardingViewController {
onboarding.delegate = delegate
self.view.backgroundColor = onboarding.view.backgroundColor
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "illustration.pdf",
"filename" : "Default-Browser.svg",
"idiom" : "universal"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
56 changes: 56 additions & 0 deletions DuckDuckGo/OnboardingButtonsView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//
// OnboardingButtonsView.swift
// DuckDuckGo
//
// Copyright © 2024 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 SwiftUI
import DuckUI

struct OnboardingActions: View {

@ObservedObject var viewModel: Model

var primaryAction: (() -> Void)?
var secondaryAction: (() -> Void)?

var body: some View {
VStack(spacing: 8) {
Button(action: {
self.primaryAction?()
}, label: {
Text(viewModel.primaryButtonTitle)
})
.buttonStyle(PrimaryButtonStyle())
.disabled(!viewModel.isContinueEnabled)

Button(action: {
self.secondaryAction?()
}, label: {
Text(viewModel.secondaryButtonTitle)
})
.buttonStyle(GhostButtonStyle())
}
}
}

extension OnboardingActions {
class Model: ObservableObject {
@Published var primaryButtonTitle = ""
@Published var secondaryButtonTitle = ""
@Published var isContinueEnabled = true
}
}
2 changes: 1 addition & 1 deletion DuckDuckGo/OnboardingDefaultBroswerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import UIKit
import Core

class OnboardingDefaultBroswerViewController: OnboardingContentViewController {

override var header: String {
return UserText.onboardingDefaultBrowserTitle
}
Expand Down
Loading

0 comments on commit ae36b3f

Please sign in to comment.