1
1
import React , { RefObject } from 'react' ;
2
2
import { Link , withRouter , RouteComponentProps } from 'react-router-dom' ;
3
3
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' ;
5
5
import { ClickAwayListener , Popper , Hidden , Typography } from '@material-ui/core' ;
6
6
import { List , ListItem , ListItemIcon , ListItemText , ListItemAvatar } from '@material-ui/core' ;
7
7
import { Card , CardContent , CardActions } from '@material-ui/core' ;
@@ -42,6 +42,16 @@ const styles = (theme: Theme) => createStyles({
42
42
width : `calc(100% - ${ drawerWidth } px)` ,
43
43
} ,
44
44
} ,
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
+ } ,
45
55
menuButton : {
46
56
marginRight : theme . spacing ( 2 ) ,
47
57
[ theme . breakpoints . up ( 'md' ) ] : {
@@ -64,7 +74,7 @@ const styles = (theme: Theme) => createStyles({
64
74
"& > * + *" : {
65
75
marginLeft : theme . spacing ( 2 ) ,
66
76
}
67
- }
77
+ } ,
68
78
} ) ;
69
79
70
80
interface MenuAppBarState {
@@ -110,6 +120,9 @@ class MenuAppBar extends React.Component<MenuAppBarProps, MenuAppBarState> {
110
120
const drawer = (
111
121
< div >
112
122
< Toolbar >
123
+ < Box display = "flex" >
124
+ < img src = "/app/icon.png" className = { classes . toolbarImage } alt = { PROJECT_NAME } />
125
+ </ Box >
113
126
< Typography variant = "h6" color = "textPrimary" >
114
127
{ PROJECT_NAME }
115
128
</ Typography >
@@ -142,7 +155,7 @@ class MenuAppBar extends React.Component<MenuAppBarProps, MenuAppBarState> {
142
155
< DeviceHubIcon />
143
156
</ ListItemIcon >
144
157
< ListItemText primary = "MQTT" />
145
- </ ListItem >
158
+ </ ListItem >
146
159
< ListItem to = '/security/' selected = { path . startsWith ( '/security/' ) } button component = { Link } disabled = { ! authenticatedContext . me . admin } >
147
160
< ListItemIcon >
148
161
< LockIcon />
0 commit comments