Updated on 2026-08-14
This commit is contained in:
parent
fbc15cbb8c
commit
7b00754e24
12 changed files with 77 additions and 51 deletions
|
|
@ -34,7 +34,7 @@ internal fun NewsSlider(newsSliderConfig: NewsSliderConfig) {
|
|||
.conditionalCompose(
|
||||
condition = isRedesignEnabled,
|
||||
modifier = {
|
||||
hazeSourceTangem(-1f)
|
||||
hazeSourceTangem(zIndex = -1f)
|
||||
},
|
||||
)
|
||||
.background(color = background),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
@file:Suppress("MagicNumber", "LongMethod")
|
||||
|
||||
package com.tangem.feature.tester.presentation.storybook.page.background
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
|
|
@ -15,6 +16,7 @@ import androidx.compose.ui.graphics.Color
|
|||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.tangem.core.ui.components.background.northernlights.NorthernLightsBackground
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.feature.tester.presentation.storybook.entity.NorthernLightsStory
|
||||
|
||||
@Composable
|
||||
|
|
@ -22,6 +24,7 @@ internal fun NorthernLightsStory(state: NorthernLightsStory, modifier: Modifier
|
|||
Box(modifier = modifier.fillMaxSize()) {
|
||||
NorthernLightsBackground(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
containerColor = TangemTheme.colors2.surface.level1,
|
||||
forceSimpleVersion = state.variant == NorthernLightsStory.Variant.Simple,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import com.tangem.core.ui.decompose.ComposableBottomSheetComponent
|
|||
import com.tangem.core.ui.extensions.resolveReference
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.TokenActionButtonUM
|
||||
import com.tangem.feature.wallet.presentation.wallet.ui.components.fastForEach
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
|
||||
|
|
@ -36,7 +37,7 @@ internal class TokenActionsComponent @AssistedInject constructor(
|
|||
),
|
||||
) {
|
||||
Column {
|
||||
params.actions.forEach { action ->
|
||||
params.actions.fastForEach { action ->
|
||||
if (action.isEnabled) {
|
||||
val rowColors = if (action.isWarning) {
|
||||
getWarningRowColors()
|
||||
|
|
|
|||
|
|
@ -54,10 +54,7 @@ import com.tangem.core.ui.ds.topbar.collapsing.TangemCollapsingTopBar
|
|||
import com.tangem.core.ui.ds.topbar.collapsing.rememberTangemExitUntilCollapsedScrollBehavior
|
||||
import com.tangem.core.ui.event.StateEvent
|
||||
import com.tangem.core.ui.extensions.TextReference
|
||||
import com.tangem.core.ui.res.LocalMainBottomSheetColor
|
||||
import com.tangem.core.ui.res.LocalWindowSize
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.core.ui.res.TangemThemePreviewRedesign
|
||||
import com.tangem.core.ui.res.*
|
||||
import com.tangem.feature.wallet.presentation.common.preview.WalletScreenPreviewData
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.NOT_INITIALIZED_WALLET_INDEX
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletBalanceUM
|
||||
|
|
@ -181,9 +178,16 @@ private fun WalletContent2(
|
|||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.hazeSourceTangem(-1f),
|
||||
.hazeSourceTangem(zIndex = -1f),
|
||||
) {
|
||||
NorthernLightsBackground(Modifier.matchParentSize())
|
||||
NorthernLightsBackground(
|
||||
containerColor = if (LocalIsInDarkTheme.current) {
|
||||
TangemTheme.colors2.surface.level1
|
||||
} else {
|
||||
TangemTheme.colors2.surface.level2
|
||||
},
|
||||
modifier = Modifier.matchParentSize(),
|
||||
)
|
||||
|
||||
WalletPagerIndicator(
|
||||
pagerState = walletsPagerState,
|
||||
|
|
@ -201,7 +205,7 @@ private fun WalletContent2(
|
|||
state.wallets2[state.selectedWalletIndex]
|
||||
}
|
||||
|
||||
LaunchedEffect(walletsPagerState.currentPage) {
|
||||
LaunchedEffect(walletsPagerState.currentPage, currentWallet.walletsBalanceUM) {
|
||||
if (walletsPagerState.currentPage == currentWalletIndex) {
|
||||
walletBalance = (currentWallet.walletsBalanceUM as? WalletBalanceUM.Content)?.balanceInAppBar
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ import com.tangem.feature.wallet.presentation.preview.WalletBalancePreview
|
|||
import com.tangem.feature.wallet.presentation.preview.WalletPreviewData
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletBalanceUM
|
||||
import com.tangem.feature.wallet.presentation.wallet.ui.components.fastForEach
|
||||
import com.tangem.utils.StringsSigns
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
|
||||
private const val MIN_SCALE = 0.75f
|
||||
|
|
@ -135,7 +136,19 @@ private fun Balance(walletBalanceUM: WalletBalanceUM, isBalanceHidden: Boolean,
|
|||
),
|
||||
)
|
||||
}
|
||||
is WalletBalanceUM.Error,
|
||||
is WalletBalanceUM.Error -> {
|
||||
Text(
|
||||
text = StringsSigns.DASH_SIGN,
|
||||
style = TangemTheme.typography2.titleRegular44,
|
||||
color = TangemTheme.colors2.text.neutral.primary,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
autoSize = TextAutoSize.StepBased(
|
||||
minFontSize = TangemTheme.typography2.bodySemibold15.fontSize,
|
||||
maxFontSize = TangemTheme.typography2.titleRegular44.fontSize,
|
||||
),
|
||||
)
|
||||
}
|
||||
is WalletBalanceUM.Loading,
|
||||
-> {
|
||||
TextShimmer(
|
||||
|
|
|
|||
|
|
@ -45,16 +45,14 @@ internal fun WalletListContent(
|
|||
overscrollEffect = rememberOverscrollEffect(),
|
||||
) {
|
||||
notifications(
|
||||
notifications = currentWallet.notifications.map { it.messageUM }
|
||||
.toPersistentList(),
|
||||
notifications = currentWallet.notifications.map { it.messageUM }.toPersistentList(),
|
||||
contentColor = containerColor,
|
||||
modifier = movableItemModifier,
|
||||
)
|
||||
notificationsCarousel(
|
||||
containerColor = containerColor,
|
||||
modifier = movableItemModifier,
|
||||
notifications = currentWallet.notifications.map { it.messageUM }
|
||||
.toPersistentList(),
|
||||
notifications = currentWallet.notificationsCarousel.map { it.messageUM }.toPersistentList(),
|
||||
)
|
||||
|
||||
tangemPay(
|
||||
|
|
|
|||
|
|
@ -204,6 +204,7 @@ private fun LazyListScope.portfolioItem(
|
|||
)
|
||||
is TangemHeaderRowUM -> TangemHeaderRow(
|
||||
headerRowUM = tokenRowUM,
|
||||
isBalanceHidden = isBalanceHidden,
|
||||
modifier = itemModifier,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue