diff --git a/BDKSwiftExampleWallet/Assets.xcassets/BDKLogo.imageset/BDKLogo.png b/BDKSwiftExampleWallet/Assets.xcassets/BDKLogo.imageset/BDKLogo.png new file mode 100644 index 0000000..a20f6b9 Binary files /dev/null and b/BDKSwiftExampleWallet/Assets.xcassets/BDKLogo.imageset/BDKLogo.png differ diff --git a/BDKSwiftExampleWallet/Assets.xcassets/BDKLogo.imageset/Contents.json b/BDKSwiftExampleWallet/Assets.xcassets/BDKLogo.imageset/Contents.json new file mode 100644 index 0000000..2a79127 --- /dev/null +++ b/BDKSwiftExampleWallet/Assets.xcassets/BDKLogo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "BDKLogo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/BDKSwiftExampleWallet/Resources/Localizable.xcstrings b/BDKSwiftExampleWallet/Resources/Localizable.xcstrings index 5678d1a..4cf558a 100644 --- a/BDKSwiftExampleWallet/Resources/Localizable.xcstrings +++ b/BDKSwiftExampleWallet/Resources/Localizable.xcstrings @@ -223,6 +223,9 @@ } } } + }, + "An example bitcoin wallet\npowered by Bitcoin Dev Kit" : { + }, "Are you sure you want to delete the seed?" : { "localizations" : { @@ -245,7 +248,6 @@ } }, "BDK Wallet" : { - "extractionState" : "stale", "localizations" : { "fr" : { "stringUnit" : { @@ -297,8 +299,12 @@ } } } + }, + "Create wallet" : { + }, "Create Wallet" : { + "extractionState" : "stale", "localizations" : { "fr" : { "stringUnit" : { @@ -347,8 +353,12 @@ } } } + }, + "Esplora server" : { + }, "Esplora Server" : { + "extractionState" : "stale", "localizations" : { "fr" : { "stringUnit" : { @@ -524,9 +534,6 @@ }, "Please make sure to write it down and store it securely." : { - }, - "powered by Bitcoin Dev Kit" : { - }, "Receive" : { "localizations" : { @@ -583,7 +590,10 @@ "Seed is not synced across devices." : { }, - "Select Bitcoin Network" : { + "Select bitcoin network" : { + + }, + "Select esplora server" : { }, "Select Fee" : { @@ -611,6 +621,9 @@ }, "Send Transaction" : { + }, + "Server" : { + }, "Settings Error" : { "localizations" : { diff --git a/BDKSwiftExampleWallet/View/OnboardingView.swift b/BDKSwiftExampleWallet/View/OnboardingView.swift index 0996574..6e1f2f8 100644 --- a/BDKSwiftExampleWallet/View/OnboardingView.swift +++ b/BDKSwiftExampleWallet/View/OnboardingView.swift @@ -23,7 +23,6 @@ struct OnboardingView: View { .ignoresSafeArea() VStack { - HStack { Spacer() Button { @@ -48,65 +47,60 @@ struct OnboardingView: View { .padding() } - Spacer() - - VStack(spacing: 25) { - Image(systemName: "bitcoinsign.circle") + VStack { + Image("BDKLogo") .resizable() - .foregroundStyle( - .secondary - ) - .frame(width: 100, height: 100, alignment: .center) - Text("powered by Bitcoin Dev Kit") - .foregroundStyle( - LinearGradient( - gradient: Gradient( - colors: [ - .secondary, - .primary, - ] - ), - startPoint: .topLeading, - endPoint: .bottomTrailing - ) - ) - .fontWidth(.expanded) - .fontWeight(.medium) + .frame(width: 150, height: 150, alignment: .center) + .padding(40) + Text("BDK Wallet") + .textStyle(BitcoinTitle1()) + Text("An example bitcoin wallet\npowered by Bitcoin Dev Kit") + .textStyle(BitcoinBody3()) .multilineTextAlignment(.center) - .padding() } - .padding() - - Picker( - "Network", - selection: $viewModel.selectedNetwork - ) { - Text("Signet").tag(Network.signet) - Text("Testnet").tag(Network.testnet) - } - .pickerStyle(.automatic) - .tint(.primary) - .accessibilityLabel("Select Bitcoin Network") - - Picker( - "Esplora Server", - selection: $viewModel.selectedURL - ) { - ForEach(viewModel.availableURLs, id: \.self) { url in - Text( - url.replacingOccurrences( - of: "https://", - with: "" - ).replacingOccurrences( - of: "http://", - with: "" - ) - ) - .tag(url) + + Spacer() + + NavigationStack { + HStack { + Text("Network") + Spacer() + Picker( + "Network", + selection: $viewModel.selectedNetwork + ) { + Text("Signet").tag(Network.signet) + Text("Testnet").tag(Network.testnet) + } + .pickerStyle(.automatic) + .tint(.bitcoinOrange) + .accessibilityLabel("Select bitcoin network") } - } - .pickerStyle(.automatic) - .tint(.primary) + HStack{ + Text("Server") + Spacer() + Picker( + "Esplora server", + selection: $viewModel.selectedURL + ) { + ForEach(viewModel.availableURLs, id: \.self) { url in + Text( + url.replacingOccurrences( + of: "https://", + with: "" + ).replacingOccurrences( + of: "http://", + with: "" + ) + ) + .tag(url) + } + } + .pickerStyle(.automatic) + .tint(.bitcoinOrange) + .accessibilityLabel("Select esplora server") + } + }.padding(.horizontal, 50) if viewModel.wordArray != [] { SeedPhraseView( @@ -121,13 +115,12 @@ struct OnboardingView: View { Spacer() - Button("Create Wallet") { + Button("Create wallet") { viewModel.createWallet() } .buttonStyle( BitcoinFilled( - tintColor: .primary, - textColor: Color(uiColor: .systemBackground), + tintColor: .bitcoinOrange, isCapsule: true ) ) @@ -135,7 +128,7 @@ struct OnboardingView: View { } - } + }.padding(.bottom, 20) .alert(isPresented: $showingOnboardingViewErrorAlert) { Alert( title: Text("Onboarding Error"),