Revert notification design (#1875)

This commit is contained in:
Claire 2022-10-28 10:30:14 +02:00 committed by GitHub
parent 19765216a1
commit 371563b0e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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'))}
> >
{prepend && account && ( {!muted && prepend}
<StatusPrepend
type={prepend}
account={account}
parseClick={parseClick}
notificationId={this.props.notificationId}
/>
)}
<header className='status__info'> <header className='status__info'>
<span> <span>
{muted && prepend}
{!muted || !isCollapsed ? ( {!muted || !isCollapsed ? (
<StatusHeader <StatusHeader
status={status} status={status}