diff --git a/app/assets/javascripts/strings.ts b/app/assets/javascripts/strings.ts index 9a230d5f6..02b5dbea8 100644 --- a/app/assets/javascripts/strings.ts +++ b/app/assets/javascripts/strings.ts @@ -49,6 +49,7 @@ export function StringImportError(errorCount: number) { export const STRING_ENTER_ACCOUNT_PASSCODE = 'Enter your application passcode to decrypt your data and unlock the application'; export const STRING_ENTER_ACCOUNT_PASSWORD = 'Enter your account password'; export const STRING_ENTER_PASSCODE_FOR_MIGRATION = 'Your application passcode is required to perform an upgrade of your local data storage structure.'; +export const STRING_ENTER_PASSCODE_FOR_LOGIN_REGISTER = 'Enter your application passcode before signing in or registering'; export const STRING_STORAGE_UPDATE = 'Storage Update'; export const STRING_AUTHENTICATION_REQUIRED = 'Authentication Required'; export const STRING_UNSUPPORTED_BACKUP_FILE_VERSION = 'This backup file was created using an unsupported version of the application and cannot be imported here. Please update your application and try again.'; diff --git a/app/assets/javascripts/views/challenge_modal/challenge_modal.ts b/app/assets/javascripts/views/challenge_modal/challenge_modal.ts index d054414bf..63840079f 100644 --- a/app/assets/javascripts/views/challenge_modal/challenge_modal.ts +++ b/app/assets/javascripts/views/challenge_modal/challenge_modal.ts @@ -16,7 +16,8 @@ import { STRING_ENTER_ACCOUNT_PASSWORD, STRING_ENTER_PASSCODE_FOR_MIGRATION, STRING_STORAGE_UPDATE, - STRING_AUTHENTICATION_REQUIRED + STRING_AUTHENTICATION_REQUIRED, + STRING_ENTER_PASSCODE_FOR_LOGIN_REGISTER, } from '@/strings'; type InputValue = { @@ -132,10 +133,14 @@ class ChallengeModalCtrl extends PureViewCtrl { promptForChallenge(challenge: ChallengeType): string { if (challenge === ChallengeType.LocalPasscode) { - if (this.challenge.reason === ChallengeReason.Migration) { - return STRING_ENTER_PASSCODE_FOR_MIGRATION; + switch (this.challenge.reason) { + case ChallengeReason.Migration: + return STRING_ENTER_PASSCODE_FOR_MIGRATION; + case ChallengeReason.ResaveRootKey: + return STRING_ENTER_PASSCODE_FOR_LOGIN_REGISTER; + default: + return STRING_ENTER_ACCOUNT_PASSCODE; } - return STRING_ENTER_ACCOUNT_PASSCODE; } else { return STRING_ENTER_ACCOUNT_PASSWORD; }