Updated on 2026-08-14
This commit is contained in:
parent
75d52da275
commit
427715888d
9 changed files with 10 additions and 17 deletions
|
|
@ -25,7 +25,6 @@ internal data class TangemPayCardPageUM(
|
|||
addToWalletBlockState: AddToWalletBlockState? = AddToWalletBlockState(
|
||||
onClick = {},
|
||||
onClickClose = {},
|
||||
shouldUseMagicEffect = false,
|
||||
),
|
||||
settings: ImmutableList<TangemPayCardPageSetting> = persistentListOf(
|
||||
TangemPayCardPageSetting(TextReference.Str("Pin Code")) {},
|
||||
|
|
|
|||
|
|
@ -97,5 +97,4 @@ internal sealed class TangemPayDetailsBalanceBlockState {
|
|||
internal data class AddToWalletBlockState(
|
||||
val onClick: () -> Unit,
|
||||
val onClickClose: () -> Unit,
|
||||
val shouldUseMagicEffect: Boolean,
|
||||
)
|
||||
|
|
@ -37,8 +37,8 @@ import com.tangem.domain.pay.repository.TangemPayCardDetailsRepository
|
|||
import com.tangem.domain.pay.usecase.ChangeCardFrozenStateUseCase
|
||||
import com.tangem.domain.tangempay.TangemPayAnalyticsEvents
|
||||
import com.tangem.features.tangempay.TangemPayFeatureToggles
|
||||
import com.tangem.features.tangempay.components.AddFundsListener
|
||||
import com.tangem.features.tangempay.closure.CloseCardListener
|
||||
import com.tangem.features.tangempay.components.AddFundsListener
|
||||
import com.tangem.features.tangempay.components.ReissueCardListener
|
||||
import com.tangem.features.tangempay.components.TangemPayCardPageComponent
|
||||
import com.tangem.features.tangempay.components.ViewPinListener
|
||||
|
|
@ -421,7 +421,6 @@ internal class TangemPayCardPageModel @Inject constructor(
|
|||
addToWalletBlockState = AddToWalletBlockState(
|
||||
onClick = ::onClickAddToWallet,
|
||||
onClickClose = ::onClickCloseBanner,
|
||||
shouldUseMagicEffect = false,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ internal class DetailsAddToWalletBannerTransformer(
|
|||
AddToWalletBlockState(
|
||||
onClick = onClickBanner,
|
||||
onClickClose = onClickCloseBanner,
|
||||
shouldUseMagicEffect = true,
|
||||
)
|
||||
},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ internal fun TangemPayAddToWalletBlock(state: AddToWalletBlockState, modifier: M
|
|||
}
|
||||
|
||||
@Composable
|
||||
internal fun TangemPayAddToWalletBlockV1(state: AddToWalletBlockState, modifier: Modifier = Modifier) {
|
||||
private fun TangemPayAddToWalletBlockV1(state: AddToWalletBlockState, modifier: Modifier = Modifier) {
|
||||
Box(
|
||||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
|
|
@ -114,17 +114,13 @@ internal fun TangemPayAddToWalletBlockV1(state: AddToWalletBlockState, modifier:
|
|||
}
|
||||
|
||||
@Composable
|
||||
internal fun TangemPayAddToWalletBlockV2(state: AddToWalletBlockState, modifier: Modifier = Modifier) {
|
||||
private fun TangemPayAddToWalletBlockV2(state: AddToWalletBlockState, modifier: Modifier = Modifier) {
|
||||
TangemMessage(
|
||||
modifier = modifier.clickableSingle(onClick = state.onClick),
|
||||
onCloseClick = state.onClickClose,
|
||||
title = resourceReference(R.string.tangempay_card_details_open_wallet_notification_title),
|
||||
subtitle = resourceReference(R.string.tangempay_card_details_open_wallet_notification_subtitle),
|
||||
messageEffect = if (state.shouldUseMagicEffect) {
|
||||
TangemMessageEffect.Magic
|
||||
} else {
|
||||
TangemMessageEffect.None
|
||||
},
|
||||
messageEffect = TangemMessageEffect.Magic,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -133,6 +129,6 @@ internal fun TangemPayAddToWalletBlockV2(state: AddToWalletBlockState, modifier:
|
|||
@Composable
|
||||
private fun PreviewTangemPayAddToWalletBlock() {
|
||||
TangemThemePreview {
|
||||
TangemPayAddToWalletBlock(AddToWalletBlockState(onClick = {}, onClickClose = {}, shouldUseMagicEffect = false))
|
||||
TangemPayAddToWalletBlock(AddToWalletBlockState(onClick = {}, onClickClose = {}))
|
||||
}
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.util.fastForEach
|
||||
import com.tangem.core.ui.components.appbar.AppBarWithBackButton
|
||||
import com.tangem.core.ui.ds.image.TangemIconUM
|
||||
|
|
@ -76,7 +77,7 @@ internal fun TangemPayCardPageScreen(
|
|||
end = TangemTheme.dimens.spacing16,
|
||||
bottom = TangemTheme.dimens.spacing16 + bottomBarHeight,
|
||||
),
|
||||
verticalArrangement = Arrangement.spacedBy(TangemTheme.dimens.spacing16),
|
||||
verticalArrangement = Arrangement.spacedBy(if (isRedesignEnabled) 0.dp else TangemTheme.dimens.spacing16),
|
||||
) {
|
||||
item(key = "Card") {
|
||||
cardDetailsBlockComponent.CardDetailsBlockContent(
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import com.tangem.features.tangempay.entity.TangemPayDailyLimitBlockState
|
|||
@Composable
|
||||
internal fun TangemPayDailyLimitBlock(state: TangemPayDailyLimitBlockState, modifier: Modifier = Modifier) {
|
||||
if (LocalVisaRedesignEnabled.current) {
|
||||
CurrentLimitBlockV2(state, modifier)
|
||||
CurrentLimitBlockV2(state, modifier.padding(top = TangemTheme.dimens2.x2))
|
||||
} else {
|
||||
TangemPayDailyLimitBlockV1(state, modifier)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -471,7 +471,6 @@ internal class TangemPayDetailsUMProvider : CollectionPreviewParameterProvider<T
|
|||
addToWalletBlockState = AddToWalletBlockState(
|
||||
onClick = {},
|
||||
onClickClose = {},
|
||||
shouldUseMagicEffect = false,
|
||||
),
|
||||
accountDeactivatedNotificationConfig = null,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.tangem.features.tangempay.ui
|
|||
|
||||
import android.content.res.Configuration
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.runtime.Composable
|
||||
|
|
@ -61,7 +62,7 @@ private fun BlockV2(
|
|||
subtitle: TextReference = resourceReference(R.string.tangempay_reissue_card_in_progress_description),
|
||||
) {
|
||||
TangemMessage(
|
||||
modifier = modifier,
|
||||
modifier = modifier.padding(top = TangemTheme.dimens2.x2),
|
||||
title = title,
|
||||
subtitle = subtitle,
|
||||
leadingContent = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue