parent
23738ca635
commit
04c1ff5680
@ -47,9 +47,7 @@ export default class TimelineContainer extends React.PureComponent {
|
|||||||
<IntlProvider locale={locale} messages={messages}>
|
<IntlProvider locale={locale} messages={messages}>
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<div className='standalone-timeline'>
|
{timeline}
|
||||||
{timeline}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{ReactDOM.createPortal(
|
{ReactDOM.createPortal(
|
||||||
<ModalContainer />,
|
<ModalContainer />,
|
||||||
|
@ -197,7 +197,7 @@ class DetailedStatus extends ImmutablePureComponent {
|
|||||||
} else {
|
} else {
|
||||||
quote = (
|
quote = (
|
||||||
<div className='quote-status' data-id={quote_status.get('id')} dataurl={quote_status.get('url')}>
|
<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'>
|
<a href={quote_status.getIn(['account', 'url'])} onClick={this.handleAccountClick} data-id={quote_status.getIn(['account', 'id'])} data-group={quote_status.getIn(['account', 'group'])} className='detailed-status__display-name'>
|
||||||
<div className='detailed-status__display-avatar'><Avatar account={quote_status.get('account')} size={18} /></div>
|
<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} />
|
<DisplayName account={quote_status.get('account')} localDomain={this.props.domain} />
|
||||||
</a>
|
</a>
|
||||||
|
@ -20,8 +20,6 @@ import {
|
|||||||
deleteStatus,
|
deleteStatus,
|
||||||
hideStatus,
|
hideStatus,
|
||||||
revealStatus,
|
revealStatus,
|
||||||
hideQuote,
|
|
||||||
revealQuote,
|
|
||||||
} from '../../../actions/statuses';
|
} from '../../../actions/statuses';
|
||||||
import { initMuteModal } from '../../../actions/mutes';
|
import { initMuteModal } from '../../../actions/mutes';
|
||||||
import { initBlockModal } from '../../../actions/blocks';
|
import { initBlockModal } from '../../../actions/blocks';
|
||||||
@ -138,14 +136,6 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
|||||||
dispatch(openModal('VIDEO', { media, options }));
|
dispatch(openModal('VIDEO', { media, options }));
|
||||||
},
|
},
|
||||||
|
|
||||||
onOpenMediaQuote (media, index) {
|
|
||||||
dispatch(openModal('MEDIA', { media, index }));
|
|
||||||
},
|
|
||||||
|
|
||||||
onOpenVideoQuote (media, options) {
|
|
||||||
dispatch(openModal('VIDEO', { media, options }));
|
|
||||||
},
|
|
||||||
|
|
||||||
onBlock (status) {
|
onBlock (status) {
|
||||||
const account = status.get('account');
|
const account = status.get('account');
|
||||||
dispatch(initBlockModal(account));
|
dispatch(initBlockModal(account));
|
||||||
@ -175,13 +165,6 @@ 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));
|
export default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(DetailedStatus));
|
||||||
|
@ -291,31 +291,6 @@ function main() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
delegate(document, '.quote-status', 'click', ({ target }) => {
|
|
||||||
if (target.closest('.status__content__spoiler-link') ||
|
|
||||||
target.closest('.media-gallery') ||
|
|
||||||
target.closest('.video-player') ||
|
|
||||||
target.closest('.audio-player')) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
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');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window.location.hostname === url.split('/')[2].split(':')[0]) {
|
|
||||||
window.location.href = url;
|
|
||||||
} else {
|
|
||||||
window.open(url, 'blank');
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadPolyfills()
|
loadPolyfills()
|
||||||
|
@ -77,10 +77,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.standalone-timeline .quote-status {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button.logo-button {
|
.button.logo-button {
|
||||||
flex: 0 auto;
|
flex: 0 auto;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
Loading…
Reference in New Issue
Block a user