Merge branch 'compose-block-profile-page' into 'develop'
Make avatar in compose box navigate to profile page See merge request soapbox-pub/soapbox-fe!699
This commit is contained in:
commit
dca2d98dfc
|
@ -1,5 +1,6 @@
|
|||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { Link } from 'react-router-dom';
|
||||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import StatusListContainer from '../../ui/containers/status_list_container';
|
||||
|
@ -80,13 +81,15 @@ class GroupTimeline extends React.PureComponent {
|
|||
);
|
||||
}
|
||||
|
||||
const acct = account ? account.get('acct') : '';
|
||||
|
||||
return (
|
||||
<div>
|
||||
{relationships.get('member') && (
|
||||
<div className='timeline-compose-block'>
|
||||
<div className='timeline-compose-block__avatar'>
|
||||
<Link className='timeline-compose-block__avatar' to={`/@${acct}`}>
|
||||
<Avatar account={account} size={46} />
|
||||
</div>
|
||||
</Link>
|
||||
<ComposeFormContainer group={group} shouldCondense autoFocus={false} />
|
||||
</div>
|
||||
)}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { Link } from 'react-router-dom';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import ComposeFormContainer from '../features/compose/containers/compose_form_container';
|
||||
import Avatar from '../components/avatar';
|
||||
|
@ -46,6 +47,8 @@ class HomePage extends ImmutablePureComponent {
|
|||
render() {
|
||||
const { me, children, account, showFundingPanel, showCryptoDonatePanel, cryptoLimit, showTrendsPanel, showWhoToFollowPanel } = this.props;
|
||||
|
||||
const acct = account ? account.get('acct') : '';
|
||||
|
||||
return (
|
||||
<div className='page'>
|
||||
<div className='page__columns'>
|
||||
|
@ -62,9 +65,9 @@ class HomePage extends ImmutablePureComponent {
|
|||
<div className='columns-area__panels__main'>
|
||||
<div className='columns-area columns-area--mobile'>
|
||||
{me && <div className='timeline-compose-block' ref={this.composeBlock}>
|
||||
<div className='timeline-compose-block__avatar'>
|
||||
<Link className='timeline-compose-block__avatar' to={`/@${acct}`}>
|
||||
<Avatar account={account} size={46} />
|
||||
</div>
|
||||
</Link>
|
||||
<ComposeFormContainer
|
||||
shouldCondense
|
||||
autoFocus={false}
|
||||
|
|
|
@ -179,6 +179,8 @@
|
|||
}
|
||||
|
||||
&__avatar {
|
||||
display: block;
|
||||
border-radius: 50%;
|
||||
@media (max-width: 405px) { display: none; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue