Merge branch 'block-feature' into 'main'
Feature-gate blocks See merge request soapbox-pub/soapbox!3015
This commit is contained in:
commit
1f665defb6
|
@ -266,12 +266,14 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
|
||||||
|
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
|
{features.blocks && (
|
||||||
<SidebarLink
|
<SidebarLink
|
||||||
to='/blocks'
|
to='/blocks'
|
||||||
icon={require('@tabler/icons/outline/ban.svg')}
|
icon={require('@tabler/icons/outline/ban.svg')}
|
||||||
text={intl.formatMessage(messages.blocks)}
|
text={intl.formatMessage(messages.blocks)}
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<SidebarLink
|
<SidebarLink
|
||||||
to='/mutes'
|
to='/mutes'
|
||||||
|
|
|
@ -43,7 +43,9 @@ const LinkFooter: React.FC = (): JSX.Element => {
|
||||||
{features.profileDirectory && (
|
{features.profileDirectory && (
|
||||||
<FooterLink to='/directory'><FormattedMessage id='navigation_bar.profile_directory' defaultMessage='Profile directory' /></FooterLink>
|
<FooterLink to='/directory'><FormattedMessage id='navigation_bar.profile_directory' defaultMessage='Profile directory' /></FooterLink>
|
||||||
)}
|
)}
|
||||||
|
{features.blocks && (
|
||||||
<FooterLink to='/blocks'><FormattedMessage id='navigation_bar.blocks' defaultMessage='Blocks' /></FooterLink>
|
<FooterLink to='/blocks'><FormattedMessage id='navigation_bar.blocks' defaultMessage='Blocks' /></FooterLink>
|
||||||
|
)}
|
||||||
<FooterLink to='/mutes'><FormattedMessage id='navigation_bar.mutes' defaultMessage='Mutes' /></FooterLink>
|
<FooterLink to='/mutes'><FormattedMessage id='navigation_bar.mutes' defaultMessage='Mutes' /></FooterLink>
|
||||||
{(features.filters || features.filtersV2) && (
|
{(features.filters || features.filtersV2) && (
|
||||||
<FooterLink to='/filters'><FormattedMessage id='navigation_bar.filters' defaultMessage='Filters' /></FooterLink>
|
<FooterLink to='/filters'><FormattedMessage id='navigation_bar.filters' defaultMessage='Filters' /></FooterLink>
|
||||||
|
|
|
@ -268,7 +268,7 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
|
||||||
{features.chats && <WrappedRoute path='/chats/:chatId' page={ChatsPage} component={ChatIndex} content={children} />}
|
{features.chats && <WrappedRoute path='/chats/:chatId' page={ChatsPage} component={ChatIndex} content={children} />}
|
||||||
|
|
||||||
<WrappedRoute path='/follow_requests' page={DefaultPage} component={FollowRequests} content={children} />
|
<WrappedRoute path='/follow_requests' page={DefaultPage} component={FollowRequests} content={children} />
|
||||||
<WrappedRoute path='/blocks' page={DefaultPage} component={Blocks} content={children} />
|
{features.blocks && <WrappedRoute path='/blocks' page={DefaultPage} component={Blocks} content={children} />}
|
||||||
{features.federating && <WrappedRoute path='/domain_blocks' page={DefaultPage} component={DomainBlocks} content={children} />}
|
{features.federating && <WrappedRoute path='/domain_blocks' page={DefaultPage} component={DomainBlocks} content={children} />}
|
||||||
<WrappedRoute path='/mutes' page={DefaultPage} component={Mutes} content={children} />
|
<WrappedRoute path='/mutes' page={DefaultPage} component={Mutes} content={children} />
|
||||||
{(features.filters || features.filtersV2) && <WrappedRoute path='/filters/new' page={DefaultPage} component={EditFilter} content={children} />}
|
{(features.filters || features.filtersV2) && <WrappedRoute path='/filters/new' page={DefaultPage} component={EditFilter} content={children} />}
|
||||||
|
|
|
@ -251,6 +251,14 @@ const getInstanceFeatures = (instance: Instance) => {
|
||||||
/** Whether people who blocked you are visible through the API. */
|
/** Whether people who blocked you are visible through the API. */
|
||||||
blockersVisible: features.includes('blockers_visible'),
|
blockersVisible: features.includes('blockers_visible'),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ability to block users.
|
||||||
|
* @see POST /api/v1/accounts/:id/block
|
||||||
|
* @see POST /api/v1/accounts/:id/unblock
|
||||||
|
* @see GET /api/v1/blocks
|
||||||
|
*/
|
||||||
|
blocks: v.software !== DITTO,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Can group bookmarks in folders.
|
* Can group bookmarks in folders.
|
||||||
* @see GET /api/v1/pleroma/bookmark_folders
|
* @see GET /api/v1/pleroma/bookmark_folders
|
||||||
|
|
Loading…
Reference in New Issue