taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit baacfb572f479c863044b443f1959f7518daef84
parent e68280f0b189aac2a5edcedf8654561caddb9155
Author: Marc Stibane <marc@taler.net>
Date:   Fri,  8 Nov 2024 13:26:10 +0100

add amount

Diffstat:
MTalerWallet1/Views/Transactions/ManualDetailsV.swift | 2++
MTalerWallet1/Views/Transactions/ManualDetailsWireV.swift | 20++++++++++++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/TalerWallet1/Views/Transactions/ManualDetailsV.swift b/TalerWallet1/Views/Transactions/ManualDetailsV.swift @@ -151,6 +151,7 @@ struct ManualDetailsV: View { if let amount = account.transferAmount { let specs = account.currencySpecification let amountStr = common.amountRaw.formatted(specs: specs, isNegative: false) + let amountValue = common.amountRaw.valueStr let obtainStr = common.amountEffective.formatted(specs: specs, isNegative: false) // let _ = print(amountStr, " | ", obtainStr) if !minimalistic { @@ -196,6 +197,7 @@ struct ManualDetailsV: View { receiverStr: receiverStr, iban: iban, xTaler: xTaler, + amountValue: amountValue, amountStr: amountStr, obtainStr: obtainStr, account: account) diff --git a/TalerWallet1/Views/Transactions/ManualDetailsWireV.swift b/TalerWallet1/Views/Transactions/ManualDetailsWireV.swift @@ -52,6 +52,7 @@ struct ManualDetailsWireV: View { let receiverStr: String let iban: String? let xTaler: String + let amountValue: String // string representation of the value, formatted as "`integer`.`fraction`" let amountStr: String let obtainStr: String let account: WithdrawalExchangeAccountDetails @@ -98,6 +99,20 @@ struct ManualDetailsWireV: View { .accessibilityLabel(Text("Copy the IBAN", comment: "VoiceOver")) .disabled(false) } .padding(.top, -8) + let amountCode = HStack { + VStack(alignment: .leading) { + Text("Amount:") + .talerFont(.subheadline) + Text(amountStr) + .monospacedDigit() + .padding(.leading) + } .frame(maxWidth: .infinity, alignment: .leading) + .accessibilityElement(children: .combine) + .accessibilityLabel(Text("Amount to transfer", comment: "VoiceOver")) + CopyButton(textToCopy: amountValue, vertical: true) // only digits + separator, no currency name or symbol + .accessibilityLabel(Text("Copy the amount", comment: "VoiceOver")) + .disabled(false) + }// .padding(.top, -8) let xTalerCode = HStack { VStack(alignment: .leading) { Text("Account:") @@ -136,7 +151,6 @@ struct ManualDetailsWireV: View { : "**Step 3:** Finish the wire transfer of \(amountNBS) in your banking app or website, then this withdrawal will proceed automatically. Depending on your bank the transfer can take from minutes to two working days, please be patient.") .talerFont(.body) .multilineTextAlignment(.leading) - .padding(.top) Group { TransferRestrictionsV(amountStr: amountStr, @@ -157,7 +171,9 @@ struct ManualDetailsWireV: View { payeeCode.listRowSeparator(.hidden) xTalerCode.listRowSeparator(.hidden) } - step3.listRowSeparator(.visible) + amountCode.listRowSeparator(.hidden) + .padding(.top) + step3 // .padding(.top, 6) } } .navigationTitle(navTitle)