gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-ios] 46/54: ThreeAmountsSheet


From: gnunet
Subject: [taler-taler-ios] 46/54: ThreeAmountsSheet
Date: Fri, 30 Jun 2023 22:34:18 +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 b77c4065cc14fa9b2b884dd463d4aefca09b4373
Author: Marc Stibane <marc@taler.net>
AuthorDate: Fri Jun 30 18:13:32 2023 +0200

    ThreeAmountsSheet
---
 TalerWallet1/Views/Transactions/ThreeAmounts.swift |  5 ++--
 .../Views/Transactions/TransactionDetailView.swift | 27 +++++++++++-----------
 2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/TalerWallet1/Views/Transactions/ThreeAmounts.swift 
b/TalerWallet1/Views/Transactions/ThreeAmounts.swift
index 26a4cb3..5e60ce4 100644
--- a/TalerWallet1/Views/Transactions/ThreeAmounts.swift
+++ b/TalerWallet1/Views/Transactions/ThreeAmounts.swift
@@ -5,12 +5,13 @@
 import SwiftUI
 import taler_swift
 
-struct ThreeAmounts: View {
+struct ThreeAmountsSheet: View {
     var common: TransactionCommon
     var topTitle: String
     var bottomTitle: String?
     let baseURL: String?
     let large: Bool               // set to false for QR or IBAN
+
     var body: some View {
         let raw = common.amountRaw
         let effective = common.amountEffective
@@ -98,7 +99,7 @@ struct ThreeAmounts_Previews: PreviewProvider {
                                   txActions: [])
         Group {
             List {
-                ThreeAmounts(common: common, topTitle: "Withdrawal", baseURL: 
DEMOEXCHANGE, large: 1==1)
+                ThreeAmountsSheet(common: common, topTitle: "Withdrawal", 
baseURL: DEMOEXCHANGE, large: 1==1)
                     .safeAreaInset(edge: .bottom) {
                         Button(String(localized: "Accept"), action: {})
                             .buttonStyle(TalerButtonStyle(type: .prominent))
diff --git a/TalerWallet1/Views/Transactions/TransactionDetailView.swift 
b/TalerWallet1/Views/Transactions/TransactionDetailView.swift
index e1c2451..561b0e8 100644
--- a/TalerWallet1/Views/Transactions/TransactionDetailView.swift
+++ b/TalerWallet1/Views/Transactions/TransactionDetailView.swift
@@ -189,8 +189,8 @@ struct TransactionDetailView: View {
                             }
                         } // ManualDetails or Confirm with bank
                         let _ = print("ThreeAmounts")
-                        ThreeAmounts(common: common, topTitle: 
String(localized: "Chosen amount to withdraw:"),
-                                     baseURL: 
withdrawalTransaction.details.exchangeBaseUrl, large: true)
+                        ThreeAmountsSheet(common: common, topTitle: 
String(localized: "Chosen amount to withdraw:"),
+                                         baseURL: 
withdrawalTransaction.details.exchangeBaseUrl, large: true)
                     case .payment(let paymentTransaction):
                         let details = paymentTransaction.details
                         let info = details.info
@@ -198,31 +198,32 @@ struct TransactionDetailView: View {
                             .font(.title)
                             .lineLimit(4)
                             .padding(.bottom)
-                        ThreeAmounts(common: common, topTitle: 
String(localized: "Sum to be paid:"),
-                                     baseURL: nil, large: true)     // TODO: 
baseURL
+                        ThreeAmountsSheet(common: common, topTitle: 
String(localized: "Sum to be paid:"),
+                                         baseURL: nil, large: true)     // 
TODO: baseURL
                     case .refund(let refundTransaction):
                         let details = refundTransaction.details                
 // TODO: more details
-                        ThreeAmounts(common: common, topTitle: 
String(localized: "Refunded amount:"),
-                                     baseURL: nil, large: true)     // TODO: 
baseURL
+                        ThreeAmountsSheet(common: common, topTitle: 
String(localized: "Refunded amount:"),
+                                         baseURL: nil, large: true)     // 
TODO: baseURL
                     case .reward(let rewardTransaction):
                         let details = rewardTransaction.details                
 // TODO: more details
-                        ThreeAmounts(common: common, topTitle: 
String(localized: "Received Reward:"),
-                                     baseURL: details.exchangeBaseUrl, large: 
true)
+                        ThreeAmountsSheet(common: common, topTitle: 
String(localized: "Received Reward:"),
+                                         baseURL: details.exchangeBaseUrl, 
large: true)
 //                case .tip(let tipTransaction):
 //                    let details = tipTransaction.details                  // 
TODO: details
-//                    ThreeAmounts(common: common, topTitle: String(localized: 
"Received Tip:"), large: true)
+//                    ThreeAmountsSheet(common: common, topTitle: 
String(localized: "Received Tip:"),
+//                                      baseURL: nil, large: true)
                     case .refresh(let refreshTransaction):
                         let details = refreshTransaction.details               
 // TODO: details
-                        ThreeAmounts(common: common, topTitle: 
String(localized: "Refreshed amount:"),
-                                     baseURL: nil, large: true)     // TODO: 
baseURL
+                        ThreeAmountsSheet(common: common, topTitle: 
String(localized: "Refreshed amount:"),
+                                         baseURL: nil, large: true)     // 
TODO: baseURL
                     case .peer2peer(let p2pTransaction):
                         let details = p2pTransaction.details                   
 // TODO: details
                         // TODO: isSendCoins should show QR only while not 
expired
                         if pending || transaction.isSendCoins {
                             QRCodeDetails(transaction: transaction)
                         }
-                        ThreeAmounts(common: common, topTitle: 
String(localized: "Peer to Peer:"),
-                                     baseURL: details.exchangeBaseUrl, large: 
false)
+                        ThreeAmountsSheet(common: common, topTitle: 
String(localized: "Peer to Peer:"),
+                                         baseURL: details.exchangeBaseUrl, 
large: false)
                 } // switch
             } // Group
         }

-- 
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]