[Glitch] Add “In Memoriam” banner back to profiles

Port 86ad43173f to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/59/head
Claire 2023-04-12 14:50:02 +02:00
parent cb0562f32c
commit a3c05640f7
3 changed files with 20 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
import InnerHeader from 'flavours/glitch/features/account/components/header';
import ActionBar from 'flavours/glitch/features/account/components/action_bar';
import ImmutablePureComponent from 'react-immutable-pure-component';
import MemorialNote from './memorial_note';
import { FormattedMessage } from 'react-intl';
import { NavLink } from 'react-router-dom';
import MovedNote from './moved_note';
@ -116,6 +117,7 @@ export default class Header extends ImmutablePureComponent {
return (
<div className='account-timeline__header'>
{(!hidden && account.get('memorial')) && <MemorialNote />}
{(!hidden && account.get('moved')) && <MovedNote from={account} to={account.get('moved')} />}
<InnerHeader

View File

@ -0,0 +1,12 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
const MemorialNote = () => (
<div className='account-memorial-banner'>
<div className='account-memorial-banner__message'>
<FormattedMessage id='account.in_memoriam' defaultMessage='In Memoriam.' />
</div>
</div>
);
export default MemorialNote;

View File

@ -770,7 +770,8 @@
}
.moved-account-banner,
.follow-request-banner {
.follow-request-banner,
.account-memorial-banner {
padding: 20px;
background: lighten($ui-base-color, 4%);
display: flex;
@ -804,3 +805,7 @@
.follow-request-banner .button {
width: 100%;
}
.account-memorial-banner__message {
margin-bottom: 0;
}