Add to /settings/profile
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
e3d2b44bdc
commit
d5e565e766
|
@ -103,6 +103,7 @@ class EditProfile extends ImmutablePureComponent {
|
||||||
|
|
||||||
const strangerNotifications = account.getIn(['pleroma', 'notification_settings', 'block_from_strangers']);
|
const strangerNotifications = account.getIn(['pleroma', 'notification_settings', 'block_from_strangers']);
|
||||||
const acceptsEmailList = account.getIn(['pleroma', 'accepts_email_list']);
|
const acceptsEmailList = account.getIn(['pleroma', 'accepts_email_list']);
|
||||||
|
const discoverable = account.getIn(['source', 'pleroma', 'discoverable']);
|
||||||
|
|
||||||
const initialState = account.withMutations(map => {
|
const initialState = account.withMutations(map => {
|
||||||
map.merge(map.get('source'));
|
map.merge(map.get('source'));
|
||||||
|
@ -111,6 +112,7 @@ class EditProfile extends ImmutablePureComponent {
|
||||||
map.set('stranger_notifications', strangerNotifications);
|
map.set('stranger_notifications', strangerNotifications);
|
||||||
map.set('accepts_email_list', acceptsEmailList);
|
map.set('accepts_email_list', acceptsEmailList);
|
||||||
map.set('hide_network', hidesNetwork(account));
|
map.set('hide_network', hidesNetwork(account));
|
||||||
|
map.set('discoverable', discoverable);
|
||||||
unescapeParams(map, ['display_name', 'bio']);
|
unescapeParams(map, ['display_name', 'bio']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -309,6 +311,13 @@ class EditProfile extends ImmutablePureComponent {
|
||||||
checked={this.state.stranger_notifications}
|
checked={this.state.stranger_notifications}
|
||||||
onChange={this.handleCheckboxChange}
|
onChange={this.handleCheckboxChange}
|
||||||
/>
|
/>
|
||||||
|
<Checkbox
|
||||||
|
label={<FormattedMessage id='edit_profile.fields.discoverable_label' defaultMessage='Allow account discovery' />}
|
||||||
|
hint={<FormattedMessage id='edit_profile.hints.discoverable' defaultMessage='Display account in profile directory and allow indexing by external services' />}
|
||||||
|
name='discoverable'
|
||||||
|
checked={this.state.discoverable}
|
||||||
|
onChange={this.handleCheckboxChange}
|
||||||
|
/>
|
||||||
{supportsEmailList && <Checkbox
|
{supportsEmailList && <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.' />}
|
||||||
|
|
Loading…
Reference in New Issue