Updated on 2026-08-14
This commit is contained in:
parent
d16bca1c5b
commit
70944c8b00
6 changed files with 4 additions and 33 deletions
|
|
@ -15,7 +15,6 @@ internal class AddExistingWalletStepperStateManager {
|
|||
title = resourceReference(R.string.wallet_import_seed_navtitle),
|
||||
showBackButton = true,
|
||||
showSkipButton = false,
|
||||
showFeedbackButton = true,
|
||||
)
|
||||
|
||||
is AddExistingWalletRoute.BackupCompleted -> HotWalletStepperComponent.StepperUM(
|
||||
|
|
@ -24,7 +23,6 @@ internal class AddExistingWalletStepperStateManager {
|
|||
title = resourceReference(R.string.wallet_import_title),
|
||||
showBackButton = false,
|
||||
showSkipButton = false,
|
||||
showFeedbackButton = false,
|
||||
)
|
||||
|
||||
is AddExistingWalletRoute.SetAccessCode -> HotWalletStepperComponent.StepperUM(
|
||||
|
|
@ -33,7 +31,6 @@ internal class AddExistingWalletStepperStateManager {
|
|||
title = resourceReference(R.string.access_code_navtitle),
|
||||
showBackButton = false,
|
||||
showSkipButton = true,
|
||||
showFeedbackButton = false,
|
||||
)
|
||||
|
||||
is AddExistingWalletRoute.ConfirmAccessCode -> HotWalletStepperComponent.StepperUM(
|
||||
|
|
@ -42,7 +39,6 @@ internal class AddExistingWalletStepperStateManager {
|
|||
title = resourceReference(R.string.access_code_navtitle),
|
||||
showBackButton = true,
|
||||
showSkipButton = true,
|
||||
showFeedbackButton = false,
|
||||
)
|
||||
|
||||
is AddExistingWalletRoute.PushNotifications -> HotWalletStepperComponent.StepperUM(
|
||||
|
|
@ -51,7 +47,6 @@ internal class AddExistingWalletStepperStateManager {
|
|||
title = resourceReference(R.string.onboarding_title_notifications),
|
||||
showBackButton = false,
|
||||
showSkipButton = false,
|
||||
showFeedbackButton = false,
|
||||
)
|
||||
|
||||
is AddExistingWalletRoute.SetupFinished -> HotWalletStepperComponent.StepperUM(
|
||||
|
|
@ -60,7 +55,6 @@ internal class AddExistingWalletStepperStateManager {
|
|||
title = resourceReference(R.string.common_done),
|
||||
showBackButton = false,
|
||||
showSkipButton = false,
|
||||
showFeedbackButton = false,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ interface HotWalletStepperComponent : ComposableContentComponent {
|
|||
val title: TextReference,
|
||||
val showBackButton: Boolean,
|
||||
val showSkipButton: Boolean,
|
||||
val showFeedbackButton: Boolean,
|
||||
) {
|
||||
companion object {
|
||||
fun initialState() = StepperUM(
|
||||
|
|
@ -23,7 +22,6 @@ interface HotWalletStepperComponent : ComposableContentComponent {
|
|||
title = TextReference.EMPTY,
|
||||
showBackButton = false,
|
||||
showSkipButton = false,
|
||||
showFeedbackButton = false,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ internal class DefaultHotWalletStepperComponent @AssistedInject constructor(
|
|||
modifier = modifier,
|
||||
onBackClick = model::onBackClick,
|
||||
onSkipClick = model::onSkipClick,
|
||||
onFeedbackClick = model::onFeedbackClick,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,9 +34,4 @@ internal class HotWalletStepperModel @Inject constructor(
|
|||
// TODO send analytics
|
||||
params.callback.onSkipClick()
|
||||
}
|
||||
|
||||
fun onFeedbackClick() {
|
||||
// TODO send analytics
|
||||
// openFeedback()
|
||||
}
|
||||
}
|
||||
|
|
@ -31,7 +31,6 @@ internal fun HotWalletStepper(
|
|||
state: HotWalletStepperComponent.StepperUM,
|
||||
onBackClick: () -> Unit,
|
||||
onSkipClick: () -> Unit,
|
||||
onFeedbackClick: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
val fraction = state.currentStep.toFloat() / state.steps.coerceAtLeast(1)
|
||||
|
|
@ -47,20 +46,16 @@ internal fun HotWalletStepper(
|
|||
} else {
|
||||
null
|
||||
},
|
||||
endButton = when {
|
||||
state.showSkipButton -> TopAppBarButtonUM.Text(
|
||||
endButton = if (state.showSkipButton) {
|
||||
TopAppBarButtonUM.Text(
|
||||
text = resourceReference(R.string.common_skip),
|
||||
onClicked = onSkipClick,
|
||||
)
|
||||
state.showFeedbackButton -> TopAppBarButtonUM.Icon(
|
||||
iconRes = R.drawable.ic_chat_24,
|
||||
onClicked = onFeedbackClick,
|
||||
)
|
||||
else -> null
|
||||
} else {
|
||||
null
|
||||
},
|
||||
title = state.title,
|
||||
containerColor = TangemTheme.colors.background.primary,
|
||||
modifier = modifier,
|
||||
titleAlignment = Alignment.CenterHorizontally,
|
||||
)
|
||||
|
||||
|
|
@ -95,11 +90,9 @@ private fun HotWalletStepper_Preview() {
|
|||
title = resourceReference(R.string.common_done),
|
||||
showBackButton = true,
|
||||
showSkipButton = false,
|
||||
showFeedbackButton = true,
|
||||
),
|
||||
onBackClick = {},
|
||||
onSkipClick = {},
|
||||
onFeedbackClick = {},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ internal class WalletActivationStepperStateManager @Inject constructor() {
|
|||
title = resourceReference(R.string.common_backup),
|
||||
showBackButton = true,
|
||||
showSkipButton = false,
|
||||
showFeedbackButton = true,
|
||||
)
|
||||
is WalletActivationRoute.ManualBackupPhrase -> HotWalletStepperComponent.StepperUM(
|
||||
currentStep = STEP_BACKUP_PHRASE,
|
||||
|
|
@ -24,7 +23,6 @@ internal class WalletActivationStepperStateManager @Inject constructor() {
|
|||
title = resourceReference(R.string.common_backup),
|
||||
showBackButton = true,
|
||||
showSkipButton = false,
|
||||
showFeedbackButton = true,
|
||||
)
|
||||
is WalletActivationRoute.ManualBackupCheck -> HotWalletStepperComponent.StepperUM(
|
||||
currentStep = STEP_BACKUP_CHECK,
|
||||
|
|
@ -32,7 +30,6 @@ internal class WalletActivationStepperStateManager @Inject constructor() {
|
|||
title = resourceReference(R.string.common_backup),
|
||||
showBackButton = true,
|
||||
showSkipButton = false,
|
||||
showFeedbackButton = true,
|
||||
)
|
||||
is WalletActivationRoute.ManualBackupCompleted -> HotWalletStepperComponent.StepperUM(
|
||||
currentStep = STEP_BACKUP_COMPLETED,
|
||||
|
|
@ -40,7 +37,6 @@ internal class WalletActivationStepperStateManager @Inject constructor() {
|
|||
title = resourceReference(R.string.common_backup),
|
||||
showBackButton = false,
|
||||
showSkipButton = false,
|
||||
showFeedbackButton = false,
|
||||
)
|
||||
is WalletActivationRoute.SetAccessCode -> HotWalletStepperComponent.StepperUM(
|
||||
currentStep = STEP_ACCESS_CODE,
|
||||
|
|
@ -48,7 +44,6 @@ internal class WalletActivationStepperStateManager @Inject constructor() {
|
|||
title = resourceReference(R.string.access_code_navtitle),
|
||||
showBackButton = false,
|
||||
showSkipButton = true,
|
||||
showFeedbackButton = false,
|
||||
)
|
||||
is WalletActivationRoute.ConfirmAccessCode -> HotWalletStepperComponent.StepperUM(
|
||||
currentStep = STEP_ACCESS_CODE,
|
||||
|
|
@ -56,7 +51,6 @@ internal class WalletActivationStepperStateManager @Inject constructor() {
|
|||
title = resourceReference(R.string.access_code_navtitle),
|
||||
showBackButton = true,
|
||||
showSkipButton = true,
|
||||
showFeedbackButton = false,
|
||||
)
|
||||
is WalletActivationRoute.PushNotifications -> HotWalletStepperComponent.StepperUM(
|
||||
currentStep = STEP_NOTIFICATIONS,
|
||||
|
|
@ -64,7 +58,6 @@ internal class WalletActivationStepperStateManager @Inject constructor() {
|
|||
title = resourceReference(R.string.onboarding_title_notifications),
|
||||
showBackButton = false,
|
||||
showSkipButton = false,
|
||||
showFeedbackButton = false,
|
||||
)
|
||||
is WalletActivationRoute.SetupFinished -> HotWalletStepperComponent.StepperUM(
|
||||
currentStep = STEP_DONE,
|
||||
|
|
@ -72,7 +65,6 @@ internal class WalletActivationStepperStateManager @Inject constructor() {
|
|||
title = resourceReference(R.string.common_done),
|
||||
showBackButton = false,
|
||||
showSkipButton = false,
|
||||
showFeedbackButton = false,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue