Merge remote-tracking branch 'origin/develop' into federation-restrictions-improvements
This commit is contained in:
commit
3fbb1dd164
3 changed files with 11 additions and 5 deletions
|
@ -5,13 +5,16 @@ import WhoToFollowPanel from 'soapbox/features/ui/components/who_to_follow_panel
|
||||||
import TrendsPanel from 'soapbox/features/ui/components/trends_panel';
|
import TrendsPanel from 'soapbox/features/ui/components/trends_panel';
|
||||||
import PromoPanel from 'soapbox/features/ui/components/promo_panel';
|
import PromoPanel from 'soapbox/features/ui/components/promo_panel';
|
||||||
import FeaturesPanel from 'soapbox/features/ui/components/features_panel';
|
import FeaturesPanel from 'soapbox/features/ui/components/features_panel';
|
||||||
|
import SignUpPanel from 'soapbox/features/ui/components/sign_up_panel';
|
||||||
import LinkFooter from 'soapbox/features/ui/components/link_footer';
|
import LinkFooter from 'soapbox/features/ui/components/link_footer';
|
||||||
import { getFeatures } from 'soapbox/utils/features';
|
import { getFeatures } from 'soapbox/utils/features';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = state => {
|
||||||
|
const me = state.get('me');
|
||||||
const features = getFeatures(state.get('instance'));
|
const features = getFeatures(state.get('instance'));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
me,
|
||||||
showTrendsPanel: features.trends,
|
showTrendsPanel: features.trends,
|
||||||
showWhoToFollowPanel: features.suggestions,
|
showWhoToFollowPanel: features.suggestions,
|
||||||
};
|
};
|
||||||
|
@ -21,7 +24,7 @@ export default @connect(mapStateToProps)
|
||||||
class DefaultPage extends ImmutablePureComponent {
|
class DefaultPage extends ImmutablePureComponent {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { children, showTrendsPanel, showWhoToFollowPanel } = this.props;
|
const { me, children, showTrendsPanel, showWhoToFollowPanel } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='page'>
|
<div className='page'>
|
||||||
|
@ -42,7 +45,7 @@ class DefaultPage extends ImmutablePureComponent {
|
||||||
<div className='columns-area__panels__pane__inner'>
|
<div className='columns-area__panels__pane__inner'>
|
||||||
{showTrendsPanel && <TrendsPanel limit={3} key='trends-panel' />}
|
{showTrendsPanel && <TrendsPanel limit={3} key='trends-panel' />}
|
||||||
{showWhoToFollowPanel && <WhoToFollowPanel limit={5} key='wtf-panel' />}
|
{showWhoToFollowPanel && <WhoToFollowPanel limit={5} key='wtf-panel' />}
|
||||||
<FeaturesPanel key='features-panel' />
|
{me ? <FeaturesPanel key='features-panel' /> : <SignUpPanel key='sign-up-panel' />}
|
||||||
<PromoPanel key='promo-panel' />
|
<PromoPanel key='promo-panel' />
|
||||||
<LinkFooter key='link-footer' />
|
<LinkFooter key='link-footer' />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,6 +11,7 @@ import FundingPanel from 'soapbox/features/ui/components/funding_panel';
|
||||||
import CryptoDonatePanel from 'soapbox/features/crypto_donate/components/crypto_donate_panel';
|
import CryptoDonatePanel from 'soapbox/features/crypto_donate/components/crypto_donate_panel';
|
||||||
// import GroupSidebarPanel from '../features/groups/sidebar_panel';
|
// import GroupSidebarPanel from '../features/groups/sidebar_panel';
|
||||||
import FeaturesPanel from 'soapbox/features/ui/components/features_panel';
|
import FeaturesPanel from 'soapbox/features/ui/components/features_panel';
|
||||||
|
import SignUpPanel from 'soapbox/features/ui/components/sign_up_panel';
|
||||||
import LinkFooter from 'soapbox/features/ui/components/link_footer';
|
import LinkFooter from 'soapbox/features/ui/components/link_footer';
|
||||||
import { getSoapboxConfig } from 'soapbox/actions/soapbox';
|
import { getSoapboxConfig } from 'soapbox/actions/soapbox';
|
||||||
import { getFeatures } from 'soapbox/utils/features';
|
import { getFeatures } from 'soapbox/utils/features';
|
||||||
|
@ -79,7 +80,7 @@ class HomePage extends ImmutablePureComponent {
|
||||||
<div className='columns-area__panels__pane__inner'>
|
<div className='columns-area__panels__pane__inner'>
|
||||||
{showTrendsPanel && <TrendsPanel limit={3} key='trends-panel' />}
|
{showTrendsPanel && <TrendsPanel limit={3} key='trends-panel' />}
|
||||||
{showWhoToFollowPanel && <WhoToFollowPanel limit={5} key='wtf-panel' />}
|
{showWhoToFollowPanel && <WhoToFollowPanel limit={5} key='wtf-panel' />}
|
||||||
<FeaturesPanel key='features-panel' />
|
{me ? <FeaturesPanel key='features-panel' /> : <SignUpPanel key='sign-up-panel' />}
|
||||||
<PromoPanel key='promo-panel' />
|
<PromoPanel key='promo-panel' />
|
||||||
<LinkFooter key='link-footer' />
|
<LinkFooter key='link-footer' />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,9 +11,11 @@ import InstanceInfoPanel from 'soapbox/features/ui/components/instance_info_pane
|
||||||
import { federationRestrictionsDisclosed } from 'soapbox/utils/state';
|
import { federationRestrictionsDisclosed } from 'soapbox/utils/state';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = state => {
|
||||||
|
const me = state.get('me');
|
||||||
const features = getFeatures(state.get('instance'));
|
const features = getFeatures(state.get('instance'));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
me,
|
||||||
showTrendsPanel: features.trends,
|
showTrendsPanel: features.trends,
|
||||||
showWhoToFollowPanel: features.suggestions,
|
showWhoToFollowPanel: features.suggestions,
|
||||||
disclosed: federationRestrictionsDisclosed(state),
|
disclosed: federationRestrictionsDisclosed(state),
|
||||||
|
@ -24,7 +26,7 @@ export default @connect(mapStateToProps)
|
||||||
class RemoteInstancePage extends ImmutablePureComponent {
|
class RemoteInstancePage extends ImmutablePureComponent {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { children, showTrendsPanel, showWhoToFollowPanel, params: { instance: host }, disclosed } = this.props;
|
const { me, children, showTrendsPanel, showWhoToFollowPanel, params: { instance: host }, disclosed } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='page'>
|
<div className='page'>
|
||||||
|
@ -47,7 +49,7 @@ class RemoteInstancePage extends ImmutablePureComponent {
|
||||||
<div className='columns-area__panels__pane__inner'>
|
<div className='columns-area__panels__pane__inner'>
|
||||||
{showTrendsPanel && <TrendsPanel limit={3} key='trends-panel' />}
|
{showTrendsPanel && <TrendsPanel limit={3} key='trends-panel' />}
|
||||||
{showWhoToFollowPanel && <WhoToFollowPanel limit={5} key='wtf-panel' />}
|
{showWhoToFollowPanel && <WhoToFollowPanel limit={5} key='wtf-panel' />}
|
||||||
<FeaturesPanel key='features-panel' />
|
{me && <FeaturesPanel key='features-panel' />}
|
||||||
<PromoPanel key='promo-panel' />
|
<PromoPanel key='promo-panel' />
|
||||||
<LinkFooter key='link-footer' />
|
<LinkFooter key='link-footer' />
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue