| | |
| | | import { Stack, Grid, Box, Typography, Card, CardContent, Tabs, Tab } from '@mui/material'; |
| | | import * as Common from '@/utils/common'; |
| | | import BaseSettings from "./BaseSettings"; |
| | | import SecuritySettings from "./SecuritySettings" |
| | | import { queryUserInfo } from '@/api/auth'; |
| | | |
| | | const Index = () => { |
| | |
| | | aria-controls='vertical-tabpanel-1' |
| | | /> |
| | | </Tabs> |
| | | <BaseSettings |
| | | value={value} |
| | | userInfo={userInfo} |
| | | /> |
| | | <SecuritySettings |
| | | value={value} |
| | | /> |
| | | |
| | | {value === 0 && ( |
| | | <BaseSettings |
| | | value={value} |
| | | userInfo={userInfo} |
| | | /> |
| | | )} |
| | | {value === 1 && ( |
| | | <SecuritySettings |
| | | value={value} |
| | | userInfo={userInfo} |
| | | /> |
| | | )} |
| | | |
| | | </Box> |
| | | </CardContent> |
| | | </Card> |
| | | </> |
| | | ) |
| | | } |
| | | |
| | | const SecuritySettings = (props) => { |
| | | const { children, value, ...other } = props; |
| | | |
| | | return ( |
| | | <Box |
| | | hidden={value !== 1} |
| | | sx={{ p: 3 }} |
| | | {...other} |
| | | > |
| | | <Typography> |
| | | Security Settings |
| | | </Typography> |
| | | </Box> |
| | | |
| | | ) |
| | | } |
| | | |