taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit 42d0f2712016cafa7931f22bdc6fb9881fe79c94
parent 275d69ea0c88c52ea3f8e55b78c7a466ae84be88
Author: Marc Stibane <marc@taler.net>
Date:   Sun, 10 Sep 2023 13:30:21 +0200

ToSButton

Diffstat:
MTalerWallet1/Views/HelperViews/ToSButtonView.swift | 20++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/TalerWallet1/Views/HelperViews/ToSButtonView.swift b/TalerWallet1/Views/HelperViews/ToSButtonView.swift @@ -9,11 +9,27 @@ import SwiftUI struct ToSButtonView: View { + let exchangeBaseUrl: String? + let viewID: Int // either VIEW_WITHDRAW_TOS or SHEET_WITHDRAW_TOS + let p2p: Bool + var body: some View { - Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + let hint = p2p ? String(localized: "You must accept the Exchange's Terms of Service first before you can receive electronic cash in your wallet.", comment: "P2P Receive") + : String(localized: "You must accept the Exchange's Terms of Service first before you can use it to withdraw electronic cash to your wallet.") + Text(hint) + .accessibilityFont(.body) + .multilineTextAlignment(.leading) + .padding() + NavigationLink(destination: LazyView { + WithdrawTOSView(exchangeBaseUrl: exchangeBaseUrl, + viewID: viewID, + acceptAction: nil) // pop back to here + }) { + Text("Terms of Service") // VIEW_WITHDRAW_TOS + }.buttonStyle(TalerButtonStyle(type: .prominent)) } } #Preview { - ToSButtonView() + ToSButtonView(exchangeBaseUrl: nil, viewID: 0, p2p: false) }