Fix quote on public stream
This commit is contained in:
parent
0a51a32c35
commit
8477a0ece1
5 changed files with 29 additions and 4 deletions
|
@ -47,7 +47,9 @@ export default class TimelineContainer extends React.PureComponent {
|
|||
<IntlProvider locale={locale} messages={messages}>
|
||||
<Provider store={store}>
|
||||
<Fragment>
|
||||
{timeline}
|
||||
<div className='standalone-timeline'>
|
||||
{timeline}
|
||||
</div>
|
||||
|
||||
{ReactDOM.createPortal(
|
||||
<ModalContainer />,
|
||||
|
|
|
@ -231,7 +231,7 @@ class DetailedStatus extends ImmutablePureComponent {
|
|||
|
||||
if (quote_muted) {
|
||||
quote = (
|
||||
<div className='quote-status'>
|
||||
<div className='quote-status' data-id={quote_status.get('id')} dataurl={quote_status.get('url')}>
|
||||
<div className='status__content muted-quote'>
|
||||
<FormattedMessage id='status.muted_quote' defaultMessage='Muted quote' />
|
||||
</div>
|
||||
|
@ -239,7 +239,7 @@ class DetailedStatus extends ImmutablePureComponent {
|
|||
);
|
||||
} else {
|
||||
quote = (
|
||||
<div className='quote-status'>
|
||||
<div className='quote-status' data-id={quote_status.get('id')} dataurl={quote_status.get('url')}>
|
||||
<a href={quote_status.getIn(['account', 'url'])} onClick={this.handleAccountClick} data-id={quote_status.getIn(['account', 'id'])} className='detailed-status__display-name'>
|
||||
<div className='detailed-status__display-avatar'><Avatar account={quote_status.get('account')} size={18} /></div>
|
||||
<DisplayName account={quote_status.get('account')} localDomain={this.props.domain} />
|
||||
|
@ -252,7 +252,7 @@ class DetailedStatus extends ImmutablePureComponent {
|
|||
}
|
||||
} else if (quote_muted) {
|
||||
quote = (
|
||||
<div className={classNames('quote-status', { muted: this.props.muted })}>
|
||||
<div className={classNames('quote-status', { muted: this.props.muted })} data-id={quote_status.get('id')} dataurl={quote_status.get('url')}>
|
||||
<div className={classNames('status__content muted-quote', { 'status__content--with-action': this.context.router })}>
|
||||
<FormattedMessage id='status.muted_quote' defaultMessage='Muted quote' />
|
||||
</div>
|
||||
|
|
|
@ -20,6 +20,8 @@ import {
|
|||
deleteStatus,
|
||||
hideStatus,
|
||||
revealStatus,
|
||||
hideQuote,
|
||||
revealQuote,
|
||||
} from '../../../actions/statuses';
|
||||
import { initMuteModal } from '../../../actions/mutes';
|
||||
import { initBlockModal } from '../../../actions/blocks';
|
||||
|
@ -136,6 +138,14 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
|||
dispatch(openModal('VIDEO', { media, options }));
|
||||
},
|
||||
|
||||
onOpenMediaQuote (media, index) {
|
||||
dispatch(openModal('MEDIA', { media, index }));
|
||||
},
|
||||
|
||||
onOpenVideoQuote (media, options) {
|
||||
dispatch(openModal('VIDEO', { media, options }));
|
||||
},
|
||||
|
||||
onBlock (status) {
|
||||
const account = status.get('account');
|
||||
dispatch(initBlockModal(account));
|
||||
|
@ -165,6 +175,13 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
|||
}
|
||||
},
|
||||
|
||||
onQuoteToggleHidden (status) {
|
||||
if (status.get('quote_hidden')) {
|
||||
dispatch(revealQuote(status.get('id')));
|
||||
} else {
|
||||
dispatch(hideQuote(status.get('id')));
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
export default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(DetailedStatus));
|
||||
|
|
|
@ -303,6 +303,8 @@ function main() {
|
|||
let url = target.closest('.quote-status').getAttribute('dataurl');
|
||||
if (target.closest('.status__display-name')) {
|
||||
url = target.closest('.status__display-name').getAttribute('href');
|
||||
} else if (target.closest('.detailed-status__display-name')) {
|
||||
url = target.closest('.detailed-status__display-name').getAttribute('href');
|
||||
} else if (target.closest('.status-card')) {
|
||||
url = target.closest('.status-card').getAttribute('href');
|
||||
}
|
||||
|
|
|
@ -99,6 +99,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
.standalone-timeline .quote-status {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.button.logo-button {
|
||||
flex: 0 auto;
|
||||
font-size: 14px;
|
||||
|
|
Loading…
Reference in a new issue