Fix account link in quote
This commit is contained in:
parent
5b1f641fd2
commit
2acc45d777
2 changed files with 5 additions and 5 deletions
|
@ -648,7 +648,7 @@ class Status extends ImmutablePureComponent {
|
||||||
quote = (
|
quote = (
|
||||||
<div className={classNames('quote-status', `status-${quote_status.get('visibility')}`, { muted: this.props.muted })} data-id={quote_status.get('id')}>
|
<div className={classNames('quote-status', `status-${quote_status.get('visibility')}`, { muted: this.props.muted })} data-id={quote_status.get('id')}>
|
||||||
<div className='status__info'>
|
<div className='status__info'>
|
||||||
<a onClick={this.handleAccountClick} target='_blank' data-id={quote_status.getIn(['account', 'id'])} href={quote_status.getIn(['account', 'url'])} title={quote_status.getIn(['account', 'acct'])} className='status__display-name'>
|
<a onClick={this.handleAccountClick} target='_blank' data-id={quote_status.getIn(['account', 'id'])} data-group={quote_status.getIn(['account', 'group'])} href={quote_status.getIn(['account', 'url'])} title={quote_status.getIn(['account', 'acct'])} className='status__display-name'>
|
||||||
<div className='status__avatar'><Avatar account={quote_status.get('account')} size={18} /></div>
|
<div className='status__avatar'><Avatar account={quote_status.get('account')} size={18} /></div>
|
||||||
<DisplayName account={quote_status.get('account')} />
|
<DisplayName account={quote_status.get('account')} />
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -94,11 +94,11 @@ class DetailedStatus extends ImmutablePureComponent {
|
||||||
|
|
||||||
handleAccountClick = (e) => {
|
handleAccountClick = (e) => {
|
||||||
if (e.button === 0 && !(e.ctrlKey || e.metaKey) && this.context.router) {
|
if (e.button === 0 && !(e.ctrlKey || e.metaKey) && this.context.router) {
|
||||||
const { status } = this.props;
|
|
||||||
const id = e.currentTarget.getAttribute('data-id');
|
const id = e.currentTarget.getAttribute('data-id');
|
||||||
|
const group = e.currentTarget.getAttribute('data-group') !== 'false';
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (status.getIn(['account', 'group'], false)) {
|
if (group) {
|
||||||
this.context.router.history.push(`/timelines/groups/${id}`);
|
this.context.router.history.push(`/timelines/groups/${id}`);
|
||||||
} else {
|
} else {
|
||||||
this.context.router.history.push(`/accounts/${id}`);
|
this.context.router.history.push(`/accounts/${id}`);
|
||||||
|
@ -255,7 +255,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>
|
||||||
|
@ -398,7 +398,7 @@ class DetailedStatus extends ImmutablePureComponent {
|
||||||
return (
|
return (
|
||||||
<div style={outerStyle}>
|
<div style={outerStyle}>
|
||||||
<div ref={this.setRef} className={classNames('detailed-status', `detailed-status-${status.get('visibility')}`, { compact, 'detailed-status-with-expiration': expires_date, 'detailed-status-expired': expired })}>
|
<div ref={this.setRef} className={classNames('detailed-status', `detailed-status-${status.get('visibility')}`, { compact, 'detailed-status-with-expiration': expires_date, 'detailed-status-expired': expired })}>
|
||||||
<a href={status.getIn(['account', 'url'])} onClick={this.handleAccountClick} className='detailed-status__display-name'>
|
<a href={status.getIn(['account', 'url'])} onClick={this.handleAccountClick} data-id={status.getIn(['account', 'id'])} data-group={status.getIn(['account', 'group'])} className='detailed-status__display-name'>
|
||||||
<div className='detailed-status__display-avatar'><Avatar account={status.get('account')} size={48} /></div>
|
<div className='detailed-status__display-avatar'><Avatar account={status.get('account')} size={48} /></div>
|
||||||
<DisplayName account={status.get('account')} localDomain={this.props.domain} />
|
<DisplayName account={status.get('account')} localDomain={this.props.domain} />
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in a new issue