From e3087d00f50de6028dcbf6102806daf077e7dca7 Mon Sep 17 00:00:00 2001 From: Matthew <6657488+reez@users.noreply.github.com> Date: Tue, 23 Jan 2024 12:56:38 -0600 Subject: [PATCH] ui: channel detail spacing --- .../Lightning/Channel/ChannelDetailView.swift | 1 - .../Lightning/Send/SendConfirmationView.swift | 52 +++++++++---------- 2 files changed, 25 insertions(+), 28 deletions(-) diff --git a/LDKNodeMonday/View/Lightning/Channel/ChannelDetailView.swift b/LDKNodeMonday/View/Lightning/Channel/ChannelDetailView.swift index c0c874f..987d67d 100644 --- a/LDKNodeMonday/View/Lightning/Channel/ChannelDetailView.swift +++ b/LDKNodeMonday/View/Lightning/Channel/ChannelDetailView.swift @@ -66,7 +66,6 @@ struct ChannelDetailView: View { } .font(.system(.caption2, design: .monospaced)) .listStyle(.plain) - .padding() Button { showingConfirmationAlert = true diff --git a/LDKNodeMonday/View/Lightning/Send/SendConfirmationView.swift b/LDKNodeMonday/View/Lightning/Send/SendConfirmationView.swift index 01baf24..0d154bd 100644 --- a/LDKNodeMonday/View/Lightning/Send/SendConfirmationView.swift +++ b/LDKNodeMonday/View/Lightning/Send/SendConfirmationView.swift @@ -26,37 +26,35 @@ struct SendConfirmationView: View { .font(.largeTitle) .foregroundColor(viewModel.networkColor) - if let invoice = viewModel.invoice.bolt11amount(), let number = Int(invoice) { - HStack(alignment: .center) { - Text(viewModel.invoice) - .truncationMode(.middle) - .lineLimit(1) - .foregroundColor(.secondary) - .font(.subheadline) - Button { - UIPasteboard.general.string = viewModel.invoice - isCopied = true - showCheckmark = true - DispatchQueue.main.asyncAfter(deadline: .now() + 2) { - isCopied = false - showCheckmark = false - } - } label: { - HStack { - withAnimation { - Image( - systemName: showCheckmark ? "checkmark" : "doc.on.doc" - ) - .font(.subheadline) - } + HStack(alignment: .center) { + Text(viewModel.invoice) + .truncationMode(.middle) + .lineLimit(1) + .foregroundColor(.secondary) + .font(.subheadline) + Button { + UIPasteboard.general.string = viewModel.invoice + isCopied = true + showCheckmark = true + DispatchQueue.main.asyncAfter(deadline: .now() + 2) { + isCopied = false + showCheckmark = false + } + } label: { + HStack { + withAnimation { + Image( + systemName: showCheckmark ? "checkmark" : "doc.on.doc" + ) + .font(.subheadline) } - .bold() - .foregroundColor(viewModel.networkColor) } - + .bold() + .foregroundColor(viewModel.networkColor) } - .padding(.horizontal) + } + .padding(.horizontal) } .padding(.horizontal, 50.0)