sforkowany z mirror/soapbox
Reports: add links
rodzic
7bd670728d
commit
478581cb41
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import { injectIntl, FormattedMessage, defineMessages } from 'react-intl';
|
import { injectIntl, FormattedMessage, defineMessages } from 'react-intl';
|
||||||
|
@ -99,18 +100,22 @@ class Report extends ImmutablePureComponent {
|
||||||
const menu = this.makeMenu();
|
const menu = this.makeMenu();
|
||||||
const statuses = report.get('statuses');
|
const statuses = report.get('statuses');
|
||||||
const statusCount = statuses.count();
|
const statusCount = statuses.count();
|
||||||
|
const acct = report.getIn(['account', 'acct']);
|
||||||
|
const reporterAcct = report.getIn(['actor', 'acct']);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='admin-report' key={report.get('id')}>
|
<div className='admin-report' key={report.get('id')}>
|
||||||
<div className='admin-report__avatar'>
|
<div className='admin-report__avatar'>
|
||||||
<Avatar account={report.get('account')} size={32} />
|
<Link to={`/@${acct}`} title={acct}>
|
||||||
|
<Avatar account={report.get('account')} size={32} />
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className='admin-report__content'>
|
<div className='admin-report__content'>
|
||||||
<h4 className='admin-report__title'>
|
<h4 className='admin-report__title'>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='admin.reports.report_title'
|
id='admin.reports.report_title'
|
||||||
defaultMessage='Report on {acct}'
|
defaultMessage='Report on {acct}'
|
||||||
values={{ acct: `@${report.getIn(['account', 'acct'])}` }}
|
values={{ acct: <Link to={`/@${acct}`} title={acct}>@{acct}</Link> }}
|
||||||
/>
|
/>
|
||||||
</h4>
|
</h4>
|
||||||
<div className='admin-report__statuses'>
|
<div className='admin-report__statuses'>
|
||||||
|
@ -128,7 +133,7 @@ class Report extends ImmutablePureComponent {
|
||||||
{report.get('content', '').length > 0 &&
|
{report.get('content', '').length > 0 &&
|
||||||
<blockquote className='md' dangerouslySetInnerHTML={{ __html: report.get('content') }} />
|
<blockquote className='md' dangerouslySetInnerHTML={{ __html: report.get('content') }} />
|
||||||
}
|
}
|
||||||
<span className='byline'>— @{report.getIn(['actor', 'acct'])}</span>
|
<span className='byline'>— <Link to={`/@${reporterAcct}`} title={reporterAcct}>@{reporterAcct}</Link></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='admin-report__actions'>
|
<div className='admin-report__actions'>
|
||||||
|
|
|
@ -132,6 +132,10 @@
|
||||||
|
|
||||||
&__title {
|
&__title {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--primary-text-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__quote {
|
&__quote {
|
||||||
|
@ -139,6 +143,11 @@
|
||||||
|
|
||||||
.byline {
|
.byline {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--primary-text-color);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue