Add quoted status tombstone

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
merge-requests/1009/head
marcin mikołajczak 3 years ago
parent 0e7f397841
commit ae7f2f86a0

@ -477,8 +477,16 @@ class Status extends ImmutablePureComponent {
let quote; let quote;
if (status.get('quote')) { if (status.get('quote')) {
if (status.getIn(['pleroma', 'quote_visible'], true) === false) {
quote = (
<div className='quoted-status-tombstone'>
<p><FormattedMessage id='statuses.quote_tombstone' defaultMessage='Post is unavailable.' /></p>
</div>
);
} else {
quote = <QuotedStatus statusId={status.get('quote')} />; quote = <QuotedStatus statusId={status.get('quote')} />;
} }
}
if (otherAccounts && otherAccounts.size > 1) { if (otherAccounts && otherAccounts.size > 1) {
statusAvatar = <AvatarComposite accounts={otherAccounts} size={48} />; statusAvatar = <AvatarComposite accounts={otherAccounts} size={48} />;

@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePureComponent from 'react-immutable-pure-component';
import { injectIntl } from 'react-intl'; import { FormattedMessage, injectIntl } from 'react-intl';
import { FormattedDate } from 'react-intl'; import { FormattedDate } from 'react-intl';
import { Link, NavLink } from 'react-router-dom'; import { Link, NavLink } from 'react-router-dom';
@ -164,8 +164,16 @@ class DetailedStatus extends ImmutablePureComponent {
let quote; let quote;
if (status.get('quote')) { if (status.get('quote')) {
if (status.getIn(['pleroma', 'quote_visible'], true) === false) {
quote = (
<div className='quoted-status-tombstone'>
<p><FormattedMessage id='statuses.quote_tombstone' defaultMessage='Post is unavailable.' /></p>
</div>
);
} else {
quote = <QuotedStatus statusId={status.get('quote')} />; quote = <QuotedStatus statusId={status.get('quote')} />;
} }
}
if (status.get('visibility') === 'direct') { if (status.get('visibility') === 'direct') {
statusTypeIcon = <Icon src={require('@tabler/icons/icons/mail.svg')} />; statusTypeIcon = <Icon src={require('@tabler/icons/icons/mail.svg')} />;

@ -820,4 +820,14 @@ a.status-card.compact:hover {
.attachment-thumbs .media-gallery { .attachment-thumbs .media-gallery {
margin-top: 5px !important; margin-top: 5px !important;
} }
&-tombstone {
margin-top: 14px;
padding: 12px;
border: 1px solid var(--brand-color--med);
border-radius: 10px;
color: var(--primary-text-color--faint);
font-size: 14px;
text-align: center;
}
} }

Loading…
Cancel
Save