|
|
@ -56,12 +56,13 @@ const makeMapStateToProps = () => {
|
|
|
|
const me = state.get('me');
|
|
|
|
const me = state.get('me');
|
|
|
|
const account = getAccount(state, me);
|
|
|
|
const account = getAccount(state, me);
|
|
|
|
const soapbox = getSoapboxConfig(state);
|
|
|
|
const soapbox = getSoapboxConfig(state);
|
|
|
|
|
|
|
|
const features = getFeatures(state.instance);
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
account,
|
|
|
|
account,
|
|
|
|
|
|
|
|
features,
|
|
|
|
maxFields: state.getIn(['instance', 'pleroma', 'metadata', 'fields_limits', 'max_fields'], 4),
|
|
|
|
maxFields: state.getIn(['instance', 'pleroma', 'metadata', 'fields_limits', 'max_fields'], 4),
|
|
|
|
verifiedCanEditName: soapbox.get('verifiedCanEditName'),
|
|
|
|
verifiedCanEditName: soapbox.get('verifiedCanEditName'),
|
|
|
|
supportsEmailList: getFeatures(state.get('instance')).emailList,
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -242,7 +243,7 @@ class EditProfile extends ImmutablePureComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
const { intl, account, verifiedCanEditName, supportsEmailList /* maxFields */ } = this.props;
|
|
|
|
const { intl, account, verifiedCanEditName, features /* maxFields */ } = this.props;
|
|
|
|
const verified = account.get('verified');
|
|
|
|
const verified = account.get('verified');
|
|
|
|
const canEditName = verifiedCanEditName || !verified;
|
|
|
|
const canEditName = verifiedCanEditName || !verified;
|
|
|
|
|
|
|
|
|
|
|
@ -262,6 +263,7 @@ class EditProfile extends ImmutablePureComponent {
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
</FormGroup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{features.accountLocation && (
|
|
|
|
<FormGroup
|
|
|
|
<FormGroup
|
|
|
|
labelText={<FormattedMessage id='edit_profile.fields.location_label' defaultMessage='Location' />}
|
|
|
|
labelText={<FormattedMessage id='edit_profile.fields.location_label' defaultMessage='Location' />}
|
|
|
|
>
|
|
|
|
>
|
|
|
@ -272,7 +274,9 @@ class EditProfile extends ImmutablePureComponent {
|
|
|
|
placeholder={intl.formatMessage(messages.locationPlaceholder)}
|
|
|
|
placeholder={intl.formatMessage(messages.locationPlaceholder)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
</FormGroup>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{features.accountWebsite && (
|
|
|
|
<FormGroup
|
|
|
|
<FormGroup
|
|
|
|
labelText={<FormattedMessage id='edit_profile.fields.website_label' defaultMessage='Website' />}
|
|
|
|
labelText={<FormattedMessage id='edit_profile.fields.website_label' defaultMessage='Website' />}
|
|
|
|
>
|
|
|
|
>
|
|
|
@ -283,6 +287,7 @@ class EditProfile extends ImmutablePureComponent {
|
|
|
|
placeholder={intl.formatMessage(messages.websitePlaceholder)}
|
|
|
|
placeholder={intl.formatMessage(messages.websitePlaceholder)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
</FormGroup>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
|
|
<FormGroup
|
|
|
|
<FormGroup
|
|
|
|
labelText={<FormattedMessage id='edit_profile.fields.bio_label' defaultMessage='Bio' />}
|
|
|
|
labelText={<FormattedMessage id='edit_profile.fields.bio_label' defaultMessage='Bio' />}
|
|
|
@ -351,13 +356,15 @@ class EditProfile extends ImmutablePureComponent {
|
|
|
|
checked={this.state.discoverable}
|
|
|
|
checked={this.state.discoverable}
|
|
|
|
onChange={this.handleCheckboxChange}
|
|
|
|
onChange={this.handleCheckboxChange}
|
|
|
|
/>*/}
|
|
|
|
/>*/}
|
|
|
|
{supportsEmailList && <Checkbox
|
|
|
|
{features.emailList && (
|
|
|
|
|
|
|
|
<Checkbox
|
|
|
|
label={<FormattedMessage id='edit_profile.fields.accepts_email_list_label' defaultMessage='Subscribe to newsletter' />}
|
|
|
|
label={<FormattedMessage id='edit_profile.fields.accepts_email_list_label' defaultMessage='Subscribe to newsletter' />}
|
|
|
|
hint={<FormattedMessage id='edit_profile.hints.accepts_email_list' defaultMessage='Opt-in to news and marketing updates.' />}
|
|
|
|
hint={<FormattedMessage id='edit_profile.hints.accepts_email_list' defaultMessage='Opt-in to news and marketing updates.' />}
|
|
|
|
name='accepts_email_list'
|
|
|
|
name='accepts_email_list'
|
|
|
|
checked={this.state.accepts_email_list}
|
|
|
|
checked={this.state.accepts_email_list}
|
|
|
|
onChange={this.handleCheckboxChange}
|
|
|
|
onChange={this.handleCheckboxChange}
|
|
|
|
/>}
|
|
|
|
/>
|
|
|
|
|
|
|
|
)}
|
|
|
|
{/* </FieldsGroup> */}
|
|
|
|
{/* </FieldsGroup> */}
|
|
|
|
{/*<FieldsGroup>
|
|
|
|
{/*<FieldsGroup>
|
|
|
|
<div className='fields-row__column fields-group'>
|
|
|
|
<div className='fields-row__column fields-group'>
|
|
|
|