gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-ios] 09/10: Usability improved for manual withdrawal + P2P


From: gnunet
Subject: [taler-taler-ios] 09/10: Usability improved for manual withdrawal + P2P
Date: Tue, 08 Aug 2023 12:29:28 +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 3cfbfdf31b02be154464f4156f207af03d93e972
Author: Marc Stibane <marc@taler.net>
AuthorDate: Tue Aug 8 12:25:02 2023 +0200

    Usability improved for manual withdrawal + P2P
---
 .../Views/HelperViews/QRCodeDetailView.swift       | 35 +++++++++++-----------
 .../Views/Transactions/ManualDetails.swift         | 28 ++++++++++-------
 TalerWallet1/Views/Transactions/ThreeAmounts.swift | 12 ++++----
 .../Views/Transactions/TransactionDetailView.swift |  8 +----
 4 files changed, 42 insertions(+), 41 deletions(-)

diff --git a/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift 
b/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift
index dfacf5e..091a1ab 100644
--- a/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift
+++ b/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift
@@ -15,13 +15,27 @@ struct QRCodeDetailView: View {
     var body: some View {
         if talerURI.count > 10 {
             VStack (alignment: .leading) {
+                Text("Either copy and send this link:")
+                    .multilineTextAlignment(.leading)
+                    .font(.title3)
+                    .padding(.vertical)
+
+                Text(talerURI)
+                    .multilineTextAlignment(.center)
+                    .fixedSize(horizontal: false, vertical: true)       // 
wrap in scrollview
+                    .padding(.bottom)
+
+                CopyShare(textToCopy: talerURI)
+                    .disabled(false)
+                    .padding(.bottom)
+
                 // TODO: use currency formatter instead of .readableDescription
                 let amountStr = (amount == nil) ?
-                    (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):",
+                    (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):",
                                        comment: "amount.readableDescription: 
5,3 €")
-                              : String(localized: "Let the payee scan this QR 
code to receive \(amount!.readableDescription):",
+                              : String(localized: "or 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
@@ -32,19 +46,6 @@ struct QRCodeDetailView: View {
                     QRGeneratorView(text: talerURI)
                     Spacer()
                 }
-
-                Text("Alternatively, copy and send this link:")
-                    .multilineTextAlignment(.leading)
-                    .font(.title3)
-                    .padding(.vertical)
-
-                Text(talerURI)
-                    .multilineTextAlignment(.center)
-                    .fixedSize(horizontal: false, vertical: true)       // 
wrap in scrollview
-                    .padding(.bottom)
-
-                CopyShare(textToCopy: talerURI)
-                    .disabled(false)
             }
         }
     }
diff --git a/TalerWallet1/Views/Transactions/ManualDetails.swift 
b/TalerWallet1/Views/Transactions/ManualDetails.swift
index 6663ef1..b788072 100644
--- a/TalerWallet1/Views/Transactions/ManualDetails.swift
+++ b/TalerWallet1/Views/Transactions/ManualDetails.swift
@@ -14,31 +14,39 @@ struct ManualDetails: View {
             let payURL = URL(string: payto)
             let iban = payURL?.iban ?? "unknown IBAN"
             let amount = common.amountRaw.readableDescription
-            Text("From your regular bank account, make a wire transfer of 
\(amount) to:")
+            Text("You need to transfer \(amount) from your regular bank 
account to the Exchange.")
+            Text("Step 1: Copy this code and paste it into the subject/purpose 
field in your banking app or bank website.\nThis is mandatory, otherwise your 
money will not arrive in this wallet.")
                 .multilineTextAlignment(.leading)
                 .listRowSeparator(.hidden)
             HStack {
-                Text(iban)
+                Text(details.reservePub)
                     .monospacedDigit()
+                    .accessibilityLabel("Cryptocode")
                 Spacer()
-                CopyButton(textToCopy: iban, vertical: true)
-                    .accessibilityLabel("Copy the IBAN")
+                CopyButton(textToCopy: details.reservePub, vertical: true)
+                    .accessibilityLabel("Copy the cryptocode")
                     .disabled(false)
             }   .padding(.leading)
-                .padding(.vertical, -8)
                 .listRowSeparator(.hidden)
-            Text("with the code below as subject to receive the money in this 
wallet:")
+            Text("Step 2: If you dont already have it in your banking 
favourites list, then copy and paste this IBAN into the receiver IBAN field in 
your banking app or website:")
                 .multilineTextAlignment(.leading)
                 .listRowSeparator(.hidden)
             HStack {
-                Text(details.reservePub)
+                Text(iban)
                     .monospacedDigit()
-                    .accessibilityLabel("Cryptocode")
                 Spacer()
-                CopyButton(textToCopy: details.reservePub, vertical: true)
-                    .accessibilityLabel("Copy the cryptocode")
+                CopyButton(textToCopy: iban, vertical: true)
+                    .accessibilityLabel("Copy the IBAN")
                     .disabled(false)
             }   .padding(.leading)
+                .padding(.top, -8)
+                .listRowSeparator(.hidden)
+            Text("Step 3: Finish the wire transfer of \(amount) in your 
banking app or website, then this withdrawal will proceed automatically.")
+                .multilineTextAlignment(.leading)
+                .listRowSeparator(.visible)
+            Text("Alternative: If your bank already supports PayTo, you can 
use this PayTo-Link instead:")
+                .multilineTextAlignment(.leading)
+                .padding(.top, 2)
                 .listRowSeparator(.hidden)
             HStack {
                 Text(verbatim: "|")       // only reason for this 
leading-aligned text is to get a nice full length listRowSeparator
diff --git a/TalerWallet1/Views/Transactions/ThreeAmounts.swift 
b/TalerWallet1/Views/Transactions/ThreeAmounts.swift
index 8f2287a..7b1397b 100644
--- a/TalerWallet1/Views/Transactions/ThreeAmounts.swift
+++ b/TalerWallet1/Views/Transactions/ThreeAmounts.swift
@@ -46,9 +46,6 @@ struct ThreeAmountsView: View {
         let labelColor = Color(UIColor.label)
         let foreColor = pending ? WalletColors().pendingColor(incoming)
                                 : WalletColors().transactionColor(incoming)
-        let feeColor = WalletColors().transactionColor(false)
-        let feeSign = incoming ? "-" : "+"
-
         VStack {
             AmountView(title: topTitle,
                        value: topAmount.readableDescription,
@@ -56,9 +53,10 @@ struct ThreeAmountsView: View {
                        large: large)
                 .padding(.bottom, 4)
             if let fee {
-                AmountView(title: "Exchange fee:",
-                           value: feeSign + fee.readableDescription,
-                           color: fee.isZero ? labelColor : feeColor,
+                let feeSign = incoming ? "- " : "+ "
+                AmountView(title: feeSign + String(localized: "Exchange fee:"),
+                           value: fee.readableDescription,
+                           color: labelColor,
                            large: false)
                 .padding(.bottom, 4)
             }
@@ -68,7 +66,7 @@ struct ThreeAmountsView: View {
                        large: large)
             if let baseURL {
                 VStack(alignment: .leading) {
-                    Text(incoming ? "from Exchange:" : "to Exchange:")
+                    Text("Using Exchange:")
                         .multilineTextAlignment(.leading)
                         .font(.body)
                     HStack {
diff --git a/TalerWallet1/Views/Transactions/TransactionDetailView.swift 
b/TalerWallet1/Views/Transactions/TransactionDetailView.swift
index bb2f404..3178519 100644
--- a/TalerWallet1/Views/Transactions/TransactionDetailView.swift
+++ b/TalerWallet1/Views/Transactions/TransactionDetailView.swift
@@ -52,9 +52,7 @@ struct TransactionDetailView: View {
         let common = transaction.common
         let pending = transaction.isPending
         let dateString = TalerDater.dateString(from: common.timestamp)
-        let localizedType = transaction.localizedType
-        let navTitle2 = pending ? String(localized: "Pending")
-                               : localizedType
+        let navTitle2 = transaction.localizedType
         Group {
             List {
                 if developerMode {
@@ -224,10 +222,6 @@ struct TransactionDetailView: View {
                         let details = rewardTransaction.details                
 // TODO: more details
                         ThreeAmountsSheet(common: common, topTitle: 
String(localized: "Received Reward:"),
                                          baseURL: details.exchangeBaseUrl, 
large: true)
-//                case .tip(let tipTransaction):
-//                    let details = tipTransaction.details                  // 
TODO: details
-//                    ThreeAmountsSheet(common: common, topTitle: 
String(localized: "Received Tip:"),
-//                                      baseURL: nil, large: true)
                     case .refresh(let refreshTransaction):
                         let details = refreshTransaction.details               
 // TODO: details
                         ThreeAmountsSheet(common: common, topTitle: 
String(localized: "Refreshed amount:"),

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