Final auth design

This commit is contained in:
Daniel Cojocea committed 2024-08-12 16:26:42 -04:00
1 parent e2522d2297
commit 16c19930c4
1 file changed
+26 -30
+26 -30
View File
@@ -11,7 +11,6 @@ import Check from "../../Components/Check/Check";
import ButtonSpinner from "../../Components/ButtonSpinner"; import ButtonSpinner from "../../Components/ButtonSpinner";
import Field from "../../Components/Inputs/Field"; import Field from "../../Components/Inputs/Field";
import LockIcon from "../../assets/icons/lock-button-icon.svg?react"; import LockIcon from "../../assets/icons/lock-button-icon.svg?react";
import Button from "../../Components/Button";
import background from "../../assets/Images/background_pattern_decorative.png"; import background from "../../assets/Images/background_pattern_decorative.png";
import Logo from "../../assets/icons/bwu-icon.svg?react"; import Logo from "../../assets/icons/bwu-icon.svg?react";
import "./index.css"; import "./index.css";
@@ -140,29 +139,17 @@ const SetNewPassword = () => {
}, },
}, },
}} }}
></Stack>
<Box textAlign="center" p={theme.gap.large}>
<Typography display="inline-block">Go back to —</Typography>
<Typography
component="span"
ml={theme.gap.xs}
onClick={() => navigate("/login")}
sx={{ userSelect: "none" }}
> >
Log In <Stack gap={theme.gap.large} textAlign="center">
</Typography> <Box>
</Box> <LockIcon alt="lock icon" />
{/* <form className="set-new-password-form" onSubmit={handleSubmit}> <Typography component="h1">Set new password</Typography>
<Stack direction="column" alignItems="center" gap={theme.gap.small}> <Typography>
<LockIcon alt="lock icon" style={{ fill: "white" }} />
<Typography component="h1" sx={{ mt: theme.gap.ml }}>
Set new password
</Typography>
<Typography sx={{ textAlign: "center" }}>
Your new password must be different to previously used passwords. Your new password must be different to previously used passwords.
</Typography> </Typography>
</Stack> </Box>
<Stack gap={theme.gap.large} sx={{ mt: `calc(${theme.gap.ml}*2)` }}> <Box width="100%" textAlign="left">
<form noValidate spellCheck={false} onSubmit={handleSubmit}>
<Field <Field
type="password" type="password"
id="register-password-input" id="register-password-input"
@@ -173,6 +160,8 @@ const SetNewPassword = () => {
onChange={handleChange} onChange={handleChange}
error={errors.password} error={errors.password}
/> />
</form>
<form noValidate spellCheck={false} onSubmit={handleSubmit}>
<Field <Field
type="password" type="password"
id="confirm-password-input" id="confirm-password-input"
@@ -183,7 +172,8 @@ const SetNewPassword = () => {
onChange={handleChange} onChange={handleChange}
error={errors.confirm} error={errors.confirm}
/> />
<Stack gap={theme.gap.small}> </form>
<Stack gap={theme.gap.small} mb={theme.gap.large}>
<Check <Check
text="Must be at least 8 characters long" text="Must be at least 8 characters long"
variant={ variant={
@@ -223,22 +213,28 @@ const SetNewPassword = () => {
} }
/> />
</Stack> </Stack>
</Box>
<ButtonSpinner <ButtonSpinner
disabled={Object.keys(errors).length !== 0} disabled={Object.keys(errors).length !== 0}
isLoading={isLoading} isLoading={isLoading}
onClick={handleSubmit} onClick={handleSubmit}
level="primary" level="primary"
label="Reset password" label="Reset password"
/> sx={{ width: "100%" }}
<Button
level="tertiary"
label="Back to log in"
img={<ArrowBackRoundedIcon />}
sx={{ alignSelf: "center", width: "fit-content" }}
onClick={() => navigate("/login")}
/> />
</Stack> </Stack>
</form> */} </Stack>
<Box textAlign="center" p={theme.gap.large}>
<Typography display="inline-block">Go back to —</Typography>
<Typography
component="span"
ml={theme.gap.xs}
onClick={() => navigate("/login")}
sx={{ userSelect: "none" }}
>
Log In
</Typography>
</Box>
</Stack> </Stack>
); );
}; };