commit 0353f771da46a30d2c448603066c64e3a0bc915e
parent af8c222dde2ee05c94f7887a330ffcacb7b3dcc9
Author: Marc Stibane <marc@taler.net>
Date: Mon, 18 Nov 2024 16:30:38 +0100
cleanup
Diffstat:
4 files changed, 29 insertions(+), 23 deletions(-)
diff --git a/TalerWallet1/Views/Actions/Banking/ManualWithdraw.swift b/TalerWallet1/Views/Actions/Banking/ManualWithdraw.swift
@@ -202,7 +202,7 @@ struct ManualWithdrawContent: View {
// let _ = print(selectedAge, restrictAge)
let destination = ManualWithdrawDone(stack: stack.push(),
scope: detailsForAmount.scopeInfo,
- baseURL: detailsForAmount.exchangeBaseUrl,
+ baseURL: baseURL,
amountToTransfer: amountToTransfer)
// restrictAge: restrictAge)
let disabled = amountToTransfer.isZero || coinData.invalid || coinData.tooMany
diff --git a/TalerWallet1/Views/Actions/Banking/QuiteSomeCoins.swift b/TalerWallet1/Views/Actions/Banking/QuiteSomeCoins.swift
@@ -71,12 +71,14 @@ struct QuiteSomeCoins: View {
var body: some View {
let isError = coinData.tooMany // || coinData.invalid
let showFee = shouldShowFee && !isError
- if showFee {
+ if showFee { // TODO: does exchange never have fee?
if let fee = coinData.fee {
- Text(coinData.feeLabel(scope, feeZero: String(localized: "No withdrawal fee"),
- isNegative: feeIsNegative))
- .foregroundColor(.primary)
- .talerFont(.body)
+ let feeLabel = coinData.feeLabel(scope,
+ feeZero: String(localized: "No fee"),
+ isNegative: feeIsNegative)
+ Text(feeLabel)
+ .foregroundColor(.primary)
+ .talerFont(.body)
}
}
if isError || coinData.quiteSome || coinData.manyCoins {
diff --git a/TalerWallet1/Views/Balances/PendingRowView.swift b/TalerWallet1/Views/Balances/PendingRowView.swift
@@ -41,7 +41,7 @@ struct PendingRowView: View {
.foregroundColor(pendingColor)
// this is the default view for iOS 15
- let vStack = VStack {
+ let vLayout = VStack {
Text(pendingTitle.tabbed(oneLine: true))
HStack {
iconBadge
@@ -56,7 +56,7 @@ struct PendingRowView: View {
Text(pendingTitle.tabbed(oneLine: false))
amountText.frame(maxWidth: .infinity, alignment: .trailing)
}
- vStack
+ vLayout
VStack {
Text(pendingTitle.tabbed(oneLine: true))
iconBadge
@@ -64,7 +64,7 @@ struct PendingRowView: View {
}
}
} else {
- vStack
+ vLayout
}
}
}
diff --git a/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift b/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift
@@ -55,20 +55,24 @@ struct QRCodeDetailView: View {
}
.accessibilityLabel("QR Code")
.listRowSeparator(.hidden)
- if !minimalistic {
- let amountStr = amountStr(currencyInfo)
- let scanLong = incoming ? String(localized: "(payer) 1",
- defaultValue: "Let the payer scan this QR code to pay \(amountStr).",
- comment: "e.g. '5,3 €'")
- : String(localized: "(payee) 1",
- defaultValue: "Let the payee scan this QR code to receive \(amountStr).",
- comment: "e.g. '$ 7.41'")
- Text(scanLong)
- .multilineTextAlignment(.leading)
- .talerFont(.title3)
- .listRowSeparator(.hidden)
- .task(id: controller.currencyTicker) { await currencyTickerChanged() }
- }
+ let amountStr = amountStr(currencyInfo)
+ let scanLong = incoming ? (minimalistic ? String(localized: "(payer) 1 mini",
+ defaultValue: "Requesting \(amountStr)",
+ comment: "e.g. '5,3 €'")
+ : String(localized: "(payer) 1",
+ defaultValue: "Let the payer scan this QR code to pay \(amountStr).",
+ comment: "e.g. '5,3 €'"))
+ : (minimalistic ? String(localized: "(payee) 1 mini",
+ defaultValue: "Sending \(amountStr)",
+ comment: "e.g. '$ 7.41'")
+ : String(localized: "(payee) 1",
+ defaultValue: "Let the payee scan this QR code to receive \(amountStr).",
+ comment: "e.g. '$ 7.41'"))
+ Text(scanLong)
+ .multilineTextAlignment(.leading)
+ .talerFont(.title3)
+ .listRowSeparator(.hidden)
+ .task(id: controller.currencyTicker) { await currencyTickerChanged() }
CopyShare(textToCopy: talerCopyShare)
.disabled(false)
// .padding(.bottom)