diff --git a/ui/src/components/listing-type-select.tsx b/ui/src/components/listing-type-select.tsx
index 1e4f99d60..f7d8cc3b2 100644
--- a/ui/src/components/listing-type-select.tsx
+++ b/ui/src/components/listing-type-select.tsx
@@ -6,6 +6,7 @@ import { i18n } from '../i18next';
interface ListingTypeSelectProps {
type_: ListingType;
+ showLocal?: boolean;
onChange?(val: ListingType): any;
}
@@ -31,6 +32,7 @@ export class ListingTypeSelect extends Component<
static getDerivedStateFromProps(props: any): ListingTypeSelectProps {
return {
type_: props.type_,
+ showLocal: props.showLocal,
};
}
@@ -53,6 +55,22 @@ export class ListingTypeSelect extends Component<
/>
{i18n.t('subscribed')}
+ {this.props.showLocal && (
+
+ )}
{i18n.t('all')}
-
);
}
diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx
index 0f4b7da02..286e84ca4 100644
--- a/ui/src/components/main.tsx
+++ b/ui/src/components/main.tsx
@@ -537,6 +537,10 @@ export class Main extends Component {
0
+ }
onChange={this.handleListingTypeChange}
/>
diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx
index e4b6c750b..d7b00ec55 100644
--- a/ui/src/components/user.tsx
+++ b/ui/src/components/user.tsx
@@ -539,6 +539,10 @@ export class User extends Component {
this.state.userSettingsForm.default_listing_type
]
}
+ showLocal={
+ this.state.siteRes.federated_instances &&
+ this.state.siteRes.federated_instances.length > 0
+ }
onChange={this.handleUserSettingsListingTypeChange}
/>