Updated on 2026-08-14
This commit is contained in:
parent
069605e151
commit
36516c900f
234 changed files with 902 additions and 1618 deletions
|
|
@ -7,7 +7,9 @@ internal object SaveWalletReducer {
|
|||
fun reduce(action: Action, state: AppState): SaveWalletState {
|
||||
return if (action is SaveWalletAction) {
|
||||
internalReduce(action, state.saveWalletState)
|
||||
} else state.saveWalletState
|
||||
} else {
|
||||
state.saveWalletState
|
||||
}
|
||||
}
|
||||
|
||||
private fun internalReduce(action: SaveWalletAction, state: SaveWalletState): SaveWalletState {
|
||||
|
|
|
|||
|
|
@ -39,10 +39,7 @@ internal class SaveWalletBottomSheetFragment : ComposeBottomSheetFragment<SaveWa
|
|||
}
|
||||
|
||||
@Composable
|
||||
override fun ScreenContent(
|
||||
state: SaveWalletScreenState,
|
||||
modifier: Modifier,
|
||||
) {
|
||||
override fun ScreenContent(state: SaveWalletScreenState, modifier: Modifier) {
|
||||
val snackbarHostState = remember { SnackbarHostState() }
|
||||
val errorMessage by rememberUpdatedState(newValue = state.error?.resolveReference())
|
||||
val enrollBiometricsDialog by rememberUpdatedState(newValue = state.enrollBiometricsDialog)
|
||||
|
|
|
|||
|
|
@ -30,9 +30,7 @@ fun EnrollBiometricsDialogContent(dialog: EnrollBiometricsDialog) {
|
|||
|
||||
// region Preview
|
||||
@Composable
|
||||
private fun EnrollBiometricDialogContentSample(
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
private fun EnrollBiometricDialogContentSample(modifier: Modifier = Modifier) {
|
||||
Column(
|
||||
modifier = modifier
|
||||
.background(TangemTheme.colors.background.primary),
|
||||
|
|
|
|||
|
|
@ -31,11 +31,7 @@ import com.tangem.core.ui.res.TangemTheme
|
|||
import com.tangem.wallet.R
|
||||
|
||||
@Composable
|
||||
internal fun SaveWalletScreenContent(
|
||||
showProgress: Boolean,
|
||||
onSaveWalletClick: () -> Unit,
|
||||
onCloseClick: () -> Unit,
|
||||
) {
|
||||
internal fun SaveWalletScreenContent(showProgress: Boolean, onSaveWalletClick: () -> Unit, onCloseClick: () -> Unit) {
|
||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Header(onCloseClick = onCloseClick)
|
||||
SpacerHHalf()
|
||||
|
|
@ -89,9 +85,7 @@ private fun Header(onCloseClick: () -> Unit) {
|
|||
}
|
||||
|
||||
@Composable
|
||||
private fun Title(
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
private fun Title(modifier: Modifier = Modifier) {
|
||||
Column(
|
||||
modifier = modifier,
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
|
|
@ -113,9 +107,7 @@ private fun Title(
|
|||
}
|
||||
|
||||
@Composable
|
||||
private fun Description(
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
private fun Description(modifier: Modifier = Modifier) {
|
||||
Column(
|
||||
modifier = modifier,
|
||||
verticalArrangement = Arrangement.spacedBy(TangemTheme.dimens.spacing24),
|
||||
|
|
@ -135,10 +127,7 @@ private fun Description(
|
|||
}
|
||||
|
||||
@Composable
|
||||
private fun Footer(
|
||||
showProgress: Boolean,
|
||||
onSaveWalletClick: () -> Unit,
|
||||
) {
|
||||
private fun Footer(showProgress: Boolean, onSaveWalletClick: () -> Unit) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.padding(horizontal = TangemTheme.dimens.spacing16)
|
||||
|
|
@ -163,11 +152,7 @@ private fun Footer(
|
|||
}
|
||||
|
||||
@Composable
|
||||
private fun DescriptionItem(
|
||||
iconPainter: Painter,
|
||||
title: String,
|
||||
description: String,
|
||||
) {
|
||||
private fun DescriptionItem(iconPainter: Painter, title: String, description: String) {
|
||||
Row(
|
||||
verticalAlignment = Alignment.Top,
|
||||
horizontalArrangement = Arrangement.SpaceEvenly,
|
||||
|
|
@ -197,9 +182,7 @@ private fun DescriptionItem(
|
|||
|
||||
// region Preview
|
||||
@Composable
|
||||
private fun SaveWalletScreenContentSample(
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
private fun SaveWalletScreenContentSample(modifier: Modifier = Modifier) {
|
||||
Column(
|
||||
modifier = modifier
|
||||
.background(TangemTheme.colors.background.primary),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue