11import React , { RefObject } from 'react' ;
22import { Link , withRouter , RouteComponentProps } from 'react-router-dom' ;
33
4- import { Drawer , AppBar , Toolbar , Avatar , Divider , Button , IconButton } from '@material-ui/core' ;
4+ import { Drawer , AppBar , Toolbar , Avatar , Divider , Button , Box , IconButton } from '@material-ui/core' ;
55import { ClickAwayListener , Popper , Hidden , Typography } from '@material-ui/core' ;
66import { List , ListItem , ListItemIcon , ListItemText , ListItemAvatar } from '@material-ui/core' ;
77import { Card , CardContent , CardActions } from '@material-ui/core' ;
@@ -42,6 +42,16 @@ const styles = (theme: Theme) => createStyles({
4242 width : `calc(100% - ${ drawerWidth } px)` ,
4343 } ,
4444 } ,
45+ toolbarImage : {
46+ [ theme . breakpoints . up ( 'xs' ) ] : {
47+ height : 24 ,
48+ marginRight : theme . spacing ( 2 )
49+ } ,
50+ [ theme . breakpoints . up ( 'sm' ) ] : {
51+ height : 36 ,
52+ marginRight : theme . spacing ( 3 )
53+ } ,
54+ } ,
4555 menuButton : {
4656 marginRight : theme . spacing ( 2 ) ,
4757 [ theme . breakpoints . up ( 'md' ) ] : {
@@ -64,7 +74,7 @@ const styles = (theme: Theme) => createStyles({
6474 "& > * + *" : {
6575 marginLeft : theme . spacing ( 2 ) ,
6676 }
67- }
77+ } ,
6878} ) ;
6979
7080interface MenuAppBarState {
@@ -110,6 +120,9 @@ class MenuAppBar extends React.Component<MenuAppBarProps, MenuAppBarState> {
110120 const drawer = (
111121 < div >
112122 < Toolbar >
123+ < Box display = "flex" >
124+ < img src = "/app/icon.png" className = { classes . toolbarImage } alt = { PROJECT_NAME } />
125+ </ Box >
113126 < Typography variant = "h6" color = "textPrimary" >
114127 { PROJECT_NAME }
115128 </ Typography >
@@ -142,7 +155,7 @@ class MenuAppBar extends React.Component<MenuAppBarProps, MenuAppBarState> {
142155 < DeviceHubIcon />
143156 </ ListItemIcon >
144157 < ListItemText primary = "MQTT" />
145- </ ListItem >
158+ </ ListItem >
146159 < ListItem to = '/security/' selected = { path . startsWith ( '/security/' ) } button component = { Link } disabled = { ! authenticatedContext . me . admin } >
147160 < ListItemIcon >
148161 < LockIcon />
0 commit comments