gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 06/20: Add CURRENCY below Pay button


From: gnunet
Subject: [taler-taler-ios] 06/20: Add CURRENCY below Pay button
Date: Fri, 02 Aug 2024 18:04:00 +0200

This is an automated email from the git hooks/post-receive script.

marc-stibane pushed a commit to branch master
in repository taler-ios.

commit 9b397c7f71f5f593579637de6c3e430aa74bd33f
Author: Marc Stibane <marc@taler.net>
AuthorDate: Tue Jul 30 09:23:35 2024 +0200

    Add CURRENCY below Pay button
---
 TalerWallet1/Localizable.xcstrings                 |  6 ++++++
 .../Views/Sheets/Payment/PaymentView.swift         | 23 +++++++++++++---------
 2 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/TalerWallet1/Localizable.xcstrings 
b/TalerWallet1/Localizable.xcstrings
index 83357ba..0e61c5e 100644
--- a/TalerWallet1/Localizable.xcstrings
+++ b/TalerWallet1/Localizable.xcstrings
@@ -3504,6 +3504,9 @@
           }
         }
       }
+    },
+    "Pay %@ now" : {
+
     },
     "Pay P2P" : {
       "comment" : "Nav Title",
@@ -3639,6 +3642,9 @@
           }
         }
       }
+    },
+    "Payment is made in %@" : {
+
     },
     "Payment provider:" : {
       "localizations" : {
diff --git a/TalerWallet1/Views/Sheets/Payment/PaymentView.swift 
b/TalerWallet1/Views/Sheets/Payment/PaymentView.swift
index a2b598a..933d6e0 100644
--- a/TalerWallet1/Views/Sheets/Payment/PaymentView.swift
+++ b/TalerWallet1/Views/Sheets/Payment/PaymentView.swift
@@ -91,12 +91,12 @@ struct PaymentView: View {
     var body: some View {
       Group {
         if let preparePayResult {
+            let raw = preparePayResult.amountRaw
             let effective = preparePayResult.amountEffective
             let terms = preparePayResult.contractTerms
             List {
                 // TODO: show balanceDetails.balanceAvailable
                 let baseURL = 
preparePayResult.contractTerms.exchanges.first?.url
-                let raw = preparePayResult.amountRaw
                 let status = preparePayResult.status
                 let currency = raw.currencyStr
                 let topTitle = String(localized: "Amount to pay:")
@@ -151,15 +151,20 @@ struct PaymentView: View {
             .listStyle(myListStyle.style).anyView
             .safeAreaInset(edge: .bottom) {
                 if let effective {
-                    NavigationLink(destination: LazyView {
-                        PaymentDone(stack: stack.push(),
-                             currencyInfo: $currencyInfo,
-                            transactionId: preparePayResult.transactionId)
-                    }) {
-                        Text(navTitle)      // Confirm Payment
+                    VStack {
+                        NavigationLink(destination: LazyView {
+                            PaymentDone(stack: stack.push(),
+                                 currencyInfo: $currencyInfo,
+                                transactionId: preparePayResult.transactionId)
+                        }) {
+                            let formatted = raw.formatted(currencyInfo, 
isNegative: false)
+                            Text("Pay \(formatted) now")
+                        }
+                            .buttonStyle(TalerButtonStyle(type: .prominent))
+                            .padding(.horizontal)
+                        Text("Payment is made in 
\(currencyInfo.scope.currency)")
+                            .talerFont(.callout)
                     }
-                    .buttonStyle(TalerButtonStyle(type: .prominent))
-                    .padding(.horizontal)
                 } else {
                     Button("Cancel", action: {
                         dismissTop(stack.push())

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]