Update UserImgLogin UI #202
This commit is contained in:
1 file changed
+88
-91
+88
-91
@@ -13,6 +13,7 @@ import {
|
|||||||
DialogContentText,
|
DialogContentText,
|
||||||
Grid,
|
Grid,
|
||||||
OutlinedInput,
|
OutlinedInput,
|
||||||
|
Paper,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
Typography,
|
Typography,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
@@ -145,109 +146,105 @@ export const LoginWithImage = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppBarBackOnly />
|
<AppBarBackOnly />
|
||||||
<Container
|
<div
|
||||||
maxWidth="xs"
|
style={{
|
||||||
sx={{
|
|
||||||
height: "100vh",
|
height: "100vh",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
|
flexDirection: "column",
|
||||||
|
width: "30vw",
|
||||||
|
margin: "auto",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Grid
|
<div
|
||||||
container
|
style={{
|
||||||
direction="column"
|
marginBottom: "-4em",
|
||||||
justifyContent="center"
|
boxShadow: "1em 0 hsl(256, 100%, 6%)",
|
||||||
alignItems="center"
|
}}
|
||||||
spacing={2}
|
|
||||||
width="100%"
|
|
||||||
>
|
>
|
||||||
<Grid
|
<AvatarImage userId={userId} />
|
||||||
container
|
</div>
|
||||||
direction="column"
|
<Paper
|
||||||
justifyContent="center"
|
sx={{
|
||||||
alignItems="center"
|
width: "100%",
|
||||||
marginBottom={2}
|
padding: "1em",
|
||||||
|
paddingTop: "5em",
|
||||||
|
borderRadius: "10px",
|
||||||
|
}}
|
||||||
|
elevation={2}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
textAlign="left"
|
||||||
|
variant="h5"
|
||||||
|
sx={{ opacity: 0.8 }}
|
||||||
|
mb={2}
|
||||||
>
|
>
|
||||||
<Typography
|
Login as {userName}:
|
||||||
textAlign="center"
|
</Typography>
|
||||||
variant="h3"
|
<FormGroup
|
||||||
color="textPrimary"
|
sx={{
|
||||||
mb={2}
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<FormControl
|
||||||
|
variant="outlined"
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Login
|
<InputLabel htmlFor="user-password">Password:</InputLabel>
|
||||||
</Typography>
|
<OutlinedInput
|
||||||
</Grid>
|
id="user-password"
|
||||||
<Grid
|
type={password.showpass ? "text" : "password"}
|
||||||
container
|
variant="outlined"
|
||||||
direction="column"
|
onChange={handlePassword("password")}
|
||||||
justifyContent="center"
|
label="Password:"
|
||||||
alignItems="center"
|
endAdornment={
|
||||||
mb={1}
|
<InputAdornment position="end">
|
||||||
>
|
<IconButton
|
||||||
<AvatarImage userId={userId} />
|
onClick={handleShowPassword}
|
||||||
<Typography color="textPrimary" textAlign="center" variant="h4">
|
aria-label="toggle password visibility"
|
||||||
{userName}
|
>
|
||||||
</Typography>
|
{password.showpass ? (
|
||||||
</Grid>
|
<span className="material-symbols-rounded">
|
||||||
<Grid minWidth="100%">
|
visibility_off
|
||||||
<FormGroup>
|
</span>
|
||||||
<FormControl variant="outlined" fullWidth>
|
) : (
|
||||||
<InputLabel htmlFor="user-password">Password:</InputLabel>
|
<span className="material-symbols-rounded">
|
||||||
<OutlinedInput
|
visibility
|
||||||
id="user-password"
|
</span>
|
||||||
type={password.showpass ? "text" : "password"}
|
)}
|
||||||
variant="outlined"
|
</IconButton>
|
||||||
onChange={handlePassword("password")}
|
</InputAdornment>
|
||||||
label="Password:"
|
|
||||||
endAdornment={
|
|
||||||
<InputAdornment position="end">
|
|
||||||
<IconButton
|
|
||||||
onClick={handleShowPassword}
|
|
||||||
aria-label="toggle password visibility"
|
|
||||||
>
|
|
||||||
{password.showpass ? (
|
|
||||||
<span className="material-symbols-rounded">
|
|
||||||
visibility_off
|
|
||||||
</span>
|
|
||||||
) : (
|
|
||||||
<span className="material-symbols-rounded">
|
|
||||||
visibility
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</IconButton>
|
|
||||||
</InputAdornment>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</FormControl>
|
|
||||||
<FormControlLabel
|
|
||||||
control={
|
|
||||||
<Checkbox
|
|
||||||
checked={rememberMe}
|
|
||||||
onChange={handleCheckRememberMe}
|
|
||||||
/>
|
|
||||||
}
|
}
|
||||||
label="Remember me"
|
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormControl>
|
||||||
</Grid>
|
<FormControlLabel
|
||||||
<Grid minWidth="100%">
|
control={
|
||||||
<LoadingButton
|
<Checkbox
|
||||||
variant="contained"
|
checked={rememberMe}
|
||||||
endIcon={
|
onChange={handleCheckRememberMe}
|
||||||
<span className="material-symbols-rounded">chevron_right</span>
|
/>
|
||||||
}
|
}
|
||||||
onClick={handleLogin}
|
label="Remember me"
|
||||||
loading={loading}
|
/>
|
||||||
loadingPosition="end"
|
</FormGroup>
|
||||||
size="large"
|
<LoadingButton
|
||||||
fullWidth
|
variant="contained"
|
||||||
>
|
endIcon={
|
||||||
Login
|
<span className="material-symbols-rounded">chevron_right</span>
|
||||||
</LoadingButton>
|
}
|
||||||
</Grid>
|
onClick={handleLogin}
|
||||||
</Grid>
|
loading={loading}
|
||||||
</Container>
|
loadingPosition="end"
|
||||||
|
size="large"
|
||||||
|
fullWidth
|
||||||
|
>
|
||||||
|
Login
|
||||||
|
</LoadingButton>
|
||||||
|
</Paper>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user