Fix "Post revoked" label & "Pending" tooltip text (#36090)
This commit is contained in:
@@ -21,8 +21,10 @@ const MAX_QUOTE_POSTS_NESTING_LEVEL = 1;
|
|||||||
|
|
||||||
const QuoteWrapper: React.FC<{
|
const QuoteWrapper: React.FC<{
|
||||||
isError?: boolean;
|
isError?: boolean;
|
||||||
|
contextType?: string;
|
||||||
|
onQuoteCancel?: () => void;
|
||||||
children: React.ReactElement;
|
children: React.ReactElement;
|
||||||
}> = ({ isError, children }) => {
|
}> = ({ isError, contextType, onQuoteCancel, children }) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={classNames('status__quote', {
|
className={classNames('status__quote', {
|
||||||
@@ -30,6 +32,11 @@ const QuoteWrapper: React.FC<{
|
|||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
{contextType === 'composer' && (
|
||||||
|
<Button compact plain onClick={onQuoteCancel}>
|
||||||
|
<FormattedMessage id='status.remove_quote' defaultMessage='Remove' />
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -146,49 +153,47 @@ export const QuotedStatus: React.FC<QuotedStatusProps> = ({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<LearnMoreLink>
|
<LearnMoreLink>
|
||||||
<h6>
|
|
||||||
<FormattedMessage
|
|
||||||
id='status.quote_error.pending_approval_popout.title'
|
|
||||||
defaultMessage='Pending quote? Remain calm'
|
|
||||||
/>
|
|
||||||
</h6>
|
|
||||||
<p>
|
<p>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='status.quote_error.pending_approval_popout.body'
|
id='status.quote_error.pending_approval_popout.body'
|
||||||
defaultMessage='Quotes shared across the Fediverse may take time to display, as different servers have different protocols.'
|
defaultMessage="On Mastodon, you can control whether someone can quote you. This post is pending while we're getting the original author's approval."
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
</LearnMoreLink>
|
</LearnMoreLink>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
} else if (quoteState === 'revoked') {
|
||||||
|
quoteError = (
|
||||||
|
<FormattedMessage
|
||||||
|
id='status.quote_error.revoked'
|
||||||
|
defaultMessage='Post removed by author'
|
||||||
|
/>
|
||||||
|
);
|
||||||
} else if (
|
} else if (
|
||||||
!status ||
|
!status ||
|
||||||
!quotedStatusId ||
|
!quotedStatusId ||
|
||||||
quoteState === 'deleted' ||
|
quoteState === 'deleted' ||
|
||||||
quoteState === 'rejected' ||
|
quoteState === 'rejected' ||
|
||||||
quoteState === 'revoked' ||
|
|
||||||
quoteState === 'unauthorized'
|
quoteState === 'unauthorized'
|
||||||
) {
|
) {
|
||||||
quoteError = (
|
quoteError = (
|
||||||
<>
|
<FormattedMessage
|
||||||
<FormattedMessage
|
id='status.quote_error.not_available'
|
||||||
id='status.quote_error.not_available'
|
defaultMessage='Post unavailable'
|
||||||
defaultMessage='Post unavailable'
|
/>
|
||||||
/>
|
|
||||||
{contextType === 'composer' && (
|
|
||||||
<Button compact plain onClick={onQuoteCancel}>
|
|
||||||
<FormattedMessage
|
|
||||||
id='status.remove_quote'
|
|
||||||
defaultMessage='Remove'
|
|
||||||
/>
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quoteError) {
|
if (quoteError) {
|
||||||
return <QuoteWrapper isError>{quoteError}</QuoteWrapper>;
|
return (
|
||||||
|
<QuoteWrapper
|
||||||
|
isError
|
||||||
|
contextType={contextType}
|
||||||
|
onQuoteCancel={onQuoteCancel}
|
||||||
|
>
|
||||||
|
{quoteError}
|
||||||
|
</QuoteWrapper>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (variant === 'link' && status) {
|
if (variant === 'link' && status) {
|
||||||
|
|||||||
@@ -905,8 +905,8 @@
|
|||||||
"status.quote_error.filtered": "Hidden due to one of your filters",
|
"status.quote_error.filtered": "Hidden due to one of your filters",
|
||||||
"status.quote_error.not_available": "Post unavailable",
|
"status.quote_error.not_available": "Post unavailable",
|
||||||
"status.quote_error.pending_approval": "Post pending",
|
"status.quote_error.pending_approval": "Post pending",
|
||||||
"status.quote_error.pending_approval_popout.body": "Quotes shared across the Fediverse may take time to display, as different servers have different protocols.",
|
"status.quote_error.pending_approval_popout.body": "On Mastodon, you can control whether someone can quote you. This post is pending while we're getting the original author's approval.",
|
||||||
"status.quote_error.pending_approval_popout.title": "Pending quote? Remain calm",
|
"status.quote_error.revoked": "Post removed by author",
|
||||||
"status.quote_followers_only": "Only followers can quote this post",
|
"status.quote_followers_only": "Only followers can quote this post",
|
||||||
"status.quote_manual_review": "Author will manually review",
|
"status.quote_manual_review": "Author will manually review",
|
||||||
"status.quote_policy_change": "Change who can quote",
|
"status.quote_policy_change": "Change who can quote",
|
||||||
|
|||||||
Reference in New Issue
Block a user