@ -32,17 +32,13 @@ class Dashboard extends React.Component {
constructor ( props ) {
constructor ( props ) {
super ( props ) ;
super ( props ) ;
this . state = {
this . state = {
routes : props . routes
routes : props . routes ,
} ;
const config = this . props . context ;
this . Logo = config . theme . logo ;
}
//functions for show the drawer
state = {
visible : false ,
visible : false ,
collapsed : false
collapsed : false
} ;
} ;
this . config = this . props . context ;
this . Logo = this . config . theme . logo ;
}
showDrawer = ( ) => {
showDrawer = ( ) => {
this . setState ( {
this . setState ( {
@ -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
< 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" >
< Menu . Item key = "setting:1" > < Link to = "/publisher/add-new-app/public" > Public
< Link to = "/publisher/add-new-app/public" > Public 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:2" > < Link to = "/publisher/add-new-app/enterprise" > Enterprise
< Menu . Item key = "setting:2" >
APP < / L i n k > < / M e n u . I t e m >
< Link to = "/publisher/add-new-app/enterprise" > Enterprise APP < / L i n k >
< Menu . Item key = "setting:3" > < Link to = "/publisher/add-new-app/web-clip" > Web
< / M e n u . I t e m >
Clip < / L i n k > < / M e n u . I t e m >
< Menu . Item key = "setting:3" >
< Menu . Item key = "setting:3" > < Link to = "/publisher/add-new-app/custom-app" > Custom
< Link to = "/publisher/add-new-app/web-clip" > Web Clip < / 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: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
title = {
< span className = "submenu-title-wrapper" >
< Icon type = "control" / > Manage
< / s p a n >
} >
< Menu . Item key = "manage" >
< Link to = "/publisher/manage" >
< Icon type = "setting" / > General
< / L i n k >
< / M e n u . I t e m >
{ this . config . androidEnterpriseToken != null && (
< Menu . Item key = "manage-android-enterprise" >
< Link to = "/publisher/manage/android-enterprise" >
< Icon type = "android" theme = "filled" / > Android Enterprise
< / 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" >
< Menu . Item key = "setting:1" > < Link to = "/publisher/add-new-app/public" > Public
< Link to = "/publisher/add-new-app/public" > Public 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:2" > < Link to = "/publisher/add-new-app/enterprise" > Enterprise
< Menu . Item key = "setting:2" >
APP < / L i n k > < / M e n u . I t e m >
< Link to = "/publisher/add-new-app/enterprise" > Enterprise APP < / L i n k >
< Menu . Item key = "setting:3" > < Link to = "/publisher/add-new-app/web-clip" > Web
< / M e n u . I t e m >
Clip < / L i n k > < / M e n u . I t e m >
< Menu . Item key = "setting:3" >
< Menu . Item key = "setting:4" > < Link to = "/publisher/add-new-app/custom-app" > Custom
< Link to = "/publisher/add-new-app/web-clip" > Web Clip < / 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: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 >