kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Feature-gate domain blocks
rodzic
407432cf39
commit
7933f83af2
|
@ -464,7 +464,7 @@ const Header: React.FC<IHeader> = ({ account }) => {
|
|||
});
|
||||
}
|
||||
|
||||
if (!account.local) {
|
||||
if (!account.local && features.domainBlocks) {
|
||||
const domain = account.fqn.split('@')[1];
|
||||
|
||||
menu.push(null);
|
||||
|
|
|
@ -53,7 +53,7 @@ const LinkFooter: React.FC = (): JSX.Element => {
|
|||
{features.followedHashtagsList && (
|
||||
<FooterLink to='/followed_tags'><FormattedMessage id='navigation_bar.followed_tags' defaultMessage='Followed hashtags' /></FooterLink>
|
||||
)}
|
||||
{features.federating && (
|
||||
{features.domainBlocks && (
|
||||
<FooterLink to='/domain_blocks'><FormattedMessage id='navigation_bar.domain_blocks' defaultMessage='Domain blocks' /></FooterLink>
|
||||
)}
|
||||
{account.admin && (
|
||||
|
|
|
@ -268,7 +268,7 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
|
|||
|
||||
<WrappedRoute path='/follow_requests' page={DefaultPage} component={FollowRequests} 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.domainBlocks && <WrappedRoute path='/domain_blocks' page={DefaultPage} component={DomainBlocks} 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/:id' page={DefaultPage} component={EditFilter} content={children} />}
|
||||
|
|
|
@ -400,6 +400,17 @@ const getInstanceFeatures = (instance: Instance) => {
|
|||
*/
|
||||
dislikes: v.software === FRIENDICA && gte(v.version, '2023.3.0'),
|
||||
|
||||
/**
|
||||
* Ability to block users by domain.
|
||||
* @see GET /api/v1/domain_blocks
|
||||
* @see POST /api/v1/domain_blocks
|
||||
* @see DELETE /api/v1/domain_blocks
|
||||
*/
|
||||
domainBlocks: federation.enabled && any([
|
||||
v.software === MASTODON && gte(v.compatVersion, '1.4.0'),
|
||||
v.software === PLEROMA,
|
||||
]),
|
||||
|
||||
/**
|
||||
* Allow to register on a given domain
|
||||
* @see GET /api/v1/pleroma/admin/domains
|
||||
|
|
Ładowanie…
Reference in New Issue