Merge pull request #3409 from element-hq/feature/bma/recoveryKeyFormatting

Recovery key formatting and wording iteration
This commit is contained in:
Benoit Marty
2024-09-06 16:30:39 +02:00
committed by GitHub
22 changed files with 49 additions and 38 deletions

View File

@@ -70,10 +70,7 @@ internal fun RecoveryKeyView(
verticalArrangement = Arrangement.spacedBy(8.dp) verticalArrangement = Arrangement.spacedBy(8.dp)
) { ) {
Text( Text(
text = when (state.recoveryKeyUserStory) { text = stringResource(id = CommonStrings.common_recovery_key),
RecoveryKeyUserStory.Enter -> stringResource(R.string.screen_recovery_key_confirm_key_label)
else -> stringResource(id = CommonStrings.common_recovery_key)
},
modifier = Modifier.padding(start = 16.dp), modifier = Modifier.padding(start = 16.dp),
style = ElementTheme.typography.fontBodyMdRegular, style = ElementTheme.typography.fontBodyMdRegular,
) )

View File

@@ -27,9 +27,11 @@ open class RecoveryKeyViewStateProvider : PreviewParameterProvider<RecoveryKeyVi
aRecoveryKeyViewState(recoveryKeyUserStory = it, inProgress = true), aRecoveryKeyViewState(recoveryKeyUserStory = it, inProgress = true),
aRecoveryKeyViewState(recoveryKeyUserStory = it, formattedRecoveryKey = aFormattedRecoveryKey()), aRecoveryKeyViewState(recoveryKeyUserStory = it, formattedRecoveryKey = aFormattedRecoveryKey()),
aRecoveryKeyViewState(recoveryKeyUserStory = it, formattedRecoveryKey = aFormattedRecoveryKey(), inProgress = true), aRecoveryKeyViewState(recoveryKeyUserStory = it, formattedRecoveryKey = aFormattedRecoveryKey(), inProgress = true),
// Add other states here
) )
} } + sequenceOf(
aRecoveryKeyViewState(recoveryKeyUserStory = RecoveryKeyUserStory.Enter, formattedRecoveryKey = aFormattedRecoveryKey().replace(" ", "")),
aRecoveryKeyViewState(recoveryKeyUserStory = RecoveryKeyUserStory.Enter, formattedRecoveryKey = "This is a passphrase with spaces"),
)
} }
fun aRecoveryKeyViewState( fun aRecoveryKeyViewState(