taler-ios

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

SendRequestV.swift (1247B)


      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 ///    [􁉇Send]  [􁉅Request]
     11 struct SendRequestV: 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 sendTitle = String(localized: "SendButton_Short", defaultValue: "Send",
     18                                  comment: "Abbreviation of button `Send (currency)´")
     19         let requTitle = String(localized: "RequestButton_Short", defaultValue: "Request",
     20                                  comment: "Abbreviation of button `Request (currency)´")
     21         TwoRowButtons(stack: stack.push(),
     22                   sendTitle: sendTitle,
     23                    sendType: .peerPushDebit,
     24                    sendA11y: sendTitle,
     25                   recvTitle: requTitle,
     26                    recvType: .peerPullCredit,
     27                    recvA11y: requTitle,
     28                sendDisabled: sendDisabled,
     29                  sendAction: .SendAction,
     30                recvDisabled: recvDisabled,
     31                  recvAction: .RequestAction)
     32     }
     33 }