diff --git a/app/soapbox/features/federation_restrictions/index.js b/app/soapbox/features/federation_restrictions/index.js
new file mode 100644
index 000000000..4056da630
--- /dev/null
+++ b/app/soapbox/features/federation_restrictions/index.js
@@ -0,0 +1,50 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import { defineMessages, injectIntl } from 'react-intl';
+import PropTypes from 'prop-types';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import Column from '../ui/components/column';
+import { createSelector } from 'reselect';
+import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet } from 'immutable';
+
+const getHosts = createSelector([
+ state => state.getIn(['instance', 'pleroma', 'metadata', 'federation', 'mrf_simple'], ImmutableMap()),
+], (simplePolicy) => {
+ return simplePolicy
+ .deleteAll(['accept', 'reject_deletes', 'report_removal'])
+ .reduce((acc, hosts) => acc.union(hosts), ImmutableOrderedSet())
+ .sort();
+});
+
+const messages = defineMessages({
+ heading: { id: 'column.federation_restrictions', defaultMessage: 'Federation Restrictions' },
+});
+
+const mapStateToProps = state => ({
+ siteTitle: state.getIn(['instance', 'title']),
+ hosts: getHosts(state),
+});
+
+export default @connect(mapStateToProps)
+@injectIntl
+class FederationRestrictions extends ImmutablePureComponent {
+
+ static propTypes = {
+ intl: PropTypes.object.isRequired,
+ };
+
+ render() {
+ const { intl, hosts } = this.props;
+
+ return (
+
+
+
+ {hosts.map(host => - {host}
)}
+
+
+
+ );
+ }
+
+}
diff --git a/app/soapbox/features/ui/index.js b/app/soapbox/features/ui/index.js
index fe6745b69..49d58aca7 100644
--- a/app/soapbox/features/ui/index.js
+++ b/app/soapbox/features/ui/index.js
@@ -97,6 +97,7 @@ import {
CryptoDonate,
ScheduledStatuses,
UserIndex,
+ FederationRestrictions,
} from './util/async-components';
// Dummy import, to make sure that ends up in the application bundle.
@@ -272,6 +273,7 @@ class SwitchingColumnsArea extends React.PureComponent {
+
diff --git a/app/soapbox/features/ui/util/async-components.js b/app/soapbox/features/ui/util/async-components.js
index c1bb39301..c1b34b608 100644
--- a/app/soapbox/features/ui/util/async-components.js
+++ b/app/soapbox/features/ui/util/async-components.js
@@ -245,3 +245,7 @@ export function ScheduledStatuses() {
export function UserIndex() {
return import(/* webpackChunkName: "features/admin/user_index" */'../../admin/user_index');
}
+
+export function FederationRestrictions() {
+ return import(/* webpackChunkName: "features/federation_restrictions" */'../../federation_restrictions');
+}