From e52b28adc37b85d912b6cd52def13f855a6ec8df Mon Sep 17 00:00:00 2001 From: Lukas Korba Date: Tue, 1 Mar 2022 09:36:14 +0100 Subject: [PATCH] Import Wallet localised localisation of the import wallet screen done Height of the buttons according to design guide, the buttons should be 64px height --- secant.xcodeproj/project.pbxproj | 4 ++++ .../ImportWallet/Views/ImportWalletView.swift | 22 +++++-------------- secant/Localizable.strings | 6 +++++ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/secant.xcodeproj/project.pbxproj b/secant.xcodeproj/project.pbxproj index 3c1be63..760e4cd 100644 --- a/secant.xcodeproj/project.pbxproj +++ b/secant.xcodeproj/project.pbxproj @@ -85,6 +85,7 @@ 9E0FD7A027C910C000357DF0 /* ImportWalletStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E0FD79F27C910C000357DF0 /* ImportWalletStore.swift */; }; 9E0FD7A327C910D500357DF0 /* ImportWalletView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E0FD7A227C910D500357DF0 /* ImportWalletView.swift */; }; 9E0FD7A527C9163900357DF0 /* ImportSeedEditor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E0FD7A427C9163900357DF0 /* ImportSeedEditor.swift */; }; + 9E0FD7AF27CE0E2900357DF0 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9E0FD7AE27CE0E2900357DF0 /* Localizable.strings */; }; 9E4DC6E027C409A100E657F4 /* NeumorphicDesignModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E4DC6DF27C409A100E657F4 /* NeumorphicDesignModifier.swift */; }; 9E4DC6E227C4C6B700E657F4 /* SecantButtonStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E4DC6E127C4C6B700E657F4 /* SecantButtonStyles.swift */; }; F9322DC0273B555C00C105B5 /* NavigationLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9322DBF273B555C00C105B5 /* NavigationLinks.swift */; }; @@ -217,6 +218,7 @@ 9E0FD79F27C910C000357DF0 /* ImportWalletStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImportWalletStore.swift; sourceTree = ""; }; 9E0FD7A227C910D500357DF0 /* ImportWalletView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImportWalletView.swift; sourceTree = ""; }; 9E0FD7A427C9163900357DF0 /* ImportSeedEditor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImportSeedEditor.swift; sourceTree = ""; }; + 9E0FD7AE27CE0E2900357DF0 /* Localizable.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = ""; }; 9E4DC6DF27C409A100E657F4 /* NeumorphicDesignModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NeumorphicDesignModifier.swift; sourceTree = ""; }; 9E4DC6E127C4C6B700E657F4 /* SecantButtonStyles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecantButtonStyles.swift; sourceTree = ""; }; F9322DBF273B555C00C105B5 /* NavigationLinks.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationLinks.swift; sourceTree = ""; }; @@ -388,6 +390,7 @@ 0D4E7A0A26B364170058B01E /* ContentView.swift */, 0D4E7A0C26B364180058B01E /* Assets.xcassets */, 660558E8270C7A54009D6954 /* Colors.xcassets */, + 9E0FD7AE27CE0E2900357DF0 /* Localizable.strings */, 0D4E7A1126B364180058B01E /* Info.plist */, 0D4E7A0E26B364180058B01E /* Preview Content */, ); @@ -951,6 +954,7 @@ 0D4E7A0D26B364180058B01E /* Assets.xcassets in Resources */, 0DACFA9727209FA70039EEA5 /* Roboto-Black.ttf in Resources */, 0DACFA9C27209FA70039EEA5 /* Roboto-ThinItalic.ttf in Resources */, + 9E0FD7AF27CE0E2900357DF0 /* Localizable.strings in Resources */, 0DACFA9627209FA70039EEA5 /* Roboto-Thin.ttf in Resources */, 0D2ACE8026C2C67100D62E3C /* Zboto.otf in Resources */, ); diff --git a/secant/Features/ImportWallet/Views/ImportWalletView.swift b/secant/Features/ImportWallet/Views/ImportWalletView.swift index 3fe2cc8..a804465 100644 --- a/secant/Features/ImportWallet/Views/ImportWalletView.swift +++ b/secant/Features/ImportWallet/Views/ImportWalletView.swift @@ -8,21 +8,11 @@ import SwiftUI import ComposableArchitecture -// jeste udelat scaledWhenBigFont -// fix button height -// zmena tlacitek na action pro dark -// navigaci, back nejak -// napojit na button v onboardingu -// texty do strings file -// back button at je jak ma byt -// action button ma spatnou barvu title v onboardingu -// progress bar se animuje skocenim dolu, protoze je animated - struct ImportWalletView: View { @Environment(\.presentationMode) var presentationMode var store: ImportWalletStore - + var body: some View { WithViewStore(store) { viewStore in VStack { @@ -32,11 +22,11 @@ struct ImportWalletView: View { .navigationButtonStyle .frame(width: 75, height: 40) - Text("Wallet Import") + Text("importWallet.title") .titleText() } - Text("You can import your backed up wallet by entering your backup recovery phrase (aka seed phrase) now.") + Text("importWallet.description") .paragraphText() .lineSpacing(4) .opacity(0.53) @@ -46,13 +36,13 @@ struct ImportWalletView: View { ImportSeedEditor(store: store) .frame(width: nil, height: 200, alignment: .center) - Button("Import Recovery Phrase") { + Button("importWallet.button.importPhrase") { viewStore.send(.importRecoveryPhrase) } .activeButtonStyle .importWalletButtonLayout() - Button("Import a private or viewing key") { + Button("importWallet.button.importPrivateKey") { viewStore.send(.importPrivateOrViewingKey) } .secondaryButtonStyle @@ -74,7 +64,7 @@ fileprivate struct ImportWalletButtonLayout: ViewModifier { .frame( minWidth: 0, maxWidth: .infinity, - minHeight: 60, + minHeight: 64, maxHeight: .infinity, alignment: .center ) diff --git a/secant/Localizable.strings b/secant/Localizable.strings index d5e6406..4467270 100644 --- a/secant/Localizable.strings +++ b/secant/Localizable.strings @@ -42,6 +42,12 @@ "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: - Import Wallet Screen +"importWallet.title" = "Wallet Import"; +"importWallet.description" = "You can import your backed up wallet by entering your backup recovery phrase (aka seed phrase) now."; +"importWallet.button.importPhrase" = "Import Recovery Phrase"; +"importWallet.button.importPrivateKey" = "Import a private or viewing key"; + // MARK: - Common & Shared "Back" = "Back"; "Skip" = "Skip";