Skip to content

Commit

Permalink
WIP: .navigationlink style, use apple text style
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnordh committed Nov 27, 2024
1 parent b330dd1 commit 6fcd2ff
Showing 1 changed file with 50 additions and 3 deletions.
53 changes: 50 additions & 3 deletions LDKNodeMonday/View/Home/OnboardingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ struct OnboardingView: View {
@AppStorage("isFirstTime") var isFirstTime: Bool = true
@ObservedObject var viewModel: OnboardingViewModel
@State private var showingOnboardingViewErrorAlert = false

let airdropOptions = ["Receiving Off", "Contacts Only", "Everyone for 10 minutes"]
@State private var selectedAirdropOption = "Receiving Off"

var body: some View {

Expand All @@ -33,15 +36,18 @@ struct OnboardingView: View {
.frame(width: 150, height: 150, alignment: .center)
.padding(40)
Text("Monday Wallet")
.textStyle(BitcoinTitle1())
.font(.largeTitle .weight(.semibold))
Text("An example bitcoin wallet\npowered by LDK Node")
.textStyle(BitcoinBody3())
.font(.body)
.multilineTextAlignment(.center)
.fixedSize(horizontal: false, vertical: true)
}

Spacer()

NavigationStack {
// Default picker style
/*
HStack {
Text("Network")
Spacer()
Expand Down Expand Up @@ -80,8 +86,49 @@ struct OnboardingView: View {
.tint(.accent)
.accessibilityLabel("Select esplora server")
}
}.padding(.horizontal, 50)
*/
// NavigationLink picker style
Form {
Section() {
Picker(
"Network",
selection: $viewModel.selectedNetwork
) {
Text("Signet").tag(Network.signet)
Text("Testnet").tag(Network.testnet)
}
.pickerStyle(.navigationLink)
.accessibilityLabel("Select bitcoin network")
.scrollContentBackground(.hidden)
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(.navigationLink)
.accessibilityLabel("Select esplora server")
.scrollContentBackground(.hidden)
}
}
.tint(.accent)
.frame(maxHeight: 150)
.scrollContentBackground(.hidden)
}
.padding(.horizontal, 20)

// Textfield for importing wallet
TextField(
isFirstTime
? "24 word seed phrase (optional)" : "24 word seed phrase (required)",
Expand Down

0 comments on commit 6fcd2ff

Please sign in to comment.