TransferCyclos.kt (3250B)
1 /* 2 * This file is part of GNU Taler 3 * (C) 2026 Taler Systems S.A. 4 * 5 * GNU Taler is free software; you can redistribute it and/or modify it under the 6 * terms of the GNU General Public License as published by the Free Software 7 * Foundation; either version 3, or (at your option) any later version. 8 * 9 * GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY 10 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 11 * A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License along with 14 * GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> 15 */ 16 17 package net.taler.wallet.transfer 18 19 import androidx.compose.foundation.layout.Column 20 import androidx.compose.foundation.layout.padding 21 import androidx.compose.material3.HorizontalDivider 22 import androidx.compose.material3.MaterialTheme 23 import androidx.compose.material3.Text 24 import androidx.compose.runtime.Composable 25 import androidx.compose.ui.Alignment 26 import androidx.compose.ui.Modifier 27 import androidx.compose.ui.res.stringResource 28 import androidx.compose.ui.unit.dp 29 import net.taler.common.Amount 30 import net.taler.wallet.R 31 import net.taler.wallet.compose.WarningLabel 32 import net.taler.wallet.withdraw.TransferData 33 34 @Composable 35 fun TransferCyclos( 36 transfer: TransferData.Cyclos, 37 transactionAmountEffective: Amount, 38 // TODO: transferContext? 39 ) { 40 Column( 41 modifier = Modifier.padding(all = 16.dp), 42 horizontalAlignment = Alignment.CenterHorizontally, 43 ) { 44 Text( 45 stringResource( 46 R.string.withdraw_manual_ready_intro, 47 transfer.transferAmount, 48 transactionAmountEffective, 49 ), 50 style = MaterialTheme.typography.bodyLarge, 51 modifier = Modifier 52 .padding(vertical = 8.dp) 53 ) 54 55 WarningLabel( 56 modifier = Modifier.padding( 57 horizontal = 8.dp, 58 vertical = 16.dp, 59 ), 60 label = stringResource(R.string.send_deposit_kyc_auth_warning_account), 61 ) 62 63 HorizontalDivider( 64 modifier = Modifier.padding(vertical = 6.dp) 65 ) 66 67 TransferStep(1, stringResource(R.string.withdraw_manual_step_cyclos)) 68 69 DetailRow( 70 stringResource(R.string.withdraw_manual_ready_receiver), 71 transfer.receiverName, 72 ) 73 74 WithdrawalAmountTransfer( 75 conversionAmountRaw = transfer.transferAmount, 76 ) 77 78 TransferStep(2, stringResource(R.string.withdraw_manual_step_subject)) 79 80 WarningLabel( 81 modifier = Modifier.padding( 82 horizontal = 8.dp, 83 vertical = 16.dp, 84 ), 85 label = stringResource(R.string.withdraw_manual_ready_warning), 86 ) 87 88 DetailRow( 89 stringResource(R.string.withdraw_manual_ready_subject), 90 transfer.subject, 91 characterBreak = true, 92 ) 93 94 TransferStep(3, 95 stringResource( 96 R.string.withdraw_manual_step_finish, 97 transfer.transferAmount, 98 ), 99 ) 100 } 101 }