Merge branch 'profile-directory' into 'develop'

Profile directory

See merge request soapbox-pub/soapbox-fe!931
strip-front-mentions
marcin mikołajczak 2021-12-26 23:01:59 +00:00
commit 2c89008403
3 zmienionych plików z 11 dodań i 2 usunięć

Wyświetl plik

@ -255,7 +255,7 @@ class SidebarMenu extends ImmutablePureComponent {
<span className='sidebar-menu-item__title'>{intl.formatMessage(messages.bookmarks)}</span>
</NavLink>}
{features.profileDirectory && <NavLink className='sidebar-menu-item' to='/directory' onClick={this.handleClose}>
<Icon id='address-book' />
<Icon src={require('@tabler/icons/icons/friends.svg')} />
<span className='sidebar-menu-item__title'>{intl.formatMessage(messages.profileDirectory)}</span>
</NavLink>}
</div>

Wyświetl plik

@ -103,6 +103,7 @@ class EditProfile extends ImmutablePureComponent {
const strangerNotifications = account.getIn(['pleroma', 'notification_settings', 'block_from_strangers']);
const acceptsEmailList = account.getIn(['pleroma', 'accepts_email_list']);
const discoverable = account.getIn(['source', 'pleroma', 'discoverable']);
const initialState = account.withMutations(map => {
map.merge(map.get('source'));
@ -111,6 +112,7 @@ class EditProfile extends ImmutablePureComponent {
map.set('stranger_notifications', strangerNotifications);
map.set('accepts_email_list', acceptsEmailList);
map.set('hide_network', hidesNetwork(account));
map.set('discoverable', discoverable);
unescapeParams(map, ['display_name', 'bio']);
});
@ -309,6 +311,13 @@ class EditProfile extends ImmutablePureComponent {
checked={this.state.stranger_notifications}
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
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.' />}

Wyświetl plik

@ -104,7 +104,7 @@
text-overflow: ellipsis;
}
span {
span:not(.verified-icon) {
display: block;
font-size: 14px;
color: var(--primary-text-color--faint);