Updated on 2026-08-14
This commit is contained in:
parent
aa05aafc8b
commit
06d083b283
8 changed files with 35 additions and 33 deletions
|
|
@ -2,9 +2,10 @@ package com.tangem.features.send.v2.subcomponents.amount.model
|
|||
|
||||
import com.tangem.core.decompose.di.ModelScoped
|
||||
import com.tangem.core.decompose.ui.UiMessageSender
|
||||
import com.tangem.core.ui.extensions.stringReference
|
||||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.core.ui.message.DialogMessage
|
||||
import com.tangem.core.ui.message.EventMessageAction
|
||||
import com.tangem.features.send.v2.impl.R
|
||||
import javax.inject.Inject
|
||||
|
||||
@ModelScoped
|
||||
|
|
@ -13,20 +14,19 @@ internal class SendAmountAlertFactory @Inject constructor(
|
|||
) {
|
||||
|
||||
fun showResetSendingAlert(onConfirm: () -> Unit) {
|
||||
// todo fix localization [REDACTED_TASK_KEY]
|
||||
uiMessageSender.send(
|
||||
DialogMessage(
|
||||
title = stringReference("Confirm Convert"),
|
||||
message = stringReference("Proceed with conversion? Previous data will be reset."),
|
||||
title = resourceReference(R.string.send_with_swap_convert_token_alert_title),
|
||||
message = resourceReference(R.string.send_with_swap_convert_token_alert_message),
|
||||
firstActionBuilder = {
|
||||
EventMessageAction(
|
||||
title = stringReference("Confirm"),
|
||||
title = resourceReference(R.string.common_confirm),
|
||||
onClick = onConfirm,
|
||||
)
|
||||
},
|
||||
secondActionBuilder = {
|
||||
EventMessageAction(
|
||||
title = stringReference("Not Now"),
|
||||
title = resourceReference(R.string.common_not_now),
|
||||
onClick = onDismissRequest,
|
||||
)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameterProvider
|
|||
import com.tangem.core.ui.components.icons.identicon.IdentIcon
|
||||
import com.tangem.core.ui.extensions.TextReference
|
||||
import com.tangem.core.ui.extensions.resolveReference
|
||||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.core.ui.extensions.stringResourceSafe
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.core.ui.res.TangemThemePreview
|
||||
|
|
@ -62,7 +63,7 @@ private fun AddressBlock(address: DestinationTextFieldUM.RecipientAddress) {
|
|||
Text(
|
||||
text = address.label.resolveReference(),
|
||||
style = TangemTheme.typography.subtitle2,
|
||||
color = TangemTheme.colors.text.secondary,
|
||||
color = TangemTheme.colors.text.tertiary,
|
||||
)
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
|
|
@ -104,7 +105,7 @@ private fun MemoBlock(memo: DestinationTextFieldUM.RecipientMemo?) {
|
|||
Text(
|
||||
text = memo.label.resolveReference(),
|
||||
style = TangemTheme.typography.subtitle2,
|
||||
color = TangemTheme.colors.text.secondary,
|
||||
color = TangemTheme.colors.text.tertiary,
|
||||
)
|
||||
Text(
|
||||
text = memo.value,
|
||||
|
|
@ -121,7 +122,7 @@ private fun AddressWithMemoBlock(
|
|||
memo: DestinationTextFieldUM.RecipientMemo?,
|
||||
) {
|
||||
Text(
|
||||
text = stringResourceSafe(R.string.send_to_address),
|
||||
text = stringResourceSafe(R.string.send_recipient),
|
||||
style = TangemTheme.typography.subtitle2,
|
||||
color = TangemTheme.colors.text.tertiary,
|
||||
)
|
||||
|
|
@ -188,7 +189,7 @@ private class DestinationBlockPreviewProvider : PreviewParameterProvider<Destina
|
|||
value = "0x34B4492A412D84A6E606288f3Bd714b89135D4dE",
|
||||
keyboardOptions = KeyboardOptions.Default,
|
||||
placeholder = TextReference.Str("Enter address"),
|
||||
label = TextReference.Str("Recipient Address"),
|
||||
label = resourceReference(R.string.send_recipient),
|
||||
isError = false,
|
||||
error = null,
|
||||
isValuePasted = false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue