PM-10617 + PM-11270 fixes after QA review (#3944)

This commit is contained in:
Dave Severns 2024-09-19 17:26:54 -04:00 committed by GitHub
parent 7fd16c9e10
commit 21b41fd4db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 15 deletions

View file

@ -141,11 +141,10 @@ fun CompleteRegistrationScreen(
.nestedScroll(scrollBehavior.nestedScrollConnection),
topBar = {
BitwardenTopAppBar(
title = if (state.onboardingEnabled) {
stringResource(id = R.string.create_account)
} else {
stringResource(id = R.string.set_password)
},
title = stringResource(
id = R.string.create_account
.takeIf { state.onboardingEnabled }
?: R.string.set_password),
scrollBehavior = scrollBehavior,
navigationIcon = rememberVectorPainter(id = R.drawable.ic_back),
navigationIconContentDescription = stringResource(id = R.string.back),
@ -236,11 +235,17 @@ private fun CompleteRegistrationContent(
var showPassword by rememberSaveable { mutableStateOf(false) }
BitwardenPasswordField(
label = stringResource(id = R.string.master_password),
label = stringResource(
id = R.string.master_password_required
.takeIf { showNewOnboardingUi }
?: R.string.master_password,
),
showPassword = showPassword,
showPasswordChange = { showPassword = it },
value = passwordInput,
onValueChange = handler.onPasswordInputChange,
hint = stringResource(id = R.string.master_password_important_hint)
.takeIf { !showNewOnboardingUi },
modifier = Modifier
.testTag("MasterPasswordEntry")
.fillMaxWidth()
@ -257,7 +262,11 @@ private fun CompleteRegistrationContent(
)
Spacer(modifier = Modifier.height(16.dp))
BitwardenPasswordField(
label = stringResource(id = R.string.retype_master_password),
label = stringResource(
id = R.string.retype_master_password_required
.takeIf { showNewOnboardingUi }
?: R.string.retype_master_password,
),
value = confirmPasswordInput,
showPassword = showPassword,
showPasswordChange = { showPassword = it },
@ -270,16 +279,18 @@ private fun CompleteRegistrationContent(
)
Spacer(modifier = Modifier.height(16.dp))
BitwardenTextField(
label = stringResource(id = R.string.master_password_hint),
label = stringResource(
id = R.string.master_password_hint_not_specified
.takeIf { showNewOnboardingUi }
?: R.string.master_password_hint,
),
value = passwordHintInput,
onValueChange = handler.onPasswordHintChange,
hint = if (showNewOnboardingUi) {
stringResource(
R.string.bitwarden_cannot_recover_a_lost_or_forgotten_master_password,
)
} else {
stringResource(id = R.string.master_password_description)
},
hint = stringResource(
id = R.string.bitwarden_cannot_recover_a_lost_or_forgotten_master_password
.takeIf { showNewOnboardingUi }
?: R.string.master_password_hint_description,
),
modifier = Modifier
.testTag("MasterPasswordHintLabel")
.fillMaxWidth()

View file

@ -50,6 +50,7 @@
<string name="account_already_added">Account already added</string>
<string name="switch_to_already_added_account_confirmation">Would you like to switch to it now?</string>
<string name="master_password">Master password</string>
<string name="master_password_required">Master password (required)</string>
<string name="more">More</string>
<string name="my_vault">My vault</string>
<string name="authenticator">Authenticator</string>
@ -166,6 +167,7 @@
<string name="rate_the_app_description">Please consider helping us out with a good review!</string>
<string name="regenerate_password">Regenerate password</string>
<string name="retype_master_password">Re-type master password</string>
<string name="retype_master_password_required">Re-type master password (required)</string>
<string name="search_vault">Search vault</string>
<string name="security">Security</string>
<string name="select">Select</string>
@ -1004,4 +1006,6 @@ Do you want to switch to this account?</string>
<string name="return_to_complete_this_step_anytime_in_settings">You can return to complete this step anytime in Settings.</string>
<string name="what_bitwarden_has_to_offer">You can now use autofill to log into apps and websites using your saved passwords. Now, you can explore everything else Bitwarden has to offer.</string>
<string name="youre_all_set">You\'re all set!</string>
<string name="master_password_hint_not_specified">Master password hint</string>
<string name="master_password_important_hint">Important: Your master password cannot be recovered if you forget it! 12 characters minimum.</string>
</resources>