First draft of the screen
the circular frame needs to be updated so it fits iPhone SE, otherwise screen is ready
This commit is contained in:
parent
4d2dd6a2e8
commit
b3b6be8037
|
@ -85,6 +85,7 @@
|
|||
9E37A2B827C8F59F00AE57B3 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9E37A2B727C8F59F00AE57B3 /* Localizable.strings */; };
|
||||
9E4DC6E027C409A100E657F4 /* NeumorphicDesignModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E4DC6DF27C409A100E657F4 /* NeumorphicDesignModifier.swift */; };
|
||||
9E4DC6E227C4C6B700E657F4 /* SecantButtonStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E4DC6E127C4C6B700E657F4 /* SecantButtonStyles.swift */; };
|
||||
9EBEF87A27CE369800B4F343 /* RecoveryPhraseTestPreambleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EBEF87927CE369800B4F343 /* RecoveryPhraseTestPreambleView.swift */; };
|
||||
F9322DC0273B555C00C105B5 /* NavigationLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9322DBF273B555C00C105B5 /* NavigationLinks.swift */; };
|
||||
F93673D62742CB840099C6AF /* Previews.swift in Sources */ = {isa = PBXBuildFile; fileRef = F93673D52742CB840099C6AF /* Previews.swift */; };
|
||||
F93874F0273C4DE200F0E875 /* HomeStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = F93874ED273C4DE200F0E875 /* HomeStore.swift */; };
|
||||
|
@ -215,6 +216,7 @@
|
|||
9E37A2B727C8F59F00AE57B3 /* Localizable.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = "<group>"; };
|
||||
9E4DC6DF27C409A100E657F4 /* NeumorphicDesignModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NeumorphicDesignModifier.swift; sourceTree = "<group>"; };
|
||||
9E4DC6E127C4C6B700E657F4 /* SecantButtonStyles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecantButtonStyles.swift; sourceTree = "<group>"; };
|
||||
9EBEF87927CE369800B4F343 /* RecoveryPhraseTestPreambleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecoveryPhraseTestPreambleView.swift; sourceTree = "<group>"; };
|
||||
F9322DBF273B555C00C105B5 /* NavigationLinks.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationLinks.swift; sourceTree = "<group>"; };
|
||||
F93673D52742CB840099C6AF /* Previews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Previews.swift; sourceTree = "<group>"; };
|
||||
F93874ED273C4DE200F0E875 /* HomeStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeStore.swift; sourceTree = "<group>"; };
|
||||
|
@ -326,6 +328,7 @@
|
|||
0D3D04052728B2D70032ABC1 /* BackupFlow */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9EBEF87827CE365D00B4F343 /* Preamble */,
|
||||
0D6D628A276A528D002FB4CC /* DropDelegate.swift */,
|
||||
0D3D04062728B2EC0032ABC1 /* Views */,
|
||||
0D3D04092728B3A10032ABC1 /* RecoveryPhraseDisplayStore.swift */,
|
||||
|
@ -645,6 +648,14 @@
|
|||
path = CircularFrame;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9EBEF87827CE365D00B4F343 /* Preamble */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9EBEF87927CE369800B4F343 /* RecoveryPhraseTestPreambleView.swift */,
|
||||
);
|
||||
path = Preamble;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F93874EC273C4DE200F0E875 /* Home */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -1016,6 +1027,7 @@
|
|||
0D354A0B26D5A9D000315F45 /* MnemonicSeedPhraseHandling.swift in Sources */,
|
||||
0D535FE2271F9476009A9E3E /* EnumeratedChip.swift in Sources */,
|
||||
6654C73E2715A41300901167 /* OnboardingStore.swift in Sources */,
|
||||
9EBEF87A27CE369800B4F343 /* RecoveryPhraseTestPreambleView.swift in Sources */,
|
||||
9E4DC6E227C4C6B700E657F4 /* SecantButtonStyles.swift in Sources */,
|
||||
0DDB6A5127737D4A0012A410 /* ValidationFailedView.swift in Sources */,
|
||||
0D6D628B276A528E002FB4CC /* DropDelegate.swift in Sources */,
|
||||
|
|
|
@ -35,7 +35,9 @@ struct AppView: View {
|
|||
|
||||
case .phraseValidation:
|
||||
NavigationView {
|
||||
RecoveryPhraseBackupValidationView(
|
||||
// RecoveryPhraseTestPreambleView
|
||||
// RecoveryPhraseBackupValidationView
|
||||
RecoveryPhraseTestPreambleView(
|
||||
store: store.scope(
|
||||
state: \.phraseValidationState,
|
||||
action: AppAction.phraseValidation
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
//
|
||||
// RecoveryPhraseTestPreambleView.swift
|
||||
// secant-testnet
|
||||
//
|
||||
// Created by Lukáš Korba on 03/01/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import ComposableArchitecture
|
||||
|
||||
struct RecoveryPhraseTestPreambleView: View {
|
||||
var store: RecoveryPhraseValidationStore
|
||||
|
||||
var body: some View {
|
||||
WithViewStore(store) { viewStore in
|
||||
GeometryReader { proxy in
|
||||
VStack {
|
||||
VStack(alignment: .center, spacing: 20) {
|
||||
Text("recoveryPhraseTestPreamble.title")
|
||||
.titleText()
|
||||
.multilineTextAlignment(.center)
|
||||
|
||||
Text("recoveryPhraseTestPreamble.paragraph1")
|
||||
.paragraphText()
|
||||
.multilineTextAlignment(.center)
|
||||
.padding(.horizontal, 44)
|
||||
.opacity(0.53)
|
||||
}
|
||||
.padding(.bottom, 20)
|
||||
|
||||
CircularFrame()
|
||||
.backgroundImage(
|
||||
Asset.Assets.Backgrounds.callout1.image
|
||||
)
|
||||
.frame(
|
||||
width: proxy.size.width * 0.84,
|
||||
height: proxy.size.width * 0.84
|
||||
)
|
||||
.badgeIcon(.error)
|
||||
|
||||
Spacer()
|
||||
|
||||
VStack(alignment: .center, spacing: 40) {
|
||||
VStack(alignment: .center, spacing: 20) {
|
||||
Text("recoveryPhraseTestPreamble.paragraph2")
|
||||
.paragraphText()
|
||||
.multilineTextAlignment(.center)
|
||||
.opacity(0.53)
|
||||
|
||||
Text("recoveryPhraseTestPreamble.paragraph3")
|
||||
.paragraphText()
|
||||
.multilineTextAlignment(.center)
|
||||
.padding(.horizontal, 10)
|
||||
.opacity(0.53)
|
||||
}
|
||||
|
||||
Button(
|
||||
action: { viewStore.send(.recoveryBackupPhraseValidation) },
|
||||
label: { Text("recoveryPhraseTestPreamble.button.goNext") }
|
||||
)
|
||||
.activeButtonStyle
|
||||
.frame(width: nil, height: 60)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
.padding()
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.frame(width: proxy.size.width)
|
||||
.scrollableWhenScaledUp()
|
||||
.navigationLinkEmpty(
|
||||
isActive: viewStore.bindingForRoute(.recoveryBackupPhraseValidation),
|
||||
destination: { RecoveryPhraseBackupValidationView(store: store) }
|
||||
)
|
||||
}
|
||||
.padding()
|
||||
.navigationBarBackButtonHidden(true)
|
||||
.applyScreenBackground()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct RecoveryPhraseTestPreambleView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
Group {
|
||||
RecoveryPhraseTestPreambleView(store: .demo)
|
||||
|
||||
RecoveryPhraseTestPreambleView(store: .demo)
|
||||
.previewDevice(PreviewDevice(rawValue: "iPhone SE (2nd generation)"))
|
||||
|
||||
RecoveryPhraseTestPreambleView(store: .demo)
|
||||
.environment(\.sizeCategory, .accessibilityLarge)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,6 +21,7 @@ struct ValidationWord: Equatable {
|
|||
|
||||
struct RecoveryPhraseValidationState: Equatable {
|
||||
enum Route: Equatable, CaseIterable {
|
||||
case recoveryBackupPhraseValidation
|
||||
case success
|
||||
case failure
|
||||
}
|
||||
|
@ -128,6 +129,7 @@ extension RecoveryPhrase.Group {
|
|||
}
|
||||
|
||||
enum RecoveryPhraseValidationAction: Equatable {
|
||||
case recoveryBackupPhraseValidation
|
||||
case updateRoute(RecoveryPhraseValidationState.Route?)
|
||||
case reset
|
||||
case move(wordChip: PhraseChip.Kind, intoGroup: Int)
|
||||
|
@ -189,6 +191,9 @@ extension RecoveryPhraseValidationReducer {
|
|||
|
||||
case .displayBackedUpPhrase:
|
||||
break
|
||||
|
||||
case .recoveryBackupPhraseValidation:
|
||||
state.route = .recoveryBackupPhraseValidation
|
||||
}
|
||||
return .none
|
||||
}
|
||||
|
|
|
@ -42,6 +42,14 @@
|
|||
"validationFailed.incorrectBackupDescription" = "Remember, you can't recover your funds if you lose (or incorrectly save) these 24 words.";
|
||||
"validationFailed.button.tryAgain" = "I'm ready to try again";
|
||||
|
||||
// MARK: - Recovery Phrase Test Preamble
|
||||
"recoveryPhraseTestPreamble.title" = "First things first";
|
||||
"recoveryPhraseTestPreamble.paragraph1" = "It is important to understand that you are in charge here. Great, right? YOU get to be the bank!";
|
||||
"recoveryPhraseTestPreamble.paragraph2" = "But it also means that YOU are the customer, and you need to be self-reliant.";
|
||||
"recoveryPhraseTestPreamble.paragraph3" = "So how do you recover funds that you've hidden on a completely decentralized and private block-chain?";
|
||||
"recoveryPhraseTestPreamble.button.goNext" = "By understanding and preparing";
|
||||
|
||||
|
||||
// MARK: - Common & Shared
|
||||
"Back" = "Back";
|
||||
"Skip" = "Skip";
|
||||
|
|
Loading…
Reference in New Issue