commit bb2afe29c3ed50a2afa5fe4c0bf7aa63c4640a26
parent 893ed89b5a8d6198d06886fff7ca8f94deb26c36
Author: Marc Stibane <marc@taler.net>
Date: Tue, 26 Sep 2023 09:57:53 +0200
Simplified QR code view
Diffstat:
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift b/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift
@@ -15,38 +15,39 @@ struct QRCodeDetailView: View {
var body: some View {
if talerURI.count > 10 {
VStack (alignment: .leading) {
- Text("Either copy and send this link:")
+ Text("Either")
.multilineTextAlignment(.leading)
.accessibilityFont(.title3)
- .padding(.vertical)
-
- Text(talerURI)
- .accessibilityFont(.title3)
- .multilineTextAlignment(.center)
- .fixedSize(horizontal: false, vertical: true) // wrap in scrollview
- .padding(.bottom)
+// .padding(.vertical)
CopyShare(textToCopy: talerURI)
.disabled(false)
- .padding(.bottom)
+// .padding(.bottom)
+
+ let otherParty = incoming ? String(localized: "payer")
+ : String(localized: "payee")
+ Text("the link to the \(otherParty), or", comment: "(copy/share) the link to the other party (payer/payee), or")
+ .multilineTextAlignment(.leading)
+ .accessibilityFont(.title3)
+
+ HStack {
+ Spacer()
+ QRGeneratorView(text: talerURI)
+ Spacer()
+ }
// TODO: use currency formatter instead of .readableDescription
let amountStr = (amount == nil) ?
- (incoming ? String(localized: "or let the payer scan this QR code to pay:")
- : String(localized: "or let the payee scan this QR code to receive:"))
- : (incoming ? String(localized: "or let the payer scan this QR code to pay \(amount!.readableDescription):",
+ (incoming ? String(localized: "let the payer scan this QR code to pay.")
+ : String(localized: "let the payee scan this QR code to receive."))
+ : (incoming ? String(localized: "let the payer scan this QR code to pay \(amount!.readableDescription).",
comment: "amount.readableDescription: 5,3 €")
- : String(localized: "or let the payee scan this QR code to receive \(amount!.readableDescription):",
+ : String(localized: "let the payee scan this QR code to receive \(amount!.readableDescription).",
comment: "amount.readableDescription: 7.41 $"))
Text(amountStr)
.fixedSize(horizontal: false, vertical: true) // wrap in scrollview
-// .padding(.top, 30)
.accessibilityFont(.title3)
- HStack {
- Spacer()
- QRGeneratorView(text: talerURI)
- Spacer()
- }
+ .padding(.top)
}
}
}