applied the feedback
This commit is contained in:
1 parent
4b92683c72
commit
eec11f303c
3 files changed
+80
-35
No files matched your search
@@ -70,8 +70,17 @@ const EmailStep = ({ form, errors, onSubmit, onChange }) => {
|
|||||||
color="accent"
|
color="accent"
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={errors.email && true}
|
disabled={errors.email && true}
|
||||||
|
className="dashboard-style-button"
|
||||||
sx={{
|
sx={{
|
||||||
width: "30%",
|
width: "30%",
|
||||||
|
px: theme.spacing(6),
|
||||||
|
borderRadius: `${theme.shape.borderRadius}px !important`,
|
||||||
|
'&.MuiButtonBase-root': {
|
||||||
|
borderRadius: `${theme.shape.borderRadius}px !important`
|
||||||
|
},
|
||||||
|
'&.MuiButton-root': {
|
||||||
|
borderRadius: `${theme.shape.borderRadius}px !important`
|
||||||
|
},
|
||||||
"&.Mui-focusVisible": {
|
"&.Mui-focusVisible": {
|
||||||
outline: `2px solid ${theme.palette.primary.main}`,
|
outline: `2px solid ${theme.palette.primary.main}`,
|
||||||
outlineOffset: `2px`,
|
outlineOffset: `2px`,
|
||||||
|
|||||||
@@ -75,8 +75,16 @@ const PasswordStep = ({ form, errors, onSubmit, onChange, onBack }) => {
|
|||||||
variant="outlined"
|
variant="outlined"
|
||||||
color="info"
|
color="info"
|
||||||
onClick={onBack}
|
onClick={onBack}
|
||||||
|
className="dashboard-style-button"
|
||||||
sx={{
|
sx={{
|
||||||
px: theme.spacing(5),
|
px: theme.spacing(5),
|
||||||
|
borderRadius: `${theme.shape.borderRadius}px !important`,
|
||||||
|
'&.MuiButtonBase-root': {
|
||||||
|
borderRadius: `${theme.shape.borderRadius}px !important`
|
||||||
|
},
|
||||||
|
'&.MuiButton-root': {
|
||||||
|
borderRadius: `${theme.shape.borderRadius}px !important`
|
||||||
|
},
|
||||||
"& svg.MuiSvgIcon-root": {
|
"& svg.MuiSvgIcon-root": {
|
||||||
mr: theme.spacing(3),
|
mr: theme.spacing(3),
|
||||||
},
|
},
|
||||||
@@ -95,13 +103,22 @@ const PasswordStep = ({ form, errors, onSubmit, onChange, onBack }) => {
|
|||||||
type="submit"
|
type="submit"
|
||||||
loading={authState.isLoading}
|
loading={authState.isLoading}
|
||||||
disabled={errors.password && true}
|
disabled={errors.password && true}
|
||||||
|
className="dashboard-style-button"
|
||||||
sx={{
|
sx={{
|
||||||
width: "30%",
|
width: "30%",
|
||||||
|
px: theme.spacing(4),
|
||||||
|
borderRadius: `${theme.shape.borderRadius}px !important`,
|
||||||
|
'&.MuiButtonBase-root': {
|
||||||
|
borderRadius: `${theme.shape.borderRadius}px !important`
|
||||||
|
},
|
||||||
|
'&.MuiButton-root': {
|
||||||
|
borderRadius: `${theme.shape.borderRadius}px !important`
|
||||||
|
},
|
||||||
"&.Mui-focusVisible": {
|
"&.Mui-focusVisible": {
|
||||||
outline: `2px solid ${theme.palette.primary.main}`,
|
outline: `2px solid ${theme.palette.primary.main}`,
|
||||||
outlineOffset: `2px`,
|
outlineOffset: `2px`,
|
||||||
boxShadow: `none`,
|
|
||||||
},
|
},
|
||||||
|
boxShadow: `none`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("continue")}
|
{t("continue")}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { useState, useEffect, useCallback } from "react";
|
import { useState, useEffect, useCallback } from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { Box, Stack, Typography, Alert, Button } from "@mui/material";
|
import { Box, Stack, Typography, Button } from "@mui/material";
|
||||||
|
import Alert from "../../../Components/Alert";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { credentials } from "../../../Validation/validation";
|
import { credentials } from "../../../Validation/validation";
|
||||||
import { login } from "../../../Features/Auth/authSlice";
|
import { login } from "../../../Features/Auth/authSlice";
|
||||||
@@ -281,39 +282,52 @@ const Login = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
) : !backendReachable ? (
|
) : !backendReachable ? (
|
||||||
<Stack spacing={theme.spacing(6)} alignItems="center">
|
<Stack spacing={theme.spacing(6)} alignItems="center">
|
||||||
<Alert
|
<Box sx={{
|
||||||
severity="error"
|
width: theme.spacing(220),
|
||||||
sx={{
|
mx: 'auto',
|
||||||
width: '100%',
|
'& .alert.row-stack': {
|
||||||
'& .MuiAlert-message': {
|
width: '100%',
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center'
|
|
||||||
},
|
|
||||||
'& .MuiAlert-icon': {
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
marginRight: theme.spacing(2)
|
gap: theme.spacing(3)
|
||||||
}
|
}
|
||||||
}}
|
}}>
|
||||||
>
|
<Alert
|
||||||
{t("backendUnreachable")}
|
variant="error"
|
||||||
</Alert>
|
body={t("backendUnreachable")}
|
||||||
<Typography
|
hasIcon={true}
|
||||||
variant="body1"
|
/>
|
||||||
align="center"
|
</Box>
|
||||||
mt={theme.spacing(2)}
|
<Box mt={theme.spacing(2)}>
|
||||||
>
|
<Typography
|
||||||
{t("backendUnreachableMessage")}
|
variant="body1"
|
||||||
</Typography>
|
align="center"
|
||||||
<Button
|
color={theme.palette.primary.contrastTextSecondary}
|
||||||
variant="contained"
|
>
|
||||||
color="accent"
|
{t("backendUnreachableMessage")}
|
||||||
onClick={handleRetry}
|
</Typography>
|
||||||
disabled={isCheckingConnection}
|
</Box>
|
||||||
mt={theme.spacing(4)}
|
<Box sx={{ mt: theme.spacing(4) }}>
|
||||||
>
|
<Button
|
||||||
{isCheckingConnection ? t("retryingConnection") : t("retryConnection")}
|
variant="contained"
|
||||||
</Button>
|
color="accent"
|
||||||
|
onClick={handleRetry}
|
||||||
|
disabled={isCheckingConnection}
|
||||||
|
loading={isCheckingConnection}
|
||||||
|
className="dashboard-style-button"
|
||||||
|
sx={{
|
||||||
|
px: theme.spacing(6),
|
||||||
|
borderRadius: `${theme.shape.borderRadius}px !important`,
|
||||||
|
'&.MuiButtonBase-root': {
|
||||||
|
borderRadius: `${theme.shape.borderRadius}px !important`
|
||||||
|
},
|
||||||
|
'&.MuiButton-root': {
|
||||||
|
borderRadius: `${theme.shape.borderRadius}px !important`
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{isCheckingConnection ? t("retryingConnection") : t("retryConnection")}
|
||||||
|
</Button>
|
||||||
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
) : step === 0 ? (
|
) : step === 0 ? (
|
||||||
<EmailStep
|
<EmailStep
|
||||||
@@ -353,7 +367,12 @@ const Login = () => {
|
|||||||
component="span"
|
component="span"
|
||||||
color={theme.palette.accent.main}
|
color={theme.palette.accent.main}
|
||||||
ml={theme.spacing(2)}
|
ml={theme.spacing(2)}
|
||||||
sx={{ userSelect: "none" }}
|
sx={{
|
||||||
|
cursor: 'pointer',
|
||||||
|
'&:hover': {
|
||||||
|
color: theme.palette.accent.darker
|
||||||
|
}
|
||||||
|
}}
|
||||||
onClick={() => navigate("/register")}
|
onClick={() => navigate("/register")}
|
||||||
>
|
>
|
||||||
{t("registerHere")}
|
{t("registerHere")}
|
||||||
|
|||||||
Reference in new issue
Block a user