kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Admin: placeholding "Awaiting Approval" link
rodzic
248a33e79a
commit
62a4338cf3
|
@ -1,12 +1,24 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import Icon from 'soapbox/components/icon';
|
import Icon from 'soapbox/components/icon';
|
||||||
import { NavLink } from 'react-router-dom';
|
import { NavLink } from 'react-router-dom';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
export default
|
const mapStateToProps = (state, props) => ({
|
||||||
|
instance: state.get('instance'),
|
||||||
|
});
|
||||||
|
|
||||||
|
export default @connect(mapStateToProps)
|
||||||
class AdminNav extends React.PureComponent {
|
class AdminNav extends React.PureComponent {
|
||||||
|
|
||||||
|
static propTypes = {
|
||||||
|
instance: ImmutablePropTypes.map.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { instance } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='wtf-panel promo-panel'>
|
<div className='wtf-panel promo-panel'>
|
||||||
<div className='promo-panel__container'>
|
<div className='promo-panel__container'>
|
||||||
|
@ -14,6 +26,13 @@ class AdminNav extends React.PureComponent {
|
||||||
<Icon id='tachometer' className='promo-panel-item__icon' fixedWidth />
|
<Icon id='tachometer' className='promo-panel-item__icon' fixedWidth />
|
||||||
<FormattedMessage id='admin_nav.dashboard' defaultMessage='Dashboard' />
|
<FormattedMessage id='admin_nav.dashboard' defaultMessage='Dashboard' />
|
||||||
</NavLink>
|
</NavLink>
|
||||||
|
{/* TODO: Make this actually useful */}
|
||||||
|
{instance.get('approval_required') && (
|
||||||
|
<a className='promo-panel-item' href='/pleroma/admin/#/users/index' target='_blank'>
|
||||||
|
<Icon id='user' className='promo-panel-item__icon' fixedWidth />
|
||||||
|
<FormattedMessage id='admin_nav.awaiting_approval' defaultMessage='Awaiting Approval' />
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
<a className='promo-panel-item' href='/pleroma/admin/#/reports/index' target='_blank'>
|
<a className='promo-panel-item' href='/pleroma/admin/#/reports/index' target='_blank'>
|
||||||
<Icon id='gavel' className='promo-panel-item__icon' fixedWidth />
|
<Icon id='gavel' className='promo-panel-item__icon' fixedWidth />
|
||||||
<FormattedMessage id='admin_nav.reports' defaultMessage='Reports' />
|
<FormattedMessage id='admin_nav.reports' defaultMessage='Reports' />
|
||||||
|
|
|
@ -63,6 +63,7 @@ class Dashboard extends ImmutablePureComponent {
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
{/* TODO: Awaiting approval users count */}
|
||||||
</div>
|
</div>
|
||||||
<div className='dashwidgets'>
|
<div className='dashwidgets'>
|
||||||
<div class='dashwidget'>
|
<div class='dashwidget'>
|
||||||
|
|
Ładowanie…
Reference in New Issue