mirror of
https://github.com/opensupports/opensupports.git
synced 2025-04-08 18:35:06 +02:00
Merge 444a2032d86f9dd2cf14d72c557fc147a0a3b672 into 20720ca4f9175373ee8075fc18ce823707350534
This commit is contained in:
commit
295fd53cca
@ -1,16 +1,20 @@
|
||||
import React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import classNames from 'classnames';
|
||||
import i18n from 'lib-app/i18n';
|
||||
|
||||
class MainLayoutFooter extends React.Component {
|
||||
|
||||
render() {
|
||||
const {adminPanelOpened, userLogged} = this.props
|
||||
|
||||
return (
|
||||
<div className={this.getClass()}>
|
||||
{this.props.adminPanelOpened ? this.renderExtraLinks() : null}
|
||||
{adminPanelOpened ? this.renderExtraLinks() : null}
|
||||
{!userLogged ? this.renderAdminAccess() : null}
|
||||
<div className="main-layout-footer__powered">
|
||||
Powered by <a className="main-layout-footer__os-link" href="http://www.opensupports.com/" target="_blank">OpenSupports</a>
|
||||
<span> {this.props.adminPanelOpened ? `v${opensupports_version}` : null}</span>
|
||||
<span> {adminPanelOpened ? `v${opensupports_version}` : null}</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@ -24,6 +28,14 @@ class MainLayoutFooter extends React.Component {
|
||||
);
|
||||
}
|
||||
|
||||
renderAdminAccess() {
|
||||
return (
|
||||
<div className="main-layout-footer__admin-access">
|
||||
<a className="main-layout-footer__admin-access-link" href="/admin">{i18n('ADMIN_ACCESS')}</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
getClass() {
|
||||
let classes = {
|
||||
'main-layout-footer': true,
|
||||
@ -36,6 +48,7 @@ class MainLayoutFooter extends React.Component {
|
||||
|
||||
export default connect((store) => {
|
||||
return {
|
||||
adminPanelOpened: store.session.staff
|
||||
adminPanelOpened: store.session.staff,
|
||||
userLogged: store.session.logged
|
||||
};
|
||||
})(MainLayoutFooter);
|
||||
|
@ -27,6 +27,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
&__admin-access {
|
||||
padding: 8px 30px 0 0;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
|
||||
&-link {
|
||||
text-decoration: none;
|
||||
color: $secondary-red;
|
||||
&:hover,
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__os-link {
|
||||
color: $secondary-red;
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
@import "../../scss/vars";
|
||||
|
||||
|
||||
.main-layout {
|
||||
margin: 0 auto;
|
||||
background-color: $grey;
|
||||
@ -28,4 +27,10 @@
|
||||
padding: 20px 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
@ -302,6 +302,7 @@ export default {
|
||||
'ADMIN_EMAIL': 'Admin account email',
|
||||
'ADMIN_PASSWORD': 'Admin account password',
|
||||
'ADMIN_PASSWORD_DESCRIPTION': 'Please remember this password. It is needed for accessing the admin panel. You can change it later.',
|
||||
'ADMIN_ACCESS': 'Admin Access',
|
||||
'INSTALLATION_COMPLETED_TITLE': 'Installation completed',
|
||||
'INSTALLATION_COMPLETED_DESCRIPTION': 'The installation of OpenSupports is completed. Redirecting to admin panel...',
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user