Skip to content

Commit cb85440

Browse files
committed
UI tweaks to onboarding screen
1 parent e49bf53 commit cb85440

File tree

4 files changed

+92
-65
lines changed

4 files changed

+92
-65
lines changed
3.66 KB
Loading
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "universal",
9+
"scale" : "2x"
10+
},
11+
{
12+
"filename" : "BDKLogo.png",
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}

BDKSwiftExampleWallet/Resources/Localizable.xcstrings

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@
223223
}
224224
}
225225
}
226+
},
227+
"An example bitcoin wallet\npowered by Bitcoin Dev Kit" : {
228+
226229
},
227230
"Are you sure you want to delete the seed?" : {
228231
"localizations" : {
@@ -245,7 +248,6 @@
245248
}
246249
},
247250
"BDK Wallet" : {
248-
"extractionState" : "stale",
249251
"localizations" : {
250252
"fr" : {
251253
"stringUnit" : {
@@ -297,8 +299,12 @@
297299
}
298300
}
299301
}
302+
},
303+
"Create wallet" : {
304+
300305
},
301306
"Create Wallet" : {
307+
"extractionState" : "stale",
302308
"localizations" : {
303309
"fr" : {
304310
"stringUnit" : {
@@ -347,8 +353,12 @@
347353
}
348354
}
349355
}
356+
},
357+
"Esplora server" : {
358+
350359
},
351360
"Esplora Server" : {
361+
"extractionState" : "stale",
352362
"localizations" : {
353363
"fr" : {
354364
"stringUnit" : {
@@ -524,9 +534,6 @@
524534
},
525535
"Please make sure to write it down and store it securely." : {
526536

527-
},
528-
"powered by Bitcoin Dev Kit" : {
529-
530537
},
531538
"Receive" : {
532539
"localizations" : {
@@ -583,7 +590,10 @@
583590
"Seed is not synced across devices." : {
584591

585592
},
586-
"Select Bitcoin Network" : {
593+
"Select bitcoin network" : {
594+
595+
},
596+
"Select esplora server" : {
587597

588598
},
589599
"Select Fee" : {
@@ -611,6 +621,9 @@
611621
},
612622
"Send Transaction" : {
613623

624+
},
625+
"Server" : {
626+
614627
},
615628
"Settings Error" : {
616629
"localizations" : {

BDKSwiftExampleWallet/View/OnboardingView.swift

Lines changed: 53 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ struct OnboardingView: View {
2323
.ignoresSafeArea()
2424

2525
VStack {
26-
2726
HStack {
2827
Spacer()
2928
Button {
@@ -48,65 +47,60 @@ struct OnboardingView: View {
4847
.padding()
4948
}
5049

51-
Spacer()
52-
53-
VStack(spacing: 25) {
54-
Image(systemName: "bitcoinsign.circle")
50+
VStack {
51+
Image("BDKLogo")
5552
.resizable()
56-
.foregroundStyle(
57-
.secondary
58-
)
59-
.frame(width: 100, height: 100, alignment: .center)
60-
Text("powered by Bitcoin Dev Kit")
61-
.foregroundStyle(
62-
LinearGradient(
63-
gradient: Gradient(
64-
colors: [
65-
.secondary,
66-
.primary,
67-
]
68-
),
69-
startPoint: .topLeading,
70-
endPoint: .bottomTrailing
71-
)
72-
)
73-
.fontWidth(.expanded)
74-
.fontWeight(.medium)
53+
.frame(width: 150, height: 150, alignment: .center)
54+
.padding(40)
55+
Text("BDK Wallet")
56+
.textStyle(BitcoinTitle1())
57+
Text("An example bitcoin wallet\npowered by Bitcoin Dev Kit")
58+
.textStyle(BitcoinBody3())
7559
.multilineTextAlignment(.center)
76-
.padding()
7760
}
78-
.padding()
79-
80-
Picker(
81-
"Network",
82-
selection: $viewModel.selectedNetwork
83-
) {
84-
Text("Signet").tag(Network.signet)
85-
Text("Testnet").tag(Network.testnet)
86-
}
87-
.pickerStyle(.automatic)
88-
.tint(.primary)
89-
.accessibilityLabel("Select Bitcoin Network")
90-
91-
Picker(
92-
"Esplora Server",
93-
selection: $viewModel.selectedURL
94-
) {
95-
ForEach(viewModel.availableURLs, id: \.self) { url in
96-
Text(
97-
url.replacingOccurrences(
98-
of: "https://",
99-
with: ""
100-
).replacingOccurrences(
101-
of: "http://",
102-
with: ""
103-
)
104-
)
105-
.tag(url)
61+
62+
Spacer()
63+
64+
NavigationStack {
65+
HStack {
66+
Text("Network")
67+
Spacer()
68+
Picker(
69+
"Network",
70+
selection: $viewModel.selectedNetwork
71+
) {
72+
Text("Signet").tag(Network.signet)
73+
Text("Testnet").tag(Network.testnet)
74+
}
75+
.pickerStyle(.automatic)
76+
.tint(.bitcoinOrange)
77+
.accessibilityLabel("Select bitcoin network")
10678
}
107-
}
108-
.pickerStyle(.automatic)
109-
.tint(.primary)
79+
HStack{
80+
Text("Server")
81+
Spacer()
82+
Picker(
83+
"Esplora server",
84+
selection: $viewModel.selectedURL
85+
) {
86+
ForEach(viewModel.availableURLs, id: \.self) { url in
87+
Text(
88+
url.replacingOccurrences(
89+
of: "https://",
90+
with: ""
91+
).replacingOccurrences(
92+
of: "http://",
93+
with: ""
94+
)
95+
)
96+
.tag(url)
97+
}
98+
}
99+
.pickerStyle(.automatic)
100+
.tint(.bitcoinOrange)
101+
.accessibilityLabel("Select esplora server")
102+
}
103+
}.padding(.horizontal, 50)
110104

111105
if viewModel.wordArray != [] {
112106
SeedPhraseView(
@@ -121,21 +115,20 @@ struct OnboardingView: View {
121115

122116
Spacer()
123117

124-
Button("Create Wallet") {
118+
Button("Create wallet") {
125119
viewModel.createWallet()
126120
}
127121
.buttonStyle(
128122
BitcoinFilled(
129-
tintColor: .primary,
130-
textColor: Color(uiColor: .systemBackground),
123+
tintColor: .bitcoinOrange,
131124
isCapsule: true
132125
)
133126
)
134127
.padding()
135128

136129
}
137130

138-
}
131+
}.padding(.bottom, 20)
139132
.alert(isPresented: $showingOnboardingViewErrorAlert) {
140133
Alert(
141134
title: Text("Onboarding Error"),

0 commit comments

Comments
 (0)