DepositWithdrawV.swift (1286B)
1 /* 2 * This file is part of GNU Taler, ©2022-25 Taler Systems S.A. 3 * See LICENSE.md 4 */ 5 /** 6 * @author Marc Stibane 7 */ 8 import SwiftUI 9 10 /// [Withdraw] [Deposit] 11 struct DepositWithdrawV: View { 12 let stack: CallStack 13 let sendDisabled: Bool // can't send/deposit if wallet has no coins at all 14 let recvDisabled: Bool // can't receive/withdraw if wallet has no payments services 15 16 var body: some View { 17 let depositTitle = String(localized: "DepositButton_Short", defaultValue: "Deposit", 18 comment: "Abbreviation of button `Deposit (currency)´") 19 let withdrawTitle = String(localized: "WithdrawButton_Short", defaultValue: "Withdraw", 20 comment: "Abbreviation of button `Withdraw (currency)´") 21 TwoRowButtons(stack: stack.push(), 22 sendTitle: depositTitle, 23 sendType: .deposit, 24 sendA11y: depositTitle, 25 recvTitle: withdrawTitle, 26 recvType: .withdrawal, 27 recvA11y: withdrawTitle, 28 sendDisabled: sendDisabled, 29 sendAction: .DepositAction, 30 recvDisabled: recvDisabled, 31 recvAction: .WithdrawAction) 32 } 33 }