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 {
|
interface Props {
|
||||||
callback: (passphrase: any, setFieldError: any) => Promise<void>;
|
callback: (passphrase: any, setFieldError: any) => Promise<void>;
|
||||||
buttonText: string;
|
buttonText: string;
|
||||||
|
back: () => void;
|
||||||
}
|
}
|
||||||
interface formValues {
|
interface formValues {
|
||||||
passphrase: string;
|
passphrase: string;
|
||||||
|
@ -122,6 +123,11 @@ function SetPassword(props: Props) {
|
||||||
</Form>
|
</Form>
|
||||||
)}
|
)}
|
||||||
</Formik>
|
</Formik>
|
||||||
|
<div className="text-center" style={{ marginTop: '20px' }}>
|
||||||
|
<Button variant="link" onClick={props.back}>
|
||||||
|
{constants.GO_BACK}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</Card.Body>
|
</Card.Body>
|
||||||
</Card>
|
</Card>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
|
@ -73,7 +73,7 @@ export default function Generate() {
|
||||||
<PasswordForm
|
<PasswordForm
|
||||||
callback={onSubmit}
|
callback={onSubmit}
|
||||||
buttonText={constants.CHANGE_PASSWORD}
|
buttonText={constants.CHANGE_PASSWORD}
|
||||||
cancel={() => router.push('/gallery')}
|
back={() => router.push('/gallery')}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ export default function Generate() {
|
||||||
<PasswordForm
|
<PasswordForm
|
||||||
callback={onSubmit}
|
callback={onSubmit}
|
||||||
buttonText={constants.SET_PASSPHRASE}
|
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',
|
'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`,
|
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',
|
CHANGE_PASSWORD: 'change password',
|
||||||
|
GO_BACK: 'go back',
|
||||||
};
|
};
|
||||||
|
|
||||||
export default englishConstants;
|
export default englishConstants;
|
||||||
|
|
Loading…
Reference in a new issue