Merge pull request #605 from bluewave-labs/feat/password-confirmed-page
Password confirmed page
This commit is contained in:
4 files changed
+86
-96
No files matched your search
@@ -79,6 +79,11 @@ const CheckEmail = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleNavigate = () => {
|
||||||
|
sessionStorage.removeItem("email");
|
||||||
|
navigate("/login");
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack className="check-email-page auth" overflow="hidden">
|
<Stack className="check-email-page auth" overflow="hidden">
|
||||||
<img
|
<img
|
||||||
@@ -118,7 +123,7 @@ const CheckEmail = () => {
|
|||||||
>
|
>
|
||||||
<Stack gap={theme.gap.large} alignItems="center" textAlign="center">
|
<Stack gap={theme.gap.large} alignItems="center" textAlign="center">
|
||||||
<Box>
|
<Box>
|
||||||
<EmailIcon />
|
<EmailIcon alt="email icon" />
|
||||||
<Typography component="h1">Check your email</Typography>
|
<Typography component="h1">Check your email</Typography>
|
||||||
<Typography mt={theme.gap.xs} sx={{ width: "max-content" }}>
|
<Typography mt={theme.gap.xs} sx={{ width: "max-content" }}>
|
||||||
We sent a password reset link to{" "}
|
We sent a password reset link to{" "}
|
||||||
@@ -159,56 +164,12 @@ const CheckEmail = () => {
|
|||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="span"
|
||||||
ml={theme.gap.xs}
|
ml={theme.gap.xs}
|
||||||
onClick={() => {
|
onClick={handleNavigate}
|
||||||
navigate("/login");
|
|
||||||
}}
|
|
||||||
sx={{ userSelect: "none" }}
|
sx={{ userSelect: "none" }}
|
||||||
>
|
>
|
||||||
Log In
|
Log In
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
{/* <form className="check-email-form">
|
|
||||||
<Stack direction="column" alignItems="center" gap={theme.gap.small}>
|
|
||||||
<EmailIcon alt="EmailIcon" style={{ fill: "white" }} />
|
|
||||||
<Typography component="h1" sx={{ mt: theme.gap.ml }}>
|
|
||||||
Check your email
|
|
||||||
</Typography>
|
|
||||||
<Typography sx={{ width: "max-content" }}>
|
|
||||||
We sent a password reset link to{" "}
|
|
||||||
<Typography component="span">
|
|
||||||
{email || "username@email.com"}
|
|
||||||
</Typography>
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
<Stack gap={theme.gap.ml} sx={{ mt: `calc(${theme.gap.ml}*2)` }}>
|
|
||||||
<Button level="primary" label="Open email app" onClick={openMail} />
|
|
||||||
<Typography sx={{ alignSelf: "center", mb: theme.gap.medium }}>
|
|
||||||
Didn't receive the email?{" "}
|
|
||||||
<Typography
|
|
||||||
component="span"
|
|
||||||
onClick={resendToken}
|
|
||||||
sx={{
|
|
||||||
color: theme.palette.primary.main,
|
|
||||||
letterSpacing: "-0.1px",
|
|
||||||
userSelect: "none",
|
|
||||||
pointerEvents: disabled ? "none" : "auto",
|
|
||||||
cursor: disabled ? "default" : "pointer",
|
|
||||||
opacity: disabled ? 0.5 : 1,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Click to resend
|
|
||||||
</Typography>
|
|
||||||
</Typography>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
level="tertiary"
|
|
||||||
label="Back to log in"
|
|
||||||
img={<ArrowBackRoundedIcon />}
|
|
||||||
sx={{ alignSelf: "center", width: "fit-content" }}
|
|
||||||
onClick={() => navigate("/login")}
|
|
||||||
/>
|
|
||||||
</Stack>
|
|
||||||
</form> */}
|
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -81,6 +81,11 @@ const ForgotPassword = () => {
|
|||||||
else delete errors.email;
|
else delete errors.email;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleNavigate = () => {
|
||||||
|
sessionStorage.removeItem("email");
|
||||||
|
navigate("/login");
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack className="forgot-password-page auth" overflow="hidden">
|
<Stack className="forgot-password-page auth" overflow="hidden">
|
||||||
<img
|
<img
|
||||||
@@ -120,7 +125,7 @@ const ForgotPassword = () => {
|
|||||||
>
|
>
|
||||||
<Stack gap={theme.gap.large} alignItems="center" textAlign="center">
|
<Stack gap={theme.gap.large} alignItems="center" textAlign="center">
|
||||||
<Box>
|
<Box>
|
||||||
<Key />
|
<Key alt="password key icon" />
|
||||||
<Typography component="h1">Forgot password?</Typography>
|
<Typography component="h1">Forgot password?</Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
No worries, we'll send you reset instructions.
|
No worries, we'll send you reset instructions.
|
||||||
@@ -159,9 +164,7 @@ const ForgotPassword = () => {
|
|||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="span"
|
||||||
ml={theme.gap.xs}
|
ml={theme.gap.xs}
|
||||||
onClick={() => {
|
onClick={handleNavigate}
|
||||||
navigate("/login");
|
|
||||||
}}
|
|
||||||
sx={{ userSelect: "none" }}
|
sx={{ userSelect: "none" }}
|
||||||
>
|
>
|
||||||
Log In
|
Log In
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import "./index.css";
|
import { Box, Stack, Typography } from "@mui/material";
|
||||||
import background from "../../assets/Images/background_pattern_decorative.png";
|
|
||||||
import ArrowBackRoundedIcon from "@mui/icons-material/ArrowBackRounded";
|
|
||||||
import ConfirmIcon from "../../assets/icons/confirm-icon.svg?react";
|
|
||||||
import Button from "../../Components/Button";
|
|
||||||
import { Stack, Typography } from "@mui/material";
|
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useNavigate } from "react-router";
|
import { useNavigate } from "react-router";
|
||||||
import { useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
import { clearAuthState } from "../../Features/Auth/authSlice";
|
import { clearAuthState } from "../../Features/Auth/authSlice";
|
||||||
import { clearUptimeMonitorState } from "../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
import { clearUptimeMonitorState } from "../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
||||||
|
import Button from "../../Components/Button";
|
||||||
|
import background from "../../assets/Images/background_pattern_decorative.png";
|
||||||
|
import ConfirmIcon from "../../assets/icons/confirm-icon.svg?react";
|
||||||
|
import Logo from "../../assets/icons/bwu-icon.svg?react";
|
||||||
|
import "./index.css";
|
||||||
|
|
||||||
const NewPasswordConfirmed = () => {
|
const NewPasswordConfirmed = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
@@ -22,39 +22,74 @@ const NewPasswordConfirmed = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="password-confirmed-page">
|
<Stack className="password-confirmed-page auth" overflow="hidden">
|
||||||
<img
|
<img
|
||||||
className="background-pattern-svg"
|
className="background-pattern-svg"
|
||||||
src={background}
|
src={background}
|
||||||
alt="background pattern"
|
alt="background pattern"
|
||||||
/>
|
/>
|
||||||
<form className="password-confirmed-form">
|
<Stack
|
||||||
<Stack direction="column" alignItems="center" gap={theme.gap.small}>
|
direction="row"
|
||||||
<ConfirmIcon alt="confirm icon" style={{ fill: "white" }} />
|
alignItems="center"
|
||||||
<Typography component="h1" sx={{ mt: theme.gap.ml }}>
|
px={theme.gap.large}
|
||||||
Password reset
|
gap={theme.gap.small}
|
||||||
</Typography>
|
>
|
||||||
<Typography sx={{ textAlign: "center" }}>
|
<Logo style={{ borderRadius: theme.shape.borderRadius }} />
|
||||||
Your password has been successfully reset. Click below to log in
|
<Typography sx={{ userSelect: "none" }}>BlueWave Uptime</Typography>
|
||||||
magically.
|
</Stack>
|
||||||
</Typography>
|
<Stack
|
||||||
</Stack>
|
width="100%"
|
||||||
<Stack gap={theme.gap.large} sx={{ mt: `calc(${theme.gap.ml}*2)` }}>
|
maxWidth={600}
|
||||||
|
flex={1}
|
||||||
|
justifyContent="center"
|
||||||
|
p={theme.gap.xl}
|
||||||
|
pb={theme.gap.triplexl}
|
||||||
|
mx="auto"
|
||||||
|
sx={{
|
||||||
|
"& > .MuiStack-root": {
|
||||||
|
border: 1,
|
||||||
|
borderRadius: theme.shape.borderRadius,
|
||||||
|
borderColor: theme.palette.otherColors.graishWhite,
|
||||||
|
backgroundColor: theme.palette.otherColors.white,
|
||||||
|
padding: {
|
||||||
|
xs: theme.gap.large,
|
||||||
|
sm: theme.gap.xl,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Stack gap={theme.gap.large} alignItems="center" textAlign="center">
|
||||||
|
<Box>
|
||||||
|
<ConfirmIcon alt="password confirm icon" />
|
||||||
|
<Typography component="h1">Password reset</Typography>
|
||||||
|
<Typography mt={theme.gap.xs}>
|
||||||
|
Your password has been successfully reset. Click below to log in
|
||||||
|
magically.
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
<Button
|
<Button
|
||||||
level="primary"
|
level="primary"
|
||||||
label="Continue"
|
label="Continue"
|
||||||
onClick={() => navigate("/monitors")}
|
onClick={() => navigate("/monitors")}
|
||||||
/>
|
sx={{
|
||||||
<Button
|
width: "100%",
|
||||||
level="tertiary"
|
maxWidth: 400,
|
||||||
label="Back to log in"
|
}}
|
||||||
img={<ArrowBackRoundedIcon />}
|
|
||||||
sx={{ alignSelf: "center", width: "fit-content" }}
|
|
||||||
onClick={handleNavigate}
|
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</form>
|
</Stack>
|
||||||
</div>
|
<Box textAlign="center" p={theme.gap.large}>
|
||||||
|
<Typography display="inline-block">Go back to —</Typography>
|
||||||
|
<Typography
|
||||||
|
component="span"
|
||||||
|
ml={theme.gap.xs}
|
||||||
|
onClick={handleNavigate}
|
||||||
|
sx={{ userSelect: "none" }}
|
||||||
|
>
|
||||||
|
Log In
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,26 +1,21 @@
|
|||||||
/* ////// */
|
/* ////// */
|
||||||
/* SHARED */
|
/* SHARED */
|
||||||
/* ////// */
|
/* ////// */
|
||||||
.set-new-password-page,
|
.set-new-password-page {
|
||||||
.password-confirmed-page {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: var(--env-var-height-1);
|
height: var(--env-var-height-1);
|
||||||
}
|
}
|
||||||
.set-new-password-page h1.MuiTypography-root,
|
.set-new-password-page h1.MuiTypography-root {
|
||||||
.password-confirmed-page h1.MuiTypography-root {
|
|
||||||
font-size: var(--env-var-font-size-large);
|
font-size: var(--env-var-font-size-large);
|
||||||
color: var(--env-var-color-1);
|
color: var(--env-var-color-1);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
.set-new-password-page p.MuiTypography-root,
|
.set-new-password-page p.MuiTypography-root,
|
||||||
.set-new-password-page button,
|
.set-new-password-page button {
|
||||||
.password-confirmed-page p.MuiTypography-root,
|
|
||||||
.password-confirmed-page button {
|
|
||||||
font-size: var(--env-var-font-size-medium);
|
font-size: var(--env-var-font-size-medium);
|
||||||
}
|
}
|
||||||
.set-new-password-page button:not(.MuiIconButton-root),
|
.set-new-password-page button:not(.MuiIconButton-root) {
|
||||||
.password-confirmed-page button:not(.MuiIconButton-root) {
|
|
||||||
height: 34px;
|
height: 34px;
|
||||||
border-radius: var(--env-var-radius-2);
|
border-radius: var(--env-var-radius-2);
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
@@ -31,20 +26,15 @@
|
|||||||
margin-top: 65px;
|
margin-top: 65px;
|
||||||
width: var(--env-var-width-2);
|
width: var(--env-var-width-2);
|
||||||
}
|
}
|
||||||
.set-new-password-page p.MuiTypography-root,
|
.set-new-password-page p.MuiTypography-root {
|
||||||
.password-confirmed-page p.MuiTypography-root {
|
|
||||||
color: var(--env-var-color-2);
|
color: var(--env-var-color-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.set-new-password-page button:not(.MuiIconButton-root) svg,
|
.set-new-password-page button:not(.MuiIconButton-root) svg {
|
||||||
.password-confirmed-page button:not(.MuiIconButton-root) svg {
|
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.set-new-password-page
|
.set-new-password-page
|
||||||
.MuiFormControl-root:has(#register-password-input)
|
|
||||||
+ span.MuiTypography-root,
|
|
||||||
.password-confirmed-page
|
|
||||||
.MuiFormControl-root:has(#register-password-input)
|
.MuiFormControl-root:has(#register-password-input)
|
||||||
+ span.MuiTypography-root {
|
+ span.MuiTypography-root {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -129,6 +119,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.forgot-password-page h1,
|
.forgot-password-page h1,
|
||||||
.check-email-page h1 {
|
.check-email-page h1,
|
||||||
|
.password-confirmed-page h1 {
|
||||||
font-size: var(--env-var-font-size-large-plus);
|
font-size: var(--env-var-font-size-large-plus);
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user