mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-30 15:16:39 +08:00
67 lines
2.5 KiB
JavaScript
67 lines
2.5 KiB
JavaScript
import { Link } from 'react-router-dom';
|
|
|
|
// material-ui
|
|
import { useTheme } from '@mui/material/styles';
|
|
import { Divider, Grid, Stack, Typography, useMediaQuery } from '@mui/material';
|
|
|
|
// project imports
|
|
import AuthWrapper from '../AuthWrapper';
|
|
import AuthCardWrapper from '../AuthCardWrapper';
|
|
import AuthLogin from '../AuthForms/AuthLogin';
|
|
import Logo from 'ui-component/Logo';
|
|
|
|
// ================================|| AUTH3 - LOGIN ||================================ //
|
|
|
|
const Login = () => {
|
|
const theme = useTheme();
|
|
const matchDownSM = useMediaQuery(theme.breakpoints.down('md'));
|
|
|
|
return (
|
|
<AuthWrapper>
|
|
<Grid container direction="column" justifyContent="flex-end">
|
|
<Grid item xs={12}>
|
|
<Grid container justifyContent="center" alignItems="center" sx={{ minHeight: 'calc(100vh - 136px)' }}>
|
|
<Grid item sx={{ m: { xs: 1, sm: 3 }, mb: 0 }}>
|
|
<AuthCardWrapper>
|
|
<Grid container spacing={2} alignItems="center" justifyContent="center">
|
|
<Grid item sx={{ mb: 3 }}>
|
|
<Link to="#">
|
|
<Logo />
|
|
</Link>
|
|
</Grid>
|
|
<Grid item xs={12}>
|
|
<Grid container direction={matchDownSM ? 'column-reverse' : 'row'} alignItems="center" justifyContent="center">
|
|
<Grid item>
|
|
<Stack alignItems="center" justifyContent="center" spacing={1}>
|
|
<Typography color={theme.palette.primary.main} gutterBottom variant={matchDownSM ? 'h3' : 'h2'}>
|
|
登录
|
|
</Typography>
|
|
</Stack>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
<Grid item xs={12}>
|
|
<AuthLogin />
|
|
</Grid>
|
|
<Grid item xs={12}>
|
|
<Divider />
|
|
</Grid>
|
|
<Grid item xs={12}>
|
|
<Grid item container direction="column" alignItems="center" xs={12}>
|
|
<Typography component={Link} to="/register" variant="subtitle1" sx={{ textDecoration: 'none' }}>
|
|
注册
|
|
</Typography>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</AuthCardWrapper>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</AuthWrapper>
|
|
);
|
|
};
|
|
|
|
export default Login;
|