Merge remote-tracking branch 'upstream/main' into develop

This commit is contained in:
Jeremy Kescher 2022-10-28 18:32:30 +02:00
commit db5e2e5caf
No known key found for this signature in database
GPG key ID: 48DFE4BB15BA5940
2 changed files with 18 additions and 16 deletions

View file

@ -499,7 +499,6 @@ class Status extends ImmutablePureComponent {
settings,
collapsed,
muted,
prepend,
intersectionObserverWrapper,
onOpenVideo,
onOpenMedia,
@ -713,20 +712,31 @@ class Status extends ImmutablePureComponent {
'data-status-by': `@${status.getIn(['account', 'acct'])}`,
};
if (prepend && account) {
let prepend;
if (this.props.prepend && account) {
const notifKind = {
favourite: 'favourited',
reblog: 'boosted',
reblogged_by: 'boosted',
status: 'posted',
}[prepend];
}[this.props.prepend];
selectorAttribs[`data-${notifKind}-by`] = `@${account.get('acct')}`;
prepend = (
<StatusPrepend
type={this.props.prepend}
account={account}
parseClick={parseClick}
notificationId={this.props.notificationId}
/>
);
}
let rebloggedByText;
if (prepend === 'reblog') {
if (this.props.prepend === 'reblog') {
rebloggedByText = intl.formatMessage({ id: 'status.reblogged_by', defaultMessage: '{name} boosted' }, { name: account.get('acct') });
}
@ -749,16 +759,10 @@ class Status extends ImmutablePureComponent {
data-featured={featured ? 'true' : null}
aria-label={textForScreenReader(intl, status, rebloggedByText, !status.get('hidden'))}
>
{!muted && prepend}
<header className='status__info'>
<span>
{prepend && account ? (
<StatusPrepend
type={prepend}
account={account}
parseClick={parseClick}
notificationId={this.props.notificationId}
/>
) : null}
{muted && prepend}
{!muted || !isCollapsed ? (
<StatusHeader
status={status}

View file

@ -555,12 +555,10 @@
}
.status__prepend {
margin-top: -10px;
margin-bottom: 10px;
margin-top: -2px;
margin-bottom: 8px;
margin-left: 58px;
color: $dark-text-color;
padding: 8px 0;
padding-bottom: 2px;
font-size: 14px;
position: relative;