import ImmutablePureComponent from 'react-immutable-pure-component';
import Video from '../../video';
import scheduleIdleTask from '../../ui/util/schedule_idle_task';
+import classNames from 'classnames';
export default class DetailedStatus extends ImmutablePureComponent {
measureHeight: PropTypes.bool,
onHeightChange: PropTypes.func,
domain: PropTypes.string.isRequired,
+ compact: PropTypes.bool,
};
state = {
_measureHeight (heightJustChanged) {
if (this.props.measureHeight && this.node) {
- scheduleIdleTask(() => this.node && this.setState({ height: this.node.offsetHeight }));
+ scheduleIdleTask(() => this.node && this.setState({ height: this.node.scrollHeight }));
if (this.props.onHeightChange && heightJustChanged) {
this.props.onHeightChange();
render () {
const status = this.props.status.get('reblog') ? this.props.status.get('reblog') : this.props.status;
const outerStyle = { boxSizing: 'border-box' };
+ const { compact } = this.props;
if (!status) {
return null;
}
return (
- <div ref={this.setRef} className='detailed-status' style={outerStyle}>
- <a href={status.getIn(['account', 'url'])} onClick={this.handleAccountClick} className='detailed-status__display-name'>
- <div className='detailed-status__display-avatar'><Avatar account={status.get('account')} size={48} /></div>
- <DisplayName account={status.get('account')} localDomain={this.props.domain} />
- </a>
-
- <StatusContent status={status} expanded={!status.get('hidden')} onExpandedToggle={this.handleExpandedToggle} />
-
- {media}
-
- <div className='detailed-status__meta'>
- <a className='detailed-status__datetime' href={status.get('url')} target='_blank' rel='noopener'>
- <FormattedDate value={new Date(status.get('created_at'))} hour12={false} year='numeric' month='short' day='2-digit' hour='2-digit' minute='2-digit' />
- </a>{applicationLink} · {reblogLink} · {favouriteLink}
+ <div style={outerStyle}>
+ <div ref={this.setRef} className={classNames('detailed-status', { compact })}>
+ <a href={status.getIn(['account', 'url'])} onClick={this.handleAccountClick} className='detailed-status__display-name'>
+ <div className='detailed-status__display-avatar'><Avatar account={status.get('account')} size={48} /></div>
+ <DisplayName account={status.get('account')} localDomain={this.props.domain} />
+ </a>
+
+ <StatusContent status={status} expanded={!status.get('hidden')} onExpandedToggle={this.handleExpandedToggle} />
+
+ {media}
+
+ <div className='detailed-status__meta'>
+ <a className='detailed-status__datetime' href={status.get('url')} target='_blank' rel='noopener'>
+ <FormattedDate value={new Date(status.get('created_at'))} hour12={false} year='numeric' month='short' day='2-digit' hour='2-digit' minute='2-digit' />
+ </a>{applicationLink} · {reblogLink} · {favouriteLink}
+ </div>
</div>
</div>
);
ancestorsIds,
descendantsIds,
askReplyConfirmation: state.getIn(['compose', 'text']).trim().length !== 0,
+ domain: state.getIn(['meta', 'domain']),
};
};
descendantsIds: ImmutablePropTypes.list,
intl: PropTypes.object.isRequired,
askReplyConfirmation: PropTypes.bool,
+ domain: PropTypes.string.isRequired,
};
state = {
render () {
let ancestors, descendants;
- const { shouldUpdateScroll, status, ancestorsIds, descendantsIds, intl } = this.props;
+ const { shouldUpdateScroll, status, ancestorsIds, descendantsIds, intl, domain } = this.props;
const { fullscreen } = this.state;
if (status === null) {
onOpenVideo={this.handleOpenVideo}
onOpenMedia={this.handleOpenMedia}
onToggleHidden={this.handleToggleHidden}
+ domain={domain}
/>
<ActionBar
+++ /dev/null
-.features-list
- .features-list__row
- .text
- %h6= t 'about.features.real_conversation_title'
- = t 'about.features.real_conversation_body'
- .visual
- = fa_icon 'fw comments'
- .features-list__row
- .text
- %h6= t 'about.features.not_a_product_title'
- = t 'about.features.not_a_product_body'
- .visual
- = fa_icon 'fw users'
- .features-list__row
- .text
- %h6= t 'about.features.within_reach_title'
- = t 'about.features.within_reach_body'
- .visual
- = fa_icon 'fw mobile'
- .features-list__row
- .text
- %h6= t 'about.features.humane_approach_title'
- = t 'about.features.humane_approach_body'
- .visual
- = fa_icon 'fw leaf'