Ivan - Add #37 changes: redirect to admin when install, add link to documentation in admin panel
This commit is contained in:
parent
fdbcbd62c4
commit
d14aeaeabc
|
@ -108,7 +108,7 @@ class App extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(props.config.installedDone && props.config.installed && _.includes(props.location.pathname, '/install')) {
|
if(props.config.installedDone && props.config.installed && _.includes(props.location.pathname, '/install')) {
|
||||||
history.push('/');
|
history.push('/admin');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isProd && _.includes(props.location.pathname, '/components-demo')) {
|
if(isProd && _.includes(props.location.pathname, '/components-demo')) {
|
||||||
|
|
|
@ -1,16 +1,42 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import {connect} from 'react-redux';
|
||||||
|
import classNames from 'classnames';
|
||||||
|
|
||||||
class MainLayoutFooter extends React.Component {
|
class MainLayoutFooter extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="main-layout-footer">
|
<div className={this.getClass()}>
|
||||||
<div className="main-layout-footer--powered">
|
{(this.props.adminPanelOpened) ? this.renderExtraLinks() : null}
|
||||||
Powered by <a className="main-layout-footer--os-link" href="http://www.opensupports.com/" target="_blank">OpenSupports</a>
|
<div className="main-layout-footer__powered">
|
||||||
|
Powered by <a className="main-layout-footer__os-link" href="http://www.opensupports.com/" target="_blank">OpenSupports</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderExtraLinks() {
|
||||||
|
return (
|
||||||
|
<div className="main-layout-footer__extra-links">
|
||||||
|
<a className="main-layout-footer__extra-link" href="http://www.opensupports.com/documentation/" target="_blank">Documentation</a>
|
||||||
|
<span> | </span>
|
||||||
|
<a className="main-layout-footer__extra-link" href="http://www.opensupports.com/download/#donation" target="_blank">Donate</a>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
getClass() {
|
||||||
|
let classes = {
|
||||||
|
'main-layout-footer': true,
|
||||||
|
'main-layout-footer_admin-panel': this.props.adminPanelOpened
|
||||||
|
};
|
||||||
|
|
||||||
|
return classNames(classes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MainLayoutFooter;
|
export default connect((store) => {
|
||||||
|
return {
|
||||||
|
adminPanelOpened: store.session.staff
|
||||||
|
};
|
||||||
|
})(MainLayoutFooter);
|
||||||
|
|
|
@ -6,14 +6,35 @@
|
||||||
height: 32px;
|
height: 32px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
&--powered {
|
&__powered,
|
||||||
|
&__extra-links {
|
||||||
|
float: right;
|
||||||
|
padding-right: 20px;
|
||||||
color: white;
|
color: white;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-top: 7px;
|
padding-top: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--os-link {
|
&__extra-link,
|
||||||
color: $secondary-red;
|
&__os-link {
|
||||||
|
color: $secondary-blue;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
text-decoration: none;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__os-link {
|
||||||
|
color: $secondary-red;
|
||||||
|
}
|
||||||
|
|
||||||
|
&_admin-panel {
|
||||||
|
.main-layout-footer__powered {
|
||||||
|
float: left;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue