Added bluewave uptime favicon and inital design for login page
This commit is contained in:
1 parent
a979b9550c
commit
72b813e849
10 files changed
+197
-59
No files matched your search
+115
-17
@@ -1,18 +1,25 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import "./index.css";
|
||||
import Logomark from "../../assets/Images/bwl-logo-2.svg?react";
|
||||
import Button from "../../Components/Button";
|
||||
import background from "../../assets/Images/background_pattern_decorative.png";
|
||||
import axiosInstance from "../../Utils/axiosConfig";
|
||||
import {
|
||||
Box,
|
||||
Divider,
|
||||
FormControlLabel,
|
||||
Stack,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
import { useTheme } from "@emotion/react";
|
||||
import { credentials } from "../../Validation/validation";
|
||||
import { login } from "../../Features/Auth/authSlice";
|
||||
import { useDispatch } from "react-redux";
|
||||
import { createToast } from "../../Utils/toastUtils";
|
||||
import Button from "../../Components/Button";
|
||||
import axiosInstance from "../../Utils/axiosConfig";
|
||||
import Field from "../../Components/Inputs/Field";
|
||||
import { Checkbox, FormControlLabel, Stack, Typography } from "@mui/material";
|
||||
import { useTheme } from "@emotion/react";
|
||||
import background from "../../assets/Images/background_pattern_decorative.png";
|
||||
import Logo from "../../assets/icons/bwu-icon.svg?react";
|
||||
import Mail from "../../assets/icons/mail.svg?react";
|
||||
|
||||
import "./index.css";
|
||||
|
||||
const Login = () => {
|
||||
const dispatch = useDispatch();
|
||||
@@ -105,19 +112,106 @@ const Login = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const [step, setStep] = useState(0);
|
||||
const LandingPage = () => {
|
||||
return (
|
||||
<>
|
||||
<Stack gap={theme.gap.large} alignItems="center" textAlign="center">
|
||||
<Box>
|
||||
<Typography component="h1">Log In</Typography>
|
||||
<Typography>We are pleased to see you again!</Typography>
|
||||
</Box>
|
||||
<Box width="100%">
|
||||
<Button
|
||||
level="secondary"
|
||||
label="Continue with Email"
|
||||
img={<Mail />}
|
||||
onClick={() => setStep(1)}
|
||||
sx={{
|
||||
width: "100%",
|
||||
"& svg": {
|
||||
mr: theme.gap.small,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
{/* <Divider sx={{ marginY: theme.spacing(1) }}>or</Divider>
|
||||
<Button
|
||||
level="secondary"
|
||||
label="Continue with Google"
|
||||
onClick={() => setStep(1)}
|
||||
sx={{ width: "100%" }}
|
||||
/> */}
|
||||
</Box>
|
||||
<Box maxWidth={400}>
|
||||
<Typography className="tos-p">
|
||||
By continuing, you agree to our{" "}
|
||||
<Typography component="span">Terms of Service</Typography> and{" "}
|
||||
<Typography component="span">Privacy Policy.</Typography>
|
||||
</Typography>
|
||||
</Box>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="login-page">
|
||||
<Stack className="login-page" overflow="hidden">
|
||||
<img
|
||||
className="background-pattern-svg"
|
||||
src={background}
|
||||
alt="background pattern"
|
||||
/>
|
||||
<form className="login-form" onSubmit={handleSubmit}>
|
||||
<Stack
|
||||
direction="row"
|
||||
alignItems="center"
|
||||
px={theme.gap.large}
|
||||
gap={theme.gap.small}
|
||||
>
|
||||
<Logo style={{ borderRadius: theme.shape.borderRadius }} />
|
||||
<Typography>BlueWave Uptime</Typography>
|
||||
</Stack>
|
||||
<Stack
|
||||
width="fit-content"
|
||||
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,
|
||||
lg: theme.gap.xxl,
|
||||
},
|
||||
},
|
||||
}}
|
||||
>
|
||||
<LandingPage />
|
||||
</Stack>
|
||||
<Box textAlign="center" p={theme.gap.large}>
|
||||
<Typography display="inline-block">Don't have an account? -</Typography>
|
||||
<Typography
|
||||
component="span"
|
||||
ml={theme.gap.xs}
|
||||
onClick={() => {
|
||||
navigate("/register");
|
||||
}}
|
||||
sx={{ userSelect: "none" }}
|
||||
>
|
||||
Sign Up
|
||||
</Typography>
|
||||
</Box>
|
||||
{/* <form className="login-form" onSubmit={handleSubmit}>
|
||||
<Stack gap={theme.gap.small} alignItems="center">
|
||||
<Logomark alt="BlueWave Uptime Icon" />
|
||||
<Typography component="h1" sx={{ mt: theme.gap.xl }}>
|
||||
Login to Your Account
|
||||
Log In
|
||||
</Typography>
|
||||
<Typography>We are pleased to see you again!</Typography>
|
||||
</Stack>
|
||||
<Stack gap={theme.gap.large} sx={{ mt: `calc(${theme.gap.ml}*2)` }}>
|
||||
<Field
|
||||
@@ -158,7 +252,10 @@ const Login = () => {
|
||||
}
|
||||
label="Remember me"
|
||||
/>
|
||||
<Typography component="span" onClick={() => navigate("/forgot-password")}>
|
||||
<Typography
|
||||
component="span"
|
||||
onClick={() => navigate("/forgot-password")}
|
||||
>
|
||||
Forgot password
|
||||
</Typography>
|
||||
</Stack>
|
||||
@@ -176,10 +273,11 @@ const Login = () => {
|
||||
gap="5px"
|
||||
mt={theme.gap.ml}
|
||||
>
|
||||
<Typography component="p" sx={{ alignSelf: "center" }}>
|
||||
<Typography sx={{ alignSelf: "center" }}>
|
||||
Don't have an account?
|
||||
</Typography>
|
||||
<Typography component="span"
|
||||
<Typography
|
||||
component="span"
|
||||
onClick={() => {
|
||||
navigate("/register");
|
||||
}}
|
||||
@@ -188,8 +286,8 @@ const Login = () => {
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</form>
|
||||
</div>
|
||||
</form> */}
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
/* SHARED */
|
||||
/* ////// */
|
||||
.register-page,
|
||||
.login-page,
|
||||
.set-new-password-page,
|
||||
.password-confirmed-page,
|
||||
.forgot-password-page,
|
||||
@@ -12,7 +11,6 @@
|
||||
height: var(--env-var-height-1);
|
||||
}
|
||||
.register-page h1.MuiTypography-root,
|
||||
.login-page h1.MuiTypography-root,
|
||||
.set-new-password-page h1.MuiTypography-root,
|
||||
.password-confirmed-page h1.MuiTypography-root,
|
||||
.forgot-password-page h1.MuiTypography-root,
|
||||
@@ -24,8 +22,6 @@
|
||||
.register-page p.MuiTypography-root,
|
||||
.register-page span,
|
||||
.register-page button,
|
||||
.login-page p.MuiTypography-root,
|
||||
.login-page span,
|
||||
.login-page button,
|
||||
.set-new-password-page p.MuiTypography-root,
|
||||
.set-new-password-page button,
|
||||
@@ -38,13 +34,11 @@
|
||||
.check-email-page span.MuiTypography-root {
|
||||
font-size: var(--env-var-font-size-medium);
|
||||
}
|
||||
.register-page p.MuiTypography-root,
|
||||
.login-page p.MuiTypography-root {
|
||||
.register-page p.MuiTypography-root {
|
||||
color: var(--env-var-color-2);
|
||||
opacity: 0.8;
|
||||
}
|
||||
.register-page button:not(.MuiIconButton-root),
|
||||
.login-page button:not(.MuiIconButton-root),
|
||||
.set-new-password-page button:not(.MuiIconButton-root),
|
||||
.password-confirmed-page button:not(.MuiIconButton-root),
|
||||
.forgot-password-page button:not(.MuiIconButton-root),
|
||||
@@ -54,12 +48,10 @@
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.register-page svg rect,
|
||||
.login-page svg rect {
|
||||
.register-page svg rect {
|
||||
fill: none;
|
||||
}
|
||||
.register-form,
|
||||
.login-form {
|
||||
.register-form {
|
||||
margin-top: 95px;
|
||||
}
|
||||
|
||||
@@ -77,7 +69,6 @@
|
||||
color: var(--env-var-color-2);
|
||||
}
|
||||
|
||||
.login-page .MuiFormControlLabel-root .MuiButtonBase-root,
|
||||
.set-new-password-page button:not(.MuiIconButton-root) svg,
|
||||
.password-confirmed-page button:not(.MuiIconButton-root) svg,
|
||||
.forgot-password-page button svg,
|
||||
@@ -108,19 +99,6 @@
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
}
|
||||
.login-page .MuiFormControlLabel-root {
|
||||
margin: 0;
|
||||
}
|
||||
.login-page .MuiFormControlLabel-root span:not(.Mui-checked) svg {
|
||||
fill: var(--env-var-color-4);
|
||||
}
|
||||
.login-page .MuiFormControlLabel-root svg {
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
.login-page .MuiFormControlLabel-root .MuiTypography-root {
|
||||
color: var(--env-var-color-5);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* /////////// */
|
||||
/* Check Email */
|
||||
@@ -128,3 +106,57 @@
|
||||
.check-email-page span.MuiTypography-root {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.login-page {
|
||||
height: 100vh;
|
||||
}
|
||||
.login-page h1 {
|
||||
font-size: 37px;
|
||||
font-weight: 600;
|
||||
color: var(--env-var-color-3);
|
||||
}
|
||||
|
||||
.login-page p {
|
||||
font-size: var(--env-var-font-size-large);
|
||||
color: var(--env-var-color-2-light);
|
||||
}
|
||||
.login-page .tos-p {
|
||||
font-size: var(--env-var-font-size-medium-plus);
|
||||
}
|
||||
.login-page span {
|
||||
font-size: inherit;
|
||||
}
|
||||
.login-page p + span {
|
||||
color: var(--env-var-color-3);
|
||||
opacity: 0.8;
|
||||
cursor: pointer;
|
||||
transition: opacity 300ms ease-in;
|
||||
}
|
||||
.login-page p > span {
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 2px;
|
||||
cursor: pointer;
|
||||
transition: all 200ms;
|
||||
}
|
||||
.login-page p > span:hover {
|
||||
color: var(--env-var-color-2);
|
||||
text-underline-offset: 4px;
|
||||
}
|
||||
.login-page p + span:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
.login-page button:not(.MuiIconButton-root) {
|
||||
font-size: var(--env-var-font-size-medium-plus);
|
||||
height: 40px;
|
||||
border-radius: var(--env-var-radius-2);
|
||||
}
|
||||
|
||||
.login-page > .MuiStack-root:nth-of-type(1) {
|
||||
height: var(--env-var-nav-bar-height);
|
||||
}
|
||||
|
||||
.login-page .background-pattern-svg {
|
||||
top: 14%;
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
}
|
||||
Reference in new issue
Block a user