Support Pleroma invites Closes #270 See merge request soapbox-pub/soapbox-fe!779merge-requests/780/head
commit
8895fdf46e
@ -0,0 +1,48 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
import RegistrationForm from 'soapbox/features/auth_login/components/registration_form';
|
||||||
|
|
||||||
|
const mapStateToProps = state => {
|
||||||
|
return {
|
||||||
|
siteTitle: state.getIn(['instance', 'title']),
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default @connect(mapStateToProps)
|
||||||
|
class RegisterInvite extends React.Component {
|
||||||
|
|
||||||
|
static propTypes = {
|
||||||
|
params: PropTypes.object.isRequired,
|
||||||
|
siteTitle: PropTypes.string.isRequired,
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { siteTitle, params } = this.props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className='register-invite'>
|
||||||
|
<div className='register-invite__header'>
|
||||||
|
<h1 className='register-invite__title'>
|
||||||
|
<FormattedMessage
|
||||||
|
id='register_invite.title'
|
||||||
|
defaultMessage="You've been invited to join {siteTitle}!"
|
||||||
|
values={{ siteTitle }}
|
||||||
|
/>
|
||||||
|
</h1>
|
||||||
|
<p className='register-invite__lead'>
|
||||||
|
<FormattedMessage
|
||||||
|
id='register_invite.lead'
|
||||||
|
defaultMessage='Complete the form below to create an account.'
|
||||||
|
/>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div className='register-invite__form'>
|
||||||
|
<RegistrationForm inviteToken={params.token} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
.register-invite {
|
||||||
|
margin: 10px 0;
|
||||||
|
|
||||||
|
&__header {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__title {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 25px;
|
||||||
|
line-height: normal;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__form {
|
||||||
|
.simple_form {
|
||||||
|
input[type=text],
|
||||||
|
input[type=number],
|
||||||
|
input[type=email],
|
||||||
|
input[type=password],
|
||||||
|
textarea {
|
||||||
|
background-color: var(--foreground-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue