kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Always display FeaturesPanel at the top of the column
rodzic
9b822a6c12
commit
5e30423b5c
|
@ -43,9 +43,9 @@ class DefaultPage extends ImmutablePureComponent {
|
||||||
|
|
||||||
<div className='columns-area__panels__pane columns-area__panels__pane--right'>
|
<div className='columns-area__panels__pane columns-area__panels__pane--right'>
|
||||||
<div className='columns-area__panels__pane__inner'>
|
<div className='columns-area__panels__pane__inner'>
|
||||||
|
{me ? <FeaturesPanel key='features-panel' /> : <SignUpPanel key='sign-up-panel' />}
|
||||||
{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' />}
|
||||||
{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>
|
||||||
|
|
|
@ -86,9 +86,9 @@ class HomePage extends ImmutablePureComponent {
|
||||||
|
|
||||||
<div className='columns-area__panels__pane columns-area__panels__pane--right'>
|
<div className='columns-area__panels__pane columns-area__panels__pane--right'>
|
||||||
<div className='columns-area__panels__pane__inner'>
|
<div className='columns-area__panels__pane__inner'>
|
||||||
|
{me ? <FeaturesPanel key='features-panel' /> : <SignUpPanel key='sign-up-panel' />}
|
||||||
{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' />}
|
||||||
{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>
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||||
import WhoToFollowPanel from 'soapbox/features/ui/components/who_to_follow_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 LinkFooter from 'soapbox/features/ui/components/link_footer';
|
import LinkFooter from 'soapbox/features/ui/components/link_footer';
|
||||||
import { getFeatures } from 'soapbox/utils/features';
|
|
||||||
import InstanceInfoPanel from 'soapbox/features/ui/components/instance_info_panel';
|
import InstanceInfoPanel from 'soapbox/features/ui/components/instance_info_panel';
|
||||||
import InstanceModerationPanel from 'soapbox/features/ui/components/instance_moderation_panel';
|
import InstanceModerationPanel from 'soapbox/features/ui/components/instance_moderation_panel';
|
||||||
import { federationRestrictionsDisclosed } from 'soapbox/utils/state';
|
import { federationRestrictionsDisclosed } from 'soapbox/utils/state';
|
||||||
|
@ -15,12 +12,9 @@ import { isAdmin } from 'soapbox/utils/accounts';
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = state => {
|
||||||
const me = state.get('me');
|
const me = state.get('me');
|
||||||
const account = state.getIn(['accounts', me]);
|
const account = state.getIn(['accounts', me]);
|
||||||
const features = getFeatures(state.get('instance'));
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
me,
|
me,
|
||||||
showTrendsPanel: features.trends,
|
|
||||||
showWhoToFollowPanel: features.suggestions,
|
|
||||||
disclosed: federationRestrictionsDisclosed(state),
|
disclosed: federationRestrictionsDisclosed(state),
|
||||||
isAdmin: isAdmin(account),
|
isAdmin: isAdmin(account),
|
||||||
};
|
};
|
||||||
|
@ -30,7 +24,7 @@ export default @connect(mapStateToProps)
|
||||||
class RemoteInstancePage extends ImmutablePureComponent {
|
class RemoteInstancePage extends ImmutablePureComponent {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { me, children, showTrendsPanel, showWhoToFollowPanel, params: { instance: host }, disclosed, isAdmin } = this.props;
|
const { me, children, params: { instance: host }, disclosed, isAdmin } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='page'>
|
<div className='page'>
|
||||||
|
@ -52,8 +46,6 @@ class RemoteInstancePage extends ImmutablePureComponent {
|
||||||
|
|
||||||
<div className='columns-area__panels__pane columns-area__panels__pane--right'>
|
<div className='columns-area__panels__pane columns-area__panels__pane--right'>
|
||||||
<div className='columns-area__panels__pane__inner'>
|
<div className='columns-area__panels__pane__inner'>
|
||||||
{showTrendsPanel && <TrendsPanel limit={3} key='trends-panel' />}
|
|
||||||
{showWhoToFollowPanel && <WhoToFollowPanel limit={5} key='wtf-panel' />}
|
|
||||||
{me && <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' />
|
||||||
|
|
Ładowanie…
Reference in New Issue