diff --git a/client/src/app/App.js b/client/src/app/App.js index da4777d0..4faa9121 100644 --- a/client/src/app/App.js +++ b/client/src/app/App.js @@ -108,7 +108,7 @@ class App extends React.Component { } 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')) { diff --git a/client/src/app/main/main-layout-footer.js b/client/src/app/main/main-layout-footer.js index 8c9e6edd..a6b4560b 100644 --- a/client/src/app/main/main-layout-footer.js +++ b/client/src/app/main/main-layout-footer.js @@ -1,16 +1,42 @@ import React from 'react'; +import {connect} from 'react-redux'; +import classNames from 'classnames'; class MainLayoutFooter extends React.Component { render() { return ( -
-
- Powered by OpenSupports +
+ {(this.props.adminPanelOpened) ? this.renderExtraLinks() : null} +
+ Powered by OpenSupports
); } + + renderExtraLinks() { + return ( +
+ Documentation + | + Donate +
+ ); + } + + getClass() { + let classes = { + 'main-layout-footer': true, + 'main-layout-footer_admin-panel': this.props.adminPanelOpened + }; + + return classNames(classes); + } } -export default MainLayoutFooter; \ No newline at end of file +export default connect((store) => { + return { + adminPanelOpened: store.session.staff + }; +})(MainLayoutFooter); diff --git a/client/src/app/main/main-layout-footer.scss b/client/src/app/main/main-layout-footer.scss index 7815b24f..2c7d1cc4 100644 --- a/client/src/app/main/main-layout-footer.scss +++ b/client/src/app/main/main-layout-footer.scss @@ -6,14 +6,35 @@ height: 32px; width: 100%; - &--powered { + &__powered, + &__extra-links { + float: right; + padding-right: 20px; color: white; display: inline-block; - padding-top: 7px; + padding-top: 6px; } - &--os-link { - color: $secondary-red; + &__extra-link, + &__os-link { + color: $secondary-blue; 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; + } } } \ No newline at end of file