Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed non scrollable wallet screen #2758

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 43 additions & 41 deletions damus/Views/Wallet/WalletView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,66 +19,68 @@ struct WalletView: View {
}

func MainWalletView(nwc: WalletConnectURL) -> some View {
VStack {
if !damus_state.settings.nozaps {
SupportDamus

Spacer()
}

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)
ScrollView {
VStack(spacing: 35) {
if !damus_state.settings.nozaps {
SupportDamus
.padding(.vertical, 20)
}
.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) {
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)
.padding(.top)

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)
.background(DamusColors.neutral1)
.cornerRadius(10)
.overlay(
RoundedRectangle(cornerRadius: 10)
.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: {
self.model.disconnect()
}) {
HStack {
Text("Disconnect Wallet", comment: "Text for button to disconnect from Nostr Wallet Connect lightning wallet.")

Button(action: {
self.model.disconnect()
}) {
HStack {
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> {
Expand Down