Updated on 2026-08-14
This commit is contained in:
commit
bf0a8efd7e
97 changed files with 1537 additions and 507 deletions
|
|
@ -17,7 +17,7 @@
|
|||
},
|
||||
{
|
||||
"name": "APP_REDESIGN_ENABLED",
|
||||
"version": "5.40"
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"name": "GASLESS_APPROVAL_ENABLED",
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
},
|
||||
{
|
||||
"name": "TWI_1326_YIELD_MODE_SWAP_ENABLED",
|
||||
"version": "undefined"
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"name": "ADDRESS_SYNC_ENABLED",
|
||||
|
|
@ -65,11 +65,11 @@
|
|||
},
|
||||
{
|
||||
"name": "AND_15207_SWAP_SWITCH_TO_TRANSFER_ENABLED",
|
||||
"version": "undefined"
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"name": "AND_15120_SWAP_INTEGRATED_APPROVE",
|
||||
"version": "undefined"
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"name": "SWAP_AB_ENABLED",
|
||||
|
|
@ -81,12 +81,16 @@
|
|||
},
|
||||
{
|
||||
"name": "AND_15596_ONBOARDING_PUSH_NOTIFICATION_DOUBLE_ASK_AB_ENABLED",
|
||||
"version": "undefined"
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"name": "AND_15310_ADD_FUNDS_STAGE1",
|
||||
"version": "5.39"
|
||||
},
|
||||
{
|
||||
"name": "TWI_1377_MANAGE_FUNDS",
|
||||
"version": "5.40"
|
||||
},
|
||||
{
|
||||
"name": "AND_15009_SWAP_PROVIDER_FILTER_ENABLED",
|
||||
"version": "5.39"
|
||||
|
|
@ -121,19 +125,19 @@
|
|||
},
|
||||
{
|
||||
"name": "AND_15482_SURVEYSPARROW_ENABLED",
|
||||
"version": "undefined"
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"name": "AND_15258_QUICK_TOP_UP_ENABLED",
|
||||
"version": "undefined"
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"name": "AND_15368_VISA_PAY_REDESIGN",
|
||||
"version": "undefined"
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"name": "AND_15364_VISA_PAY_CARD_CLOSE",
|
||||
"version": "undefined"
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"name": "AND_15741_VISA_PAY_REMOVE_ACCOUNT",
|
||||
|
|
@ -145,15 +149,15 @@
|
|||
},
|
||||
{
|
||||
"name": "AND_15489_EXPRESS_SHARE_BUTTON_ENABLED",
|
||||
"version": "undefined"
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"name": "AND_15235_VISA_MULTIPLE_CARDS",
|
||||
"version": "5.40"
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"name": "AND_15715_SWAP_BEST_DEX_RATE_ENABLED",
|
||||
"version": "undefined"
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"name": "AND_15767_NEW_TX_HISTORY_ENABLED",
|
||||
|
|
|
|||
|
|
@ -332,6 +332,7 @@
|
|||
<string name="common_error">Error</string>
|
||||
<string name="common_estimated_fee">Top-up network fee</string>
|
||||
<string name="common_exchange">Swap</string>
|
||||
<string name="common_send_with_swap">Send&Swap</string>
|
||||
<string name="common_explore">Explore</string>
|
||||
<string name="common_explore_transaction_history">Explore transaction history</string>
|
||||
<string name="common_explorer">Explorer</string>
|
||||
|
|
@ -1294,6 +1295,7 @@
|
|||
<string name="quick_action_sell_description">Sell crypto securely</string>
|
||||
<string name="quick_action_send_description">Send to another wallet</string>
|
||||
<string name="quick_action_swap_description">Between your portfolios</string>
|
||||
<string name="quick_action_send_and_swap_description">Send with swap to another token</string>
|
||||
<string name="quick_top_up_chip_other">Other</string>
|
||||
<string name="quick_top_up_title">Quick top up</string>
|
||||
<string name="receive_bottom_sheet_no_memo_required_message">No memo required</string>
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ private fun BottomSheetIconContainer(
|
|||
}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Composable
|
||||
private fun BottomSheetIcon(icon: MessageBottomSheetUM.Icon, modifier: Modifier = Modifier) {
|
||||
val tint = when (icon.type) {
|
||||
|
|
@ -178,7 +179,9 @@ private fun BottomSheetIcon(icon: MessageBottomSheetUM.Icon, modifier: Modifier
|
|||
|
||||
val backgroundColor = when (icon.backgroundType) {
|
||||
MessageBottomSheetUM.Icon.BackgroundType.Unspecified -> Color.Unspecified
|
||||
MessageBottomSheetUM.Icon.BackgroundType.SameAsTint -> tint
|
||||
MessageBottomSheetUM.Icon.BackgroundType.SameAsTint -> {
|
||||
if (tint == Color.Unspecified) Color.Unspecified else tint.copy(alpha = 0.1f)
|
||||
}
|
||||
MessageBottomSheetUM.Icon.BackgroundType.Accent -> TangemTheme.colors3.bg.status.infoSubtle
|
||||
MessageBottomSheetUM.Icon.BackgroundType.Informative -> TangemTheme.colors3.bg.status.infoSubtle
|
||||
MessageBottomSheetUM.Icon.BackgroundType.Attention -> TangemTheme.colors3.bg.status.warningSubtle
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
|||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
|
|
@ -25,6 +26,8 @@ import androidx.compose.ui.layout.layoutId
|
|||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.vectorResource
|
||||
import androidx.compose.ui.text.SpanStyle
|
||||
import androidx.compose.ui.text.buildAnnotatedString
|
||||
import androidx.compose.ui.text.style.TextDecoration
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
|
|
@ -201,9 +204,15 @@ private fun SubtitleText(subtitle: ContentSubtitle, status: Status, modifier: Mo
|
|||
overflow = TextOverflow.Ellipsis,
|
||||
modifier = modifier,
|
||||
)
|
||||
is ContentSubtitle.PlainAddress -> PlainAddressText(
|
||||
subtitle = subtitle,
|
||||
status = status,
|
||||
modifier = modifier,
|
||||
)
|
||||
is ContentSubtitle.ExternalAddress -> InlineImageSubtitle(
|
||||
template = stringResourceSafe(subtitle.direction.templateResId(), subtitle.briefAddress),
|
||||
color = tertiary,
|
||||
afterIconColor = if (isFailed) tertiary else primary,
|
||||
modifier = modifier,
|
||||
) {
|
||||
IdentIcon(
|
||||
|
|
@ -256,6 +265,33 @@ private fun SubtitleText(subtitle: ContentSubtitle, status: Status, modifier: Mo
|
|||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun PlainAddressText(subtitle: ContentSubtitle.PlainAddress, status: Status, modifier: Modifier = Modifier) {
|
||||
val full = subtitle.text.resolveReference()
|
||||
val highlightColor = if (status is Status.Failed) {
|
||||
TangemTheme.colors2.text.neutral.tertiary
|
||||
} else {
|
||||
TangemTheme.colors2.text.neutral.primary
|
||||
}
|
||||
val text = remember(full, subtitle.highlight, highlightColor) {
|
||||
buildAnnotatedString {
|
||||
append(full)
|
||||
val start = full.lastIndexOf(subtitle.highlight)
|
||||
if (start >= 0) {
|
||||
addStyle(SpanStyle(color = highlightColor), start, start + subtitle.highlight.length)
|
||||
}
|
||||
}
|
||||
}
|
||||
Text(
|
||||
text = text,
|
||||
color = TangemTheme.colors2.text.neutral.tertiary,
|
||||
style = TangemTheme.typography2.captionMedium12,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
modifier = modifier,
|
||||
)
|
||||
}
|
||||
|
||||
private fun ContentSubtitle.Direction.templateResId(): Int = when (this) {
|
||||
ContentSubtitle.Direction.TO -> R.string.transaction_history_to_inline_address
|
||||
ContentSubtitle.Direction.FROM -> R.string.transaction_history_from_inline_address
|
||||
|
|
|
|||
|
|
@ -55,9 +55,16 @@ sealed interface TransactionItemUM {
|
|||
/** Subtitle variants for [Content] rows. */
|
||||
@Immutable
|
||||
sealed interface ContentSubtitle {
|
||||
/** Plain text — for types without a directly-displayable address (Operation, GaslessFee, ClaimRewards, etc.). */
|
||||
/** Plain text — for types without a displayable address (Operation, GaslessFee, ClaimRewards, etc.). */
|
||||
data class Plain(val text: TextReference) : ContentSubtitle
|
||||
|
||||
/**
|
||||
* Plain-text address subtitle without an identicon — renders "prefix: <address>", where [highlight]
|
||||
* (a substring of the resolved [text]) is painted in the primary text color while the prefix stays
|
||||
* tertiary. Used for contract / validator addresses, external swap addresses and yield "for: <address>".
|
||||
*/
|
||||
data class PlainAddress(val text: TextReference, val highlight: String) : ContentSubtitle
|
||||
|
||||
/**
|
||||
* External counterparty address — renders as "to/from: <identicon> <briefAddress>".
|
||||
* Used for Transfer to/from external addresses.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue