updated password form to have back button
This commit is contained in:
parent
4faa7cddd6
commit
ca16148fbe
|
@ -12,6 +12,7 @@ import { Spinner } from 'react-bootstrap';
|
|||
interface Props {
|
||||
callback: (passphrase: any, setFieldError: any) => Promise<void>;
|
||||
buttonText: string;
|
||||
back: () => void;
|
||||
}
|
||||
interface formValues {
|
||||
passphrase: string;
|
||||
|
@ -122,6 +123,11 @@ function SetPassword(props: Props) {
|
|||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
<div className="text-center" style={{ marginTop: '20px' }}>
|
||||
<Button variant="link" onClick={props.back}>
|
||||
{constants.GO_BACK}
|
||||
</Button>
|
||||
</div>
|
||||
</Card.Body>
|
||||
</Card>
|
||||
</Container>
|
||||
|
|
|
@ -73,7 +73,7 @@ export default function Generate() {
|
|||
<PasswordForm
|
||||
callback={onSubmit}
|
||||
buttonText={constants.CHANGE_PASSWORD}
|
||||
cancel={() => router.push('/gallery')}
|
||||
back={() => router.push('/gallery')}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ export default function Generate() {
|
|||
<PasswordForm
|
||||
callback={onSubmit}
|
||||
buttonText={constants.SET_PASSPHRASE}
|
||||
cancel={logoutUser}
|
||||
back={logoutUser}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -161,6 +161,7 @@ const englishConstants = {
|
|||
'failed to sync with remote server, please refresh page to try again',
|
||||
PASSWORD_GENERATION_FAILED: `your browser was unable to generate a strong enough password that meets ente's encryption standards, please try using the mobile app or another browser`,
|
||||
CHANGE_PASSWORD: 'change password',
|
||||
GO_BACK: 'go back',
|
||||
};
|
||||
|
||||
export default englishConstants;
|
||||
|
|
Loading…
Reference in a new issue