Skip to content

Commit

Permalink
ui: preview
Browse files Browse the repository at this point in the history
  • Loading branch information
reez committed Sep 3, 2024
1 parent 76c3d4d commit 285ae9b
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Home/BitcoinView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ enum NavigationDestination: Hashable {
case amount(address: String, amount: String, payment: Payment)
}

#if DEBUG
#Preview {
BitcoinView(viewModel: .init(priceClient: .mock))
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Home/OnboardingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ struct OnboardingView: View {
}
}

#if DEBUG
#Preview {
OnboardingView(viewModel: .init())
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Home/Payments/PaymentsListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ struct PaymentDetailView: View {

}

#if DEBUG
#Preview {
PaymentsListView(
payments: [
Expand Down Expand Up @@ -159,3 +160,4 @@ struct PaymentDetailView: View {
]
)
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Home/Payments/PaymentsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ struct PaymentsView: View {

}

#if DEBUG
#Preview {
PaymentsView(viewModel: .init())
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Home/Receive/BIP21View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ func parseUnifiedQR(_ unifiedQR: String) -> UnifiedQRComponents? {
return UnifiedQRComponents(onchain: onchain, bolt11: bolt11, bolt12: bolt12)
}

#if DEBUG
#Preview {
BIP21View(viewModel: .init())
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Home/Receive/JITInvoiceView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ struct JITInvoiceView: View {

}

#if DEBUG
#Preview {
JITInvoiceView(viewModel: .init())
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Home/Receive/ReceiveView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ struct InvoiceRowView: View {
}
}

#if DEBUG
#Preview {
ReceiveView()
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Home/Send/AmountView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,12 @@ struct NumpadButton: View {
}
}

#if DEBUG
#Preview {
AmountView(
viewModel: .init(),
spendableBalance: UInt64(21000),
navigationPath: .constant(.init())
)
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Home/StartView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ struct StartView: View {

}

#if DEBUG
#Preview {
StartView(viewModel: .init())
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Profile/Channel/ChannelAddView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ extension ChannelAddView {

}

#if DEBUG
#Preview {
ChannelAddView(viewModel: .init())
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Profile/Channel/ChannelDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ struct ChannelDetailView: View {
}
}

#if DEBUG
#Preview {
ChannelDetailView(
viewModel: .init(
Expand Down Expand Up @@ -163,3 +164,4 @@ struct ChannelDetailView: View {
refreshFlag: .constant(false)
)
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Profile/Channel/ChannelsListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ struct ChannelsRefactorView: View {
}
}

#if DEBUG
#Preview {
ChannelsRefactorView(viewModel: .init(nodeInfoClient: .mock))
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Profile/Danger/SeedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ struct SeedView: View {
}
}

#if DEBUG
#Preview {
SeedView(viewModel: .init())
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Profile/NodeIDView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ struct NodeIDView: View {
}
}

#if DEBUG
#Preview {
NodeIDView(viewModel: .init())
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Profile/Peers/DisconnectView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ struct DisconnectView: View {

}

#if DEBUG
#Preview {
DisconnectView(
viewModel: .init(
nodeId: "03e39c737a691931dac0f9f9ee803f2ab08f7fd3bbb25ec08d9b8fdb8f51d3a8db"
)
)
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Profile/Peers/PeerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ extension PeerView {

}

#if DEBUG
#Preview {
PeerView(viewModel: .init())
}
#endif
2 changes: 2 additions & 0 deletions LDKNodeMonday/View/Profile/Peers/PeersListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ struct PeersListView: View {

}

#if DEBUG
#Preview {
PeersListView(viewModel: .init())
}
#endif

0 comments on commit 285ae9b

Please sign in to comment.