Skip to content

Commit

Permalink
ui: textfield submit label
Browse files Browse the repository at this point in the history
  • Loading branch information
reez authored Feb 10, 2024
1 parent 893925b commit 66e39a9
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions LDKNodeMonday/View/Bitcoin/SendBitcoinView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ struct SendBitcoinView: View {

TextField("1BvBMSEYstWet...m4GFg7xJaNVN2", text: $viewModel.address)
.truncationMode(.middle)
.submitLabel(.done)
.padding(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 32))

if !viewModel.address.isEmpty {
Expand Down
1 change: 1 addition & 0 deletions LDKNodeMonday/View/Home/OnboardingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ struct OnboardingView: View {
text: $viewModel.seedPhrase
)
.textFieldStyle(RoundedBorderTextFieldStyle())
.submitLabel(.done)
.padding(.horizontal, 40)
}
.padding()
Expand Down
3 changes: 3 additions & 0 deletions LDKNodeMonday/View/Lightning/Channel/ChannelAddView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ struct ChannelAddView: View {
}
.keyboardType(.numbersAndPunctuation)
.truncationMode(.middle)
.submitLabel(.next)
.minimumScaleFactor(0.5)
.padding(EdgeInsets(top: 0, leading: 0, bottom: 12, trailing: 32))

Expand Down Expand Up @@ -139,6 +140,7 @@ struct ChannelAddView: View {
}
.keyboardType(.numbersAndPunctuation)
.truncationMode(.middle)
.submitLabel(.next)
.minimumScaleFactor(0.5)
.padding(EdgeInsets(top: 0, leading: 0, bottom: 12, trailing: 32))

Expand Down Expand Up @@ -168,6 +170,7 @@ struct ChannelAddView: View {
text: $viewModel.channelAmountSats
)
.keyboardType(.numberPad)
.submitLabel(.done)
.minimumScaleFactor(0.5)
.padding(EdgeInsets(top: 0, leading: 0, bottom: 12, trailing: 32))

Expand Down
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Lightning/Peer/PeerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ struct PeerView: View {
text: $viewModel.nodeId
)
.truncationMode(.middle)
.submitLabel(.next)
.padding(EdgeInsets(top: 0, leading: 0, bottom: 12, trailing: 32))

if !viewModel.nodeId.isEmpty {
Expand Down Expand Up @@ -129,6 +130,7 @@ struct PeerView: View {
text: $viewModel.address
)
.truncationMode(.middle)
.submitLabel(.done)
.padding(EdgeInsets(top: 0, leading: 0, bottom: 12, trailing: 32))

if !viewModel.address.isEmpty {
Expand Down
1 change: 1 addition & 0 deletions LDKNodeMonday/View/Lightning/Receive/ReceiveView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ struct ReceiveView: View {
text: $viewModel.amountMsat
)
.keyboardType(.numberPad)
.submitLabel(.done)
.padding(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 32))

if !viewModel.amountMsat.isEmpty {
Expand Down
1 change: 1 addition & 0 deletions LDKNodeMonday/View/Lightning/Send/SendView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ struct SendView: View {
text: $viewModel.invoice
)
.truncationMode(.middle)
.submitLabel(.done)
.padding(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 32))

if !viewModel.invoice.isEmpty {
Expand Down

0 comments on commit 66e39a9

Please sign in to comment.