Fix non scrollable wallet screen
Changelog-Fixed: Fix non scrollable wallet screen Signed-off-by: Swift Coder <scoder1747@gmail.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
3986308638
commit
19e312a8fb
@@ -19,42 +19,24 @@ struct WalletView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func MainWalletView(nwc: WalletConnectURL) -> some View {
|
func MainWalletView(nwc: WalletConnectURL) -> some View {
|
||||||
VStack {
|
ScrollView {
|
||||||
if !damus_state.settings.nozaps {
|
VStack(spacing: 35) {
|
||||||
SupportDamus
|
if !damus_state.settings.nozaps {
|
||||||
|
SupportDamus
|
||||||
Spacer()
|
.padding(.vertical, 20)
|
||||||
}
|
|
||||||
|
|
||||||
VStack(spacing: 5) {
|
|
||||||
VStack(spacing: 10) {
|
|
||||||
Text("Wallet Relay", comment: "Label text indicating that below it is the information about the wallet relay.")
|
|
||||||
.fontWeight(.semibold)
|
|
||||||
.padding(.top)
|
|
||||||
|
|
||||||
Divider()
|
|
||||||
|
|
||||||
RelayView(state: damus_state, relay: nwc.relay, showActionButtons: .constant(false), recommended: false)
|
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, minHeight: 125, alignment: .top)
|
|
||||||
.padding(.horizontal, 10)
|
|
||||||
.background(DamusColors.neutral1)
|
|
||||||
.cornerRadius(10)
|
|
||||||
.overlay(
|
|
||||||
RoundedRectangle(cornerRadius: 10)
|
|
||||||
.stroke(DamusColors.neutral3, lineWidth: 1)
|
|
||||||
)
|
|
||||||
|
|
||||||
if let lud16 = nwc.lud16 {
|
VStack(spacing: 5) {
|
||||||
VStack(spacing: 10) {
|
VStack(spacing: 10) {
|
||||||
Text("Wallet Address", comment: "Label text indicating that below it is the wallet address.")
|
Text("Wallet Relay", comment: "Label text indicating that below it is the information about the wallet relay.")
|
||||||
.fontWeight(.semibold)
|
.fontWeight(.semibold)
|
||||||
|
.padding(.top)
|
||||||
|
|
||||||
Divider()
|
Divider()
|
||||||
|
|
||||||
Text(lud16)
|
RelayView(state: damus_state, relay: nwc.relay, showActionButtons: .constant(false), recommended: false)
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, minHeight: 75, alignment: .center)
|
.frame(maxWidth: .infinity, minHeight: 125, alignment: .top)
|
||||||
.padding(.horizontal, 10)
|
.padding(.horizontal, 10)
|
||||||
.background(DamusColors.neutral1)
|
.background(DamusColors.neutral1)
|
||||||
.cornerRadius(10)
|
.cornerRadius(10)
|
||||||
@@ -62,23 +44,43 @@ struct WalletView: View {
|
|||||||
RoundedRectangle(cornerRadius: 10)
|
RoundedRectangle(cornerRadius: 10)
|
||||||
.stroke(DamusColors.neutral3, lineWidth: 1)
|
.stroke(DamusColors.neutral3, lineWidth: 1)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if let lud16 = nwc.lud16 {
|
||||||
|
VStack(spacing: 10) {
|
||||||
|
Text("Wallet Address", comment: "Label text indicating that below it is the wallet address.")
|
||||||
|
.fontWeight(.semibold)
|
||||||
|
|
||||||
|
Divider()
|
||||||
|
|
||||||
|
Text(lud16)
|
||||||
|
}
|
||||||
|
.frame(maxWidth: .infinity, minHeight: 75, alignment: .center)
|
||||||
|
.padding(.horizontal, 10)
|
||||||
|
.background(DamusColors.neutral1)
|
||||||
|
.cornerRadius(10)
|
||||||
|
.overlay(
|
||||||
|
RoundedRectangle(cornerRadius: 10)
|
||||||
|
.stroke(DamusColors.neutral3, lineWidth: 1)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Button(action: {
|
||||||
Button(action: {
|
self.model.disconnect()
|
||||||
self.model.disconnect()
|
}) {
|
||||||
}) {
|
HStack {
|
||||||
HStack {
|
Text("Disconnect Wallet", comment: "Text for button to disconnect from Nostr Wallet Connect lightning wallet.")
|
||||||
Text("Disconnect Wallet", comment: "Text for button to disconnect from Nostr Wallet Connect lightning wallet.")
|
}
|
||||||
|
.frame(minWidth: 300, maxWidth: .infinity, maxHeight: 18, alignment: .center)
|
||||||
}
|
}
|
||||||
.frame(minWidth: 300, maxWidth: .infinity, maxHeight: 18, alignment: .center)
|
.buttonStyle(GradientButtonStyle())
|
||||||
|
.padding(.bottom, 50) // Bottom padding while Scrolling
|
||||||
|
|
||||||
}
|
}
|
||||||
.buttonStyle(GradientButtonStyle())
|
.navigationTitle(NSLocalizedString("Wallet", comment: "Navigation title for Wallet view"))
|
||||||
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
|
.padding()
|
||||||
}
|
}
|
||||||
.navigationTitle(NSLocalizedString("Wallet", comment: "Navigation title for Wallet view"))
|
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
|
||||||
.padding()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func donation_binding() -> Binding<Double> {
|
func donation_binding() -> Binding<Double> {
|
||||||
|
|||||||
Reference in New Issue
Block a user