commit 78bb0265f05617d4f4c062706751cabbd39128ba
parent dbf95e6403d29c87b66e33a654583444da6def72
Author: Marc Stibane <marc@taler.net>
Date: Sun, 10 Sep 2023 11:16:25 +0200
Terms of Service
Diffstat:
5 files changed, 34 insertions(+), 35 deletions(-)
diff --git a/TalerWallet.xcodeproj/project.pbxproj b/TalerWallet.xcodeproj/project.pbxproj
@@ -222,6 +222,8 @@
4EEC157829F9032900D46A03 /* Sheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EEC157729F9032900D46A03 /* Sheet.swift */; };
4EEC157A29F9427F00D46A03 /* QRSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EEC157929F9427F00D46A03 /* QRSheet.swift */; };
4EF840A72A0B85F400EE0D47 /* CopyShare.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EF840A62A0B85F400EE0D47 /* CopyShare.swift */; };
+ 4EFA39602AA7946B00742548 /* ToSButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EFA395F2AA7946B00742548 /* ToSButtonView.swift */; };
+ 4EFA39612AA7946B00742548 /* ToSButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EFA395F2AA7946B00742548 /* ToSButtonView.swift */; };
ABC13AA32859962800D23185 /* taler-swift in Frameworks */ = {isa = PBXBuildFile; productRef = ABC13AA22859962800D23185 /* taler-swift */; };
ABE97B1D286D82BF00580772 /* AnyCodable in Frameworks */ = {isa = PBXBuildFile; productRef = ABE97B1C286D82BF00580772 /* AnyCodable */; };
/* End PBXBuildFile section */
@@ -376,6 +378,7 @@
4EEC157729F9032900D46A03 /* Sheet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Sheet.swift; sourceTree = "<group>"; };
4EEC157929F9427F00D46A03 /* QRSheet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRSheet.swift; sourceTree = "<group>"; };
4EF840A62A0B85F400EE0D47 /* CopyShare.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CopyShare.swift; sourceTree = "<group>"; };
+ 4EFA395F2AA7946B00742548 /* ToSButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToSButtonView.swift; sourceTree = "<group>"; };
AB710490285995B6008B04F0 /* taler-swift */ = {isa = PBXFileReference; lastKnownFileType = text; path = "taler-swift"; sourceTree = SOURCE_ROOT; };
D14AFD1D24D232B300C51073 /* Taler_Wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Taler_Wallet.app; sourceTree = BUILT_PRODUCTS_DIR; };
D14AFD3324D232B500C51073 /* TalerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TalerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -697,6 +700,7 @@
4EB095492989CBFE0043A8A1 /* AmountView.swift */,
4EB0954A2989CBFE0043A8A1 /* LoadingView.swift */,
4EB095432989CBFE0043A8A1 /* LaunchAnimationView.swift */,
+ 4EFA395F2AA7946B00742548 /* ToSButtonView.swift */,
);
path = HelperViews;
sourceTree = "<group>";
@@ -1026,6 +1030,7 @@
4E3EAE4C2A990778009F1BE8 /* AmountView.swift in Sources */,
4E3EAE4D2A990778009F1BE8 /* P2pAcceptDone.swift in Sources */,
4E3EAE4E2A990778009F1BE8 /* AnyTransition+backslide.swift in Sources */,
+ 4EFA39602AA7946B00742548 /* ToSButtonView.swift in Sources */,
4E3EAE4F2A990778009F1BE8 /* BalanceRowButtons.swift in Sources */,
4E3EAE502A990778009F1BE8 /* Model+Transactions.swift in Sources */,
4E3EAE512A990778009F1BE8 /* Controller+playSound.swift in Sources */,
@@ -1122,6 +1127,7 @@
4EB0956C2989CBFE0043A8A1 /* AmountView.swift in Sources */,
4E3B4BC32A42252300CC88B8 /* P2pAcceptDone.swift in Sources */,
4E363CBE2A23CB2100D7E98C /* AnyTransition+backslide.swift in Sources */,
+ 4EFA39612AA7946B00742548 /* ToSButtonView.swift in Sources */,
4EB065442A4CD1A80039B91D /* BalanceRowButtons.swift in Sources */,
4EB095592989CBFE0043A8A1 /* Model+Transactions.swift in Sources */,
4E578E922A481D8600F21F1C /* Controller+playSound.swift in Sources */,
diff --git a/TalerWallet1/Views/Exchange/ManualWithdraw.swift b/TalerWallet1/Views/Exchange/ManualWithdraw.swift
@@ -58,17 +58,9 @@ struct ManualWithdraw: View {
Text("Confirm Withdrawal") // VIEW_WITHDRAW_ACCEPT
}.buttonStyle(TalerButtonStyle(type: .prominent))
} else {
- Text("You must accept the Terms of Service first before you can withdraw electronic cash to your wallet.")
- .font(.talerBody)
- .multilineTextAlignment(.leading)
- .padding()
- NavigationLink(destination: LazyView {
- WithdrawTOSView(exchangeBaseUrl: exchange.exchangeBaseUrl,
- viewID: VIEW_WITHDRAW_TOS,
- acceptAction: nil) // pop back to here
- }) {
- Text("Read Terms of Service") // VIEW_WITHDRAW_TOS
- }.buttonStyle(TalerButtonStyle(type: .prominent))
+ ToSButtonView(exchangeBaseUrl: exchange.exchangeBaseUrl,
+ viewID: VIEW_WITHDRAW_TOS,
+ p2p: false)
}
}
} // disabled
diff --git a/TalerWallet1/Views/HelperViews/ToSButtonView.swift b/TalerWallet1/Views/HelperViews/ToSButtonView.swift
@@ -0,0 +1,19 @@
+//
+// ToSButtonView.swift
+// TalerWallet
+//
+// Created by Marc Stibane on 2023-09-05.
+// Copyright © 2023 Taler. All rights reserved.
+//
+
+import SwiftUI
+
+struct ToSButtonView: View {
+ var body: some View {
+ Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
+ }
+}
+
+#Preview {
+ ToSButtonView()
+}
diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
@@ -47,18 +47,9 @@ struct P2pReceiveURIView: View {
}.buttonStyle(TalerButtonStyle(type: .prominent))
.padding()
} else {
- Text("You must accept the Terms of Service first before you can receive electronic cash to your wallet.")
- .font(.talerBody)
- .multilineTextAlignment(.leading)
- .padding()
- NavigationLink(destination: LazyView {
- WithdrawTOSView(exchangeBaseUrl: nil,
- viewID: SHEET_RCV_P2P_TOS,
- acceptAction: nil) // pop back to here
- }) {
- Text("Read Terms of Service")
- }.buttonStyle(TalerButtonStyle(type: .prominent))
- .padding()
+ ToSButtonView(exchangeBaseUrl: nil,
+ viewID: SHEET_RCV_P2P_TOS,
+ p2p: true)
}
} else {
// Yikes no details or no baseURL
diff --git a/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawURIView.swift b/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawURIView.swift
@@ -56,18 +56,9 @@ struct WithdrawURIView: View {
}.buttonStyle(TalerButtonStyle(type: .prominent))
.padding()
} else {
- Text("You must accept the Exchange's Terms of Service first before you can use it to withdraw electronic cash to your wallet.")
- .font(.talerBody)
- .multilineTextAlignment(.leading)
- .padding()
- NavigationLink(destination: LazyView {
- WithdrawTOSView(exchangeBaseUrl: exchangeBaseUrl,
- viewID: SHEET_WITHDRAW_TOS,
- acceptAction: nil) // pop back to here
- }) {
- Text("Read Terms of Service") // VIEW_WITHDRAW_TOS
- }.buttonStyle(TalerButtonStyle(type: .prominent))
- .padding()
+ ToSButtonView(exchangeBaseUrl: exchangeBaseUrl,
+ viewID: SHEET_WITHDRAW_TOS,
+ p2p: false)
}
} else {
// Yikes no details or no baseURL