@ -32,18 +32,14 @@ class Dashboard extends React.Component {
constructor ( props ) {
constructor ( props ) {
super ( props ) ;
super ( props ) ;
this . state = {
this . state = {
routes : props . routes
routes : props . routes ,
visible : false ,
collapsed : false
} ;
} ;
const config = this . props . context ;
this . config = this . props . context ;
this . Logo = config . theme . logo ;
this . Logo = this . config . theme . logo ;
}
}
//functions for show the drawer
state = {
visible : false ,
collapsed : false
} ;
showDrawer = ( ) => {
showDrawer = ( ) => {
this . setState ( {
this . setState ( {
visible : true ,
visible : true ,
@ -67,43 +63,61 @@ class Dashboard extends React.Component {
< / d i v >
< / d i v >
< div className = "web-layout" >
< div className = "web-layout" >
< Menu
< Menu
theme = "light"
theme = "light"
mode = "horizontal"
mode = "horizontal"
defaultSelectedKeys = { [ '1' ] }
defaultSelectedKeys = { [ '1' ] }
style = { { lineHeight : '64px' } }
style = { { lineHeight : '64px' } } >
>
< Menu . Item key = "1" > < Link to = "/publisher/apps" > < Icon
< Menu . Item key = "1" > < Link to = "/publisher/apps" > < Icon
type = "appstore" / > Apps < / L i n k > < / M e n u . I t e m >
type = "appstore" / > Apps < / L i n k > < / M e n u . I t e m >
< SubMenu
title = {
< span className = "submenu-title-wrapper" >
< Icon type = "plus" / >
Add New App
< / s p a n >
} >
< Menu . Item key = "setting:1" >
< Link to = "/publisher/add-new-app/public" > Public APP < / L i n k >
< / M e n u . I t e m >
< Menu . Item key = "setting:2" >
< Link to = "/publisher/add-new-app/enterprise" > Enterprise APP < / L i n k >
< / M e n u . I t e m >
< Menu . Item key = "setting:3" >
< Link to = "/publisher/add-new-app/web-clip" > Web Clip < / L i n k >
< / M e n u . I t e m >
< Menu . Item key = "setting:4" >
< Link to = "/publisher/add-new-app/custom-app" > Custom App < / L i n k >
< / M e n u . I t e m >
< / S u b M e n u >
< SubMenu
< SubMenu
title = {
title = {
< span className = "submenu-title-wrapper" >
< span className = "submenu-title-wrapper" >
< Icon type = "plus" / >
< Icon type = "control" / > Manage
Add New App
< / s p a n >
< / s p a n >
} >
}
< Menu . Item key = "manage" >
>
< Link to = "/publisher/manage" >
< Menu . Item key = "setting:1" > < Link to = "/publisher/add-new-app/public" > Public
< Icon type = "setting" / > General
APP < / L i n k > < / M e n u . I t e m >
< / L i n k >
< Menu . Item key = "setting:2" > < Link to = "/publisher/add-new-app/enterprise" > Enterprise
< / M e n u . I t e m >
APP < / L i n k > < / M e n u . I t e m >
{ this . config . androidEnterpriseToken != null && (
< Menu . Item key = "setting:3" > < Link to = "/publisher/add-new-app/web-clip" > Web
< Menu . Item key = "manage-android-enterprise" >
Clip < / L i n k > < / M e n u . I t e m >
< Link to = "/publisher/manage/android-enterprise" >
< Menu . Item key = "setting:3" > < Link to = "/publisher/add-new-app/custom-app" > Custom
< Icon type = "android" theme = "filled" / > Android Enterprise
App < / L i n k > < / M e n u . I t e m >
< / L i n k >
< / M e n u . I t e m >
) }
< / S u b M e n u >
< / S u b M e n u >
< Menu . Item key = "2" > < Link to = "/publisher/manage" > < Icon
type = "control" / > Manage < / L i n k > < / M e n u . I t e m >
< SubMenu className = "profile"
< SubMenu className = "profile"
title = {
title = {
< span className = "submenu-title-wrapper" >
< span className = "submenu-title-wrapper" >
< Icon type = "user" / >
< Icon type = "user" / > Profile
Profile
< / s p a n >
< / s p a n >
} >
}
>
< Logout / >
< Logout / >
< / S u b M e n u >
< / S u b M e n u >
< / M e n u >
< / M e n u >
@ -118,56 +132,63 @@ class Dashboard extends React.Component {
< / B u t t o n >
< / B u t t o n >
< / d i v >
< / d i v >
< Drawer
< Drawer
title = { < Link to = "/publisher/apps" > < img alt = "logo" src = { this . Logo } style = { { marginLeft : 30 } }
title = {
width = { "60%" } / > < / L i n k > }
< Link to = "/publisher/apps" >
< img alt = "logo"
src = { this . Logo }
style = { { marginLeft : 30 } }
width = { "60%" } / >
< / L i n k >
}
placement = "left"
placement = "left"
closable = { false }
closable = { false }
onClose = { this . onClose }
onClose = { this . onClose }
visible = { this . state . visible }
visible = { this . state . visible }
getContainer = { false }
getContainer = { false }
style = { { position : 'absolute' } }
style = { { position : 'absolute' } } >
>
< Menu
< Menu
theme = "light"
theme = "light"
mode = "inline"
mode = "inline"
defaultSelectedKeys = { [ '1' ] }
defaultSelectedKeys = { [ '1' ] }
style = { { lineHeight : '64px' , width : 231 } }
style = { { lineHeight : '64px' , width : 231 } } >
>
< Menu . Item key = "1" > < Link to = "/publisher/apps" > < Icon
< Menu . Item key = "1" > < Link to = "/publisher/apps" > < Icon
type = "appstore" / > Apps < / L i n k > < / M e n u . I t e m >
type = "appstore" / > Apps < / L i n k > < / M e n u . I t e m >
< SubMenu
< SubMenu
title = {
title = {
< span className = "submenu-title-wrapper" >
< span className = "submenu-title-wrapper" >
< Icon type = "plus" / >
< Icon type = "plus" / > Add New App
Add New App
< / s p a n >
< / s p a n >
} >
}
< Menu . Item key = "setting:1" >
>
< Link to = "/publisher/add-new-app/public" > Public APP < / L i n k >
< Menu . Item key = "setting:1" > < Link to = "/publisher/add-new-app/public" > Public
< / M e n u . I t e m >
APP < / L i n k > < / M e n u . I t e m >
< Menu . Item key = "setting:2" >
< Menu . Item key = "setting:2" > < Link to = "/publisher/add-new-app/enterprise" > Enterprise
< Link to = "/publisher/add-new-app/enterprise" > Enterprise APP < / L i n k >
APP < / L i n k > < / M e n u . I t e m >
< / M e n u . I t e m >
< Menu . Item key = "setting:3" > < Link to = "/publisher/add-new-app/web-clip" > Web
< Menu . Item key = "setting:3" >
Clip < / L i n k > < / M e n u . I t e m >
< Link to = "/publisher/add-new-app/web-clip" > Web Clip < / L i n k >
< Menu . Item key = "setting:4" > < Link to = "/publisher/add-new-app/custom-app" > Custom
< / M e n u . I t e m >
App < / L i n k > < / M e n u . I t e m >
< Menu . Item key = "setting:4" >
< Link to = "/publisher/add-new-app/custom-app" > Custom App < / L i n k >
< / M e n u . I t e m >
< / S u b M e n u >
< / S u b M e n u >
< Menu . Item key = "2" > < Link to = "/publisher/manage" > < Icon
< Menu . Item key = "2" >
type = "control" / > Manage < / L i n k > < / M e n u . I t e m >
< Link to = "/publisher/manage" >
< Icon type = "control" / > Manage
< / L i n k >
< / M e n u . I t e m >
< / M e n u >
< / M e n u >
< / D r a w e r >
< / D r a w e r >
< Menu
< Menu
mode = "horizontal"
mode = "horizontal"
defaultSelectedKeys = { [ '1' ] }
defaultSelectedKeys = { [ '1' ] }
style = { { lineHeight : '63px' , position : 'fixed' , marginLeft : '80%' } }
style = { { lineHeight : '63px' , position : 'fixed' , marginLeft : '80%' } } >
>
< SubMenu
< SubMenu
title = {
title = {
< span className = "submenu-title-wrapper" >
< span className = "submenu-title-wrapper" >
< Icon type = "user" / >
< Icon type = "user" / >
< / s p a n >
< / s p a n >
}
} >
>
< Logout / >
< Logout / >
< / S u b M e n u >
< / S u b M e n u >
< / M e n u >
< / M e n u >
@ -191,4 +212,4 @@ class Dashboard extends React.Component {
}
}
}
}
export default withConfigContext ( Dashboard ) ;
export default withConfigContext ( Dashboard ) ;