|
@@ -4,13 +4,13 @@ import MenuIcon from '@mui/icons-material/Menu';
|
|
import Menu from '@mui/material/Menu';
|
|
import Menu from '@mui/material/Menu';
|
|
import MenuItem from '@mui/material/MenuItem';
|
|
import MenuItem from '@mui/material/MenuItem';
|
|
|
|
|
|
-
|
|
|
|
import Drawer from '@mui/material/Drawer';
|
|
import Drawer from '@mui/material/Drawer';
|
|
import Box from '@mui/material/Box';
|
|
import Box from '@mui/material/Box';
|
|
import List from '@mui/material/List';
|
|
import List from '@mui/material/List';
|
|
import Divider from '@mui/material/Divider';
|
|
import Divider from '@mui/material/Divider';
|
|
import ListItem from '@mui/material/ListItem';
|
|
import ListItem from '@mui/material/ListItem';
|
|
import ListItemText from '@mui/material/ListItemText';
|
|
import ListItemText from '@mui/material/ListItemText';
|
|
|
|
+import Typography from '@mui/material/Typography';
|
|
|
|
|
|
import {actionFullLogout} from "../actions"
|
|
import {actionFullLogout} from "../actions"
|
|
import {connect} from 'react-redux';
|
|
import {connect} from 'react-redux';
|
|
@@ -76,7 +76,44 @@ export const MainMenu = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-export const MenuDrawer = ({}) => {
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+const AboutMe = ({ myProfile }) => {
|
|
|
|
+ const {login, nick} = myProfile
|
|
|
|
+return (
|
|
|
|
+ <>
|
|
|
|
+ <Box sx={{ display: 'flex', flexDirection: 'column',
|
|
|
|
+ justifyContent: 'start', alignItems: 'center',
|
|
|
|
+ background: '#dddddd44' }}>
|
|
|
|
+
|
|
|
|
+ <Box sx={{ m: 2, mb: 1 }}>
|
|
|
|
+ <CMyAvatar bigSize={true} />
|
|
|
|
+ </Box>
|
|
|
|
+
|
|
|
|
+ <Box sx={{ mx: 2, display: 'flex', justifyContent: 'center',
|
|
|
|
+ alignSelf: 'start', maxWidth: '90%' }}>
|
|
|
|
+ <Typography component="h6" variant="h6"
|
|
|
|
+ sx={{ overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }}>
|
|
|
|
+ {nick}
|
|
|
|
+ </Typography>
|
|
|
|
+ </Box>
|
|
|
|
+
|
|
|
|
+ <Box sx={{ mx: 2, mb: 2, display: 'flex', justifyContent: 'center',
|
|
|
|
+ alignSelf: 'start', maxWidth: '90%' }}>
|
|
|
|
+ <Typography variant="body"
|
|
|
|
+ sx={{ overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }}>
|
|
|
|
+ {login}
|
|
|
|
+ </Typography>
|
|
|
|
+ </Box>
|
|
|
|
+
|
|
|
|
+ </Box>
|
|
|
|
+ </>
|
|
|
|
+)
|
|
|
|
+}
|
|
|
|
+const CAboutMe = connect( state => ({ myProfile: state.promise.myProfile?.payload || {} }))(AboutMe)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+export const MenuDrawer = ({ }) => {
|
|
const [state, setState] = useState(false);
|
|
const [state, setState] = useState(false);
|
|
const open = !!state
|
|
const open = !!state
|
|
|
|
|
|
@@ -98,25 +135,23 @@ export const MenuDrawer = ({}) => {
|
|
aria-haspopup="true"
|
|
aria-haspopup="true"
|
|
aria-expanded={open ? 'true' : undefined}
|
|
aria-expanded={open ? 'true' : undefined}
|
|
onClick={toggleDrawer(true)}
|
|
onClick={toggleDrawer(true)}
|
|
- >
|
|
|
|
|
|
+ >
|
|
|
|
|
|
<MenuIcon />
|
|
<MenuIcon />
|
|
</IconButton>
|
|
</IconButton>
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
<Drawer
|
|
<Drawer
|
|
open={state}
|
|
open={state}
|
|
onClose={toggleDrawer(false)}
|
|
onClose={toggleDrawer(false)}
|
|
- >
|
|
|
|
-
|
|
|
|
- <Box
|
|
|
|
- sx={{ width: 250 }}
|
|
|
|
- role="presentation"
|
|
|
|
>
|
|
>
|
|
- <Box sx={{ m: 2, display: 'flex', justifyContent: 'center' }}>
|
|
|
|
- <CMyAvatar bigSize={true} />
|
|
|
|
- </Box>
|
|
|
|
|
|
+ <Box
|
|
|
|
+ sx={{ width: 250, overflow: 'hidden', }}
|
|
|
|
+ role="presentation"
|
|
|
|
+ >
|
|
|
|
+
|
|
|
|
+ <CAboutMe />
|
|
|
|
+
|
|
|
|
|
|
<List>
|
|
<List>
|
|
<CProfileModal />
|
|
<CProfileModal />
|
|
@@ -135,4 +170,6 @@ export const MenuDrawer = ({}) => {
|
|
</Drawer>
|
|
</Drawer>
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|