[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 13/35: SendDone
From: |
gnunet |
Subject: |
[taler-taler-ios] 13/35: SendDone |
Date: |
Thu, 27 Jul 2023 09:09:46 +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 01726cada2e886147be614e59d837807da357d08
Author: Marc Stibane <marc@taler.net>
AuthorDate: Mon Jul 24 16:02:48 2023 +0200
SendDone
---
TalerWallet.xcodeproj/project.pbxproj | 8 ++--
TalerWallet1/Views/Peer2peer/PaymentPurpose.swift | 2 +-
.../Peer2peer/{SendNow.swift => SendDone.swift} | 50 ++++++++++++----------
TalerWallet1/Views/Peer2peer/SendPurpose.swift | 2 +-
4 files changed, 33 insertions(+), 29 deletions(-)
diff --git a/TalerWallet.xcodeproj/project.pbxproj
b/TalerWallet.xcodeproj/project.pbxproj
index 4cbd328..4861860 100644
--- a/TalerWallet.xcodeproj/project.pbxproj
+++ b/TalerWallet.xcodeproj/project.pbxproj
@@ -94,7 +94,7 @@
4EB0956E2989CBFE0043A8A1 /* Model+Pending.swift in Sources */ =
{isa = PBXBuildFile; fileRef = 4EB0954C2989CBFE0043A8A1 /* Model+Pending.swift
*/; };
4EB0956F2989CBFE0043A8A1 /* PendingOpView.swift in Sources */ =
{isa = PBXBuildFile; fileRef = 4EB0954D2989CBFE0043A8A1 /* PendingOpView.swift
*/; };
4EB095702989CBFE0043A8A1 /* PendingOpsListView.swift in Sources
*/ = {isa = PBXBuildFile; fileRef = 4EB0954E2989CBFE0043A8A1 /*
PendingOpsListView.swift */; };
- 4EB3136129FEE79B007D68BC /* SendNow.swift in Sources */ = {isa
= PBXBuildFile; fileRef = 4EB3136029FEE79B007D68BC /* SendNow.swift */; };
+ 4EB3136129FEE79B007D68BC /* SendDone.swift in Sources */ = {isa
= PBXBuildFile; fileRef = 4EB3136029FEE79B007D68BC /* SendDone.swift */; };
4EB431672A1E55C700C5690E /* ManualWithdrawDone.swift in Sources
*/ = {isa = PBXBuildFile; fileRef = 4EB431662A1E55C700C5690E /*
ManualWithdrawDone.swift */; };
4EBA82AB2A3EB2CA00E5F39A /* TransactionButton.swift in Sources
*/ = {isa = PBXBuildFile; fileRef = 4EBA82AA2A3EB2CA00E5F39A /*
TransactionButton.swift */; };
4EBA82AD2A3F580500E5F39A /* QuiteSomeCoins.swift in Sources */
= {isa = PBXBuildFile; fileRef = 4EBA82AC2A3F580500E5F39A /*
QuiteSomeCoins.swift */; };
@@ -232,7 +232,7 @@
4EB0954C2989CBFE0043A8A1 /* Model+Pending.swift */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path
= "Model+Pending.swift"; sourceTree = "<group>"; };
4EB0954D2989CBFE0043A8A1 /* PendingOpView.swift */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path
= PendingOpView.swift; sourceTree = "<group>"; };
4EB0954E2989CBFE0043A8A1 /* PendingOpsListView.swift */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift;
path = PendingOpsListView.swift; sourceTree = "<group>"; };
- 4EB3136029FEE79B007D68BC /* SendNow.swift */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path
= SendNow.swift; sourceTree = "<group>"; };
+ 4EB3136029FEE79B007D68BC /* SendDone.swift */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path
= SendDone.swift; sourceTree = "<group>"; };
4EB431662A1E55C700C5690E /* ManualWithdrawDone.swift */ = {isa
= PBXFileReference; lastKnownFileType = sourcecode.swift; path =
ManualWithdrawDone.swift; sourceTree = "<group>"; };
4EBA82AA2A3EB2CA00E5F39A /* TransactionButton.swift */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path
= TransactionButton.swift; sourceTree = "<group>"; };
4EBA82AC2A3F580500E5F39A /* QuiteSomeCoins.swift */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.swift; path =
QuiteSomeCoins.swift; sourceTree = "<group>"; };
@@ -538,7 +538,7 @@
children = (
4E40E0BD29F25ABB00B85369 /* SendAmount.swift */,
4E7940DD29FC307C00A9AEA1 /* SendPurpose.swift
*/,
- 4EB3136029FEE79B007D68BC /* SendNow.swift */,
+ 4EB3136029FEE79B007D68BC /* SendDone.swift */,
4E9320442A1645B600A87B0E /*
RequestPayment.swift */,
4E9320462A164BC700A87B0E /*
PaymentPurpose.swift */,
);
@@ -788,7 +788,7 @@
4EAD117629F672FA008EDD0B /*
KeyboardResponder.swift in Sources */,
4EB095572989CBFE0043A8A1 /*
TransactionRowView.swift in Sources */,
4EA1ABBE29A3833A008821EA /*
PublicConstants.swift in Sources */,
- 4EB3136129FEE79B007D68BC /* SendNow.swift in
Sources */,
+ 4EB3136129FEE79B007D68BC /* SendDone.swift in
Sources */,
4EB0956B2989CBFE0043A8A1 /*
TextFieldAlert.swift in Sources */,
4EBA82AD2A3F580500E5F39A /*
QuiteSomeCoins.swift in Sources */,
4EB431672A1E55C700C5690E /*
ManualWithdrawDone.swift in Sources */,
diff --git a/TalerWallet1/Views/Peer2peer/PaymentPurpose.swift
b/TalerWallet1/Views/Peer2peer/PaymentPurpose.swift
index a608488..969440a 100644
--- a/TalerWallet1/Views/Peer2peer/PaymentPurpose.swift
+++ b/TalerWallet1/Views/Peer2peer/PaymentPurpose.swift
@@ -65,7 +65,7 @@ struct PaymentPurpose: View {
let disabled = (expireDays == 0) || (summary.count < 1)
NavigationLink(destination: LazyView {
- SendNow(amountToSend: nil,
+ SendDone(amountToSend: nil,
amountToReceive: amount,
summary: summary, expireDays: expireDays)
}) {
diff --git a/TalerWallet1/Views/Peer2peer/SendNow.swift
b/TalerWallet1/Views/Peer2peer/SendDone.swift
similarity index 67%
rename from TalerWallet1/Views/Peer2peer/SendNow.swift
rename to TalerWallet1/Views/Peer2peer/SendDone.swift
index aba01b7..79b0918 100644
--- a/TalerWallet1/Views/Peer2peer/SendNow.swift
+++ b/TalerWallet1/Views/Peer2peer/SendDone.swift
@@ -6,13 +6,15 @@ import SwiftUI
import taler_swift
import SymLog
-struct SendNow: View {
+struct SendDone: View {
private let symLog = SymLogV()
+ let navTitle = String(localized: "P2P Ready")
#if DEBUG
@AppStorage("developerMode") var developerMode: Bool = true
#else
@AppStorage("developerMode") var developerMode: Bool = false
#endif
+ @AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic
let amountToSend: Amount?
let amountToReceive: Amount?
@@ -24,37 +26,39 @@ struct SendNow: View {
@State var talerURI: String = ""
var body: some View {
- VStack {
+ List {
+ let incoming = (amountToSend == nil)
+ QRCodeDetailView(talerURI: talerURI,
+ incoming: incoming,
+ amount: incoming ? amountToReceive :
amountToSend)
+ Text("QR code and link can also be scanned or copied / shared from
Transactions later.")
+ .multilineTextAlignment(.leading)
+ .font(.subheadline)
+ .padding(.top)
+ }
+ .listStyle(myListStyle.style).anyView
+ .safeAreaInset(edge: .bottom) {
+ Button("Done") {
+ withAnimation() { ViewState.shared.popToRootView() }
+ }
+ .buttonStyle(TalerButtonStyle(type: .prominent))
+ .padding(.horizontal)
+ }
+ .overlay {
if talerURI.isEmpty {
LoadingView(backButtonHidden: true)
- } else {
- QRCodeDetailView(talerURI: talerURI,
- incoming: amountToSend == nil)
- .padding()
- Text("The QR code can also be copied and shared from
Transactions later.")
- .fixedSize(horizontal: false, vertical: true)
- .font(.subheadline)
- .padding(.vertical, 20)
-
- Spacer()
- Button("Done") {
- withAnimation(){ ViewState.shared.popToRootView() }
- }
- .buttonStyle(TalerButtonStyle(type: .prominent))
- .padding()
-
}
}
-// .frame(maxWidth: .infinity, maxHeight: .infinity, alignment:
.leading)
-// .padding(.horizontal)
.interactiveDismissDisabled() // can only use "Done" button to
dismiss
- .navigationBarHidden(true) // no back button, no title
+ .navigationBarBackButtonHidden(true)
+ .navigationTitle(navTitle)
+// .navigationBarHidden(true) // no back button, no title
.background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
.task {
symLog.log(".task")
do {
// generate talerURI
- var timestamp = developerMode ?
Timestamp.inSomeMinutes(expireDays > 20 ? (24*60)
+ let timestamp = developerMode ?
Timestamp.inSomeMinutes(expireDays > 20 ? (24*60)
:
expireDays > 5 ? 60 : 3)
:
Timestamp.inSomeDays(expireDays)
if let amountToSend {
@@ -83,7 +87,7 @@ struct SendNow: View {
struct SendNow_Previews: PreviewProvider {
static var previews: some View {
Group {
- SendNow(amountToSend: try! Amount(fromString: LONGCURRENCY +
":4.8"),
+ SendDone(amountToSend: try! Amount(fromString: LONGCURRENCY +
":4.8"),
amountToReceive: nil,
summary: "some purpose",
expireDays: 0,
diff --git a/TalerWallet1/Views/Peer2peer/SendPurpose.swift
b/TalerWallet1/Views/Peer2peer/SendPurpose.swift
index 50ee382..3703d91 100644
--- a/TalerWallet1/Views/Peer2peer/SendPurpose.swift
+++ b/TalerWallet1/Views/Peer2peer/SendPurpose.swift
@@ -65,7 +65,7 @@ struct SendPurpose: View {
let disabled = (expireDays == 0) || (summary.count < 1) //
TODO: check amountAvailable
NavigationLink(destination: LazyView {
- SendNow(amountToSend: amount,
+ SendDone(amountToSend: amount,
amountToReceive: nil,
summary: summary, expireDays: expireDays)
}) {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 18/35: Expiration Constants, (continued)
- [taler-taler-ios] 18/35: Expiration Constants, gnunet, 2023/07/27
- [taler-taler-ios] 19/35: Move Status to top, gnunet, 2023/07/27
- [taler-taler-ios] 25/35: Simplified, gnunet, 2023/07/27
- [taler-taler-ios] 12/35: PayTo URL listRowSeparator, gnunet, 2023/07/27
- [taler-taler-ios] 14/35: Sound for Expired, gnunet, 2023/07/27
- [taler-taler-ios] 27/35: Postpone update until onAppear, gnunet, 2023/07/27
- [taler-taler-ios] 31/35: Expired, pending, gnunet, 2023/07/27
- [taler-taler-ios] 35/35: iOS: bump version to 0.9.3 (16), gnunet, 2023/07/27
- [taler-taler-ios] 22/35: extension TransactionsListView.Content => TransactionsRowsView, gnunet, 2023/07/27
- [taler-taler-ios] 21/35: fanblades.slash and clock.badge.xmark not in iOS 15, gnunet, 2023/07/27
- [taler-taler-ios] 13/35: SendDone,
gnunet <=
- [taler-taler-ios] 17/35: Warnings and hints no longer use "coins", gnunet, 2023/07/27
- [taler-taler-ios] 26/35: debug, cleanup, gnunet, 2023/07/27
- [taler-taler-ios] 30/35: small fixes, gnunet, 2023/07/27
- [taler-taler-ios] 32/35: TransactionDetailView, gnunet, 2023/07/27
- [taler-taler-ios] 16/35: rendering on small screens, gnunet, 2023/07/27
- [taler-taler-ios] 34/35: ScrollViewReader, gnunet, 2023/07/27
- [taler-taler-ios] 20/35: ToS, move Exchange down, gnunet, 2023/07/27
- [taler-taler-ios] 29/35: show up to 3 transactions in Balances, gnunet, 2023/07/27
- [taler-taler-ios] 33/35: Comments, gnunet, 2023/07/27
- [taler-taler-ios] 15/35: ToS, gnunet, 2023/07/27