some missing newlines and add signout to the menu
This commit is contained in:
parent
396d0333b6
commit
adeb9d27ed
@ -20,9 +20,11 @@ import MenuIcon from '@material-ui/icons/Menu';
|
|||||||
import WifiIcon from '@material-ui/icons/Wifi';
|
import WifiIcon from '@material-ui/icons/Wifi';
|
||||||
import SystemUpdateIcon from '@material-ui/icons/SystemUpdate';
|
import SystemUpdateIcon from '@material-ui/icons/SystemUpdate';
|
||||||
import AccessTimeIcon from '@material-ui/icons/AccessTime';
|
import AccessTimeIcon from '@material-ui/icons/AccessTime';
|
||||||
|
import AccountCircleIcon from '@material-ui/icons/AccountCircle';
|
||||||
import SettingsInputAntennaIcon from '@material-ui/icons/SettingsInputAntenna';
|
import SettingsInputAntennaIcon from '@material-ui/icons/SettingsInputAntenna';
|
||||||
|
|
||||||
import { APP_NAME } from '../constants/App';
|
import { APP_NAME } from '../constants/App';
|
||||||
|
import { withAuthenticationContext } from '../authentication/Context.js';
|
||||||
|
|
||||||
const drawerWidth = 290;
|
const drawerWidth = 290;
|
||||||
|
|
||||||
@ -93,7 +95,7 @@ class MenuAppBar extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { classes, theme, children, sectionTitle } = this.props;
|
const { classes, theme, children, sectionTitle, authenticationContext } = this.props;
|
||||||
|
|
||||||
const drawer = (
|
const drawer = (
|
||||||
<div>
|
<div>
|
||||||
@ -129,6 +131,13 @@ class MenuAppBar extends React.Component {
|
|||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText primary="OTA Configuration" />
|
<ListItemText primary="OTA Configuration" />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
<Divider />
|
||||||
|
<ListItem button onClick={authenticationContext.signOut}>
|
||||||
|
<ListItemIcon>
|
||||||
|
<AccountCircleIcon />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText primary="Sign Out" secondary={"Signed in as: "+ authenticationContext.jwt.username} />
|
||||||
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@ -193,4 +202,4 @@ MenuAppBar.propTypes = {
|
|||||||
sectionTitle: PropTypes.string.isRequired,
|
sectionTitle: PropTypes.string.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default withStyles(styles, { withTheme: true })(MenuAppBar);
|
export default withAuthenticationContext(withStyles(styles, { withTheme: true })(MenuAppBar));
|
||||||
|
@ -23,4 +23,4 @@ export const networkSecurityMode = selectedNetwork => {
|
|||||||
default:
|
default:
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
export default validator => value => !value || validator(value);
|
export default validator => value => !value || validator(value);
|
||||||
|
Loading…
Reference in New Issue
Block a user