|
|
@ -26,7 +26,7 @@ import {List, ListItem} from 'material-ui/List';
|
|
|
|
import Apps from 'material-ui/svg-icons/navigation/apps';
|
|
|
|
import Apps from 'material-ui/svg-icons/navigation/apps';
|
|
|
|
import NotificationsIcon from 'material-ui/svg-icons/social/notifications';
|
|
|
|
import NotificationsIcon from 'material-ui/svg-icons/social/notifications';
|
|
|
|
import ActionAccountCircle from 'material-ui/svg-icons/action/account-circle';
|
|
|
|
import ActionAccountCircle from 'material-ui/svg-icons/action/account-circle';
|
|
|
|
import { Link } from 'react-router-dom';
|
|
|
|
import {Link, withRouter} from 'react-router-dom';
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Base Layout:
|
|
|
|
* Base Layout:
|
|
|
@ -36,15 +36,6 @@ import { Link } from 'react-router-dom';
|
|
|
|
* */
|
|
|
|
* */
|
|
|
|
class BaseLayout extends Component {
|
|
|
|
class BaseLayout extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
|
|
|
|
super(props);
|
|
|
|
|
|
|
|
this.state = this.props.state;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
componentWillMount() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleApplicationClick() {
|
|
|
|
handleApplicationClick() {
|
|
|
|
this.handleHistory('/assets/apps');
|
|
|
|
this.handleHistory('/assets/apps');
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -59,9 +50,9 @@ class BaseLayout extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
handleUserLogin() {
|
|
|
|
handleUserLogin() {
|
|
|
|
if (this.state.user) {
|
|
|
|
if (this.props.state.store.user) {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<IconButton tooltip={this.state.user}>
|
|
|
|
<IconButton tooltip={this.props.state.store.user}>
|
|
|
|
<ActionAccountCircle/>
|
|
|
|
<ActionAccountCircle/>
|
|
|
|
</IconButton>
|
|
|
|
</IconButton>
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -73,10 +64,10 @@ class BaseLayout extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
handleNotification() {
|
|
|
|
handleNotification() {
|
|
|
|
if (this.state.user) {
|
|
|
|
if (this.props.state.store.user) {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Badge
|
|
|
|
<Badge
|
|
|
|
badgeContent={this.state.notifications}
|
|
|
|
badgeContent={this.props.state.store.notifications}
|
|
|
|
secondary={true}
|
|
|
|
secondary={true}
|
|
|
|
badgeStyle={{top: 12, right: 12}}>
|
|
|
|
badgeStyle={{top: 12, right: 12}}>
|
|
|
|
<IconButton tooltip="Notifications">
|
|
|
|
<IconButton tooltip="Notifications">
|
|
|
@ -134,11 +125,8 @@ class BaseLayout extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BaseLayout
|
|
|
|
BaseLayout.propTypes = {
|
|
|
|
.propTypes = {
|
|
|
|
|
|
|
|
children: PropTypes.element
|
|
|
|
children: PropTypes.element
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export
|
|
|
|
export default withRouter(BaseLayout);
|
|
|
|
default
|
|
|
|
|
|
|
|
BaseLayout;
|
|
|
|
|
|
|
|