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

View file

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