-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
183 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
Sources/Onboarding/Assets/Images.xcassets/VPN/link_receipt_image.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,54 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"appearances" : [ | ||
{ | ||
"appearance" : "luminosity", | ||
"value" : "dark" | ||
} | ||
], | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "link_receipt_image_2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"appearances" : [ | ||
{ | ||
"appearance" : "luminosity", | ||
"value" : "dark" | ||
} | ||
], | ||
"filename" : "link_receipt_dark@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "link_receipt_image_3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"appearances" : [ | ||
{ | ||
"appearance" : "luminosity", | ||
"value" : "dark" | ||
} | ||
], | ||
"filename" : "link_receipt_dark@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+55.8 KB
...Assets/Images.xcassets/VPN/link_receipt_image.imageset/link_receipt_dark@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+94.7 KB
...Assets/Images.xcassets/VPN/link_receipt_image.imageset/link_receipt_dark@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+57 KB
...ssets/Images.xcassets/VPN/link_receipt_image.imageset/link_receipt_image_2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97 KB
...ssets/Images.xcassets/VPN/link_receipt_image.imageset/link_receipt_image_3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions
73
Sources/Onboarding/Callouts/OnboardingLinkReceiptView.swift
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,73 @@ | ||
// Copyright 2023 The Brave Authors. All rights reserved. | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
import SwiftUI | ||
import Shared | ||
import BraveShared | ||
import DesignSystem | ||
import BraveUI | ||
|
||
public struct OnboardingLinkReceiptView: View { | ||
@Environment(\.presentationMode) @Binding private var presentationMode | ||
|
||
public var linkReceiptAction: (() -> Void)? | ||
|
||
public init() {} | ||
|
||
public var body: some View { | ||
ScrollView { | ||
VStack(spacing: 24) { | ||
Image("link_receipt_image", bundle: .module) | ||
Text(Strings.Onboarding.linkReceiptTitle) | ||
.font(.title.weight(.medium)) | ||
.multilineTextAlignment(.center) | ||
Text(Strings.Onboarding.linkReceiptDescription) | ||
.font(.subheadline) | ||
.multilineTextAlignment(.center) | ||
|
||
Button(action: { | ||
linkReceiptAction?() | ||
presentationMode.dismiss() | ||
}) { | ||
Text(Strings.Onboarding.linkReceiptButton) | ||
} | ||
.buttonStyle(BraveFilledButtonStyle(size: .large)) | ||
|
||
HStack(spacing: 8) { | ||
Text(Strings.VPN.poweredBy) | ||
.font(.footnote) | ||
.foregroundColor(Color(.bravePrimary)) | ||
.multilineTextAlignment(.center) | ||
Image(sharedName: "vpn_brand") | ||
.renderingMode(.template) | ||
.foregroundColor(Color(.bravePrimary)) | ||
} | ||
} | ||
.padding(32) | ||
} | ||
.background(Color(.braveBackground)) | ||
.frame(height: 650) | ||
.overlay { | ||
Button { | ||
presentationMode.dismiss() | ||
} label: { | ||
Image(braveSystemName: "brave.xmark") | ||
.renderingMode(.template) | ||
.foregroundColor(Color(.bravePrimary)) | ||
} | ||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topTrailing) | ||
.padding([.top, .trailing], 20) | ||
} | ||
} | ||
} | ||
|
||
#if DEBUG | ||
struct OnboardingLinkReceiptView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
OnboardingLinkReceiptView() | ||
.previewLayout(.sizeThatFits) | ||
} | ||
} | ||
#endif |
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