diff --git a/src/components/PasswordForm.tsx b/src/components/SetPasswordForm.tsx similarity index 97% rename from src/components/PasswordForm.tsx rename to src/components/SetPasswordForm.tsx index f18d8436c..e98eb6b2c 100644 --- a/src/components/PasswordForm.tsx +++ b/src/components/SetPasswordForm.tsx @@ -19,7 +19,7 @@ interface formValues { passphrase: string; confirm: string; } -function SetPassword(props: Props) { +function SetPasswordForm(props: Props) { const [loading, setLoading] = useState(false); const onSubmit = async ( values: formValues, @@ -94,7 +94,7 @@ function SetPassword(props: Props) { ); } -export default SetPassword; +export default SetPasswordForm; diff --git a/src/pages/changePassword/index.tsx b/src/pages/changePassword/index.tsx index 925adc306..09c8ee4d2 100644 --- a/src/pages/changePassword/index.tsx +++ b/src/pages/changePassword/index.tsx @@ -10,7 +10,7 @@ import CryptoWorker, { } from 'utils/crypto'; import { getActualKey } from 'utils/common/key'; import { logoutUser, setKeys, UpdatedKey } from 'services/userService'; -import PasswordForm from 'components/PasswordForm'; +import SetPasswordForm from 'components/SetPasswordForm'; export interface KEK { key: string; @@ -44,10 +44,8 @@ export default function Generate() { setFieldError('confirm', constants.PASSWORD_GENERATION_FAILED); return; } - const encryptedKeyAttributes: B64EncryptionResult = await cryptoWorker.encryptToB64( - key, - kek.key - ); + const encryptedKeyAttributes: B64EncryptionResult = + await cryptoWorker.encryptToB64(key, kek.key); const updatedKey: UpdatedKey = { kekSalt, encryptedKey: encryptedKeyAttributes.encryptedData, @@ -73,7 +71,7 @@ export default function Generate() { router.push('/gallery'); }; return ( - - ), PASSPHRASE_HINT: 'password', - PASSPHRASE_CONFIRM: 'password again', + RE_ENTER_PASSPHRASE: 'password again', + CONFIRM_PASSPHRASE: 'confirm your password', PASSPHRASE_MATCH_ERROR: `passwords don't match`, CONSOLE_WARNING_STOP: 'STOP!', CONSOLE_WARNING_DESC: `This is a browser feature intended for developers. Please don't copy-paste unverified code here.`,