From 86ad43173f4f2fead5791fe6ae09144cbebee7c1 Mon Sep 17 00:00:00 2001 From: Claire <claire.github-309c@sitedethib.com> Date: Wed, 12 Apr 2023 14:50:02 +0200 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=9CIn=20Memoriam=E2=80=9D=20banner?= =?UTF-8?q?=20back=20to=20profiles=20(#23614)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../features/account_timeline/components/header.jsx | 2 ++ .../account_timeline/components/memorial_note.jsx | 12 ++++++++++++ app/javascript/styles/mastodon/components.scss | 7 ++++++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 app/javascript/mastodon/features/account_timeline/components/memorial_note.jsx diff --git a/app/javascript/mastodon/features/account_timeline/components/header.jsx b/app/javascript/mastodon/features/account_timeline/components/header.jsx index bffa5554b3..c008f0342d 100644 --- a/app/javascript/mastodon/features/account_timeline/components/header.jsx +++ b/app/javascript/mastodon/features/account_timeline/components/header.jsx @@ -3,6 +3,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import InnerHeader from '../../account/components/header'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import MemorialNote from './memorial_note'; import MovedNote from './moved_note'; import { FormattedMessage } from 'react-intl'; import { NavLink } from 'react-router-dom'; @@ -115,6 +116,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 diff --git a/app/javascript/mastodon/features/account_timeline/components/memorial_note.jsx b/app/javascript/mastodon/features/account_timeline/components/memorial_note.jsx new file mode 100644 index 0000000000..fed95ac2ab --- /dev/null +++ b/app/javascript/mastodon/features/account_timeline/components/memorial_note.jsx @@ -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; diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 0fee136cfb..c887ae8b14 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -6963,7 +6963,8 @@ noscript { } .moved-account-banner, -.follow-request-banner { +.follow-request-banner, +.account-memorial-banner { padding: 20px; background: lighten($ui-base-color, 4%); display: flex; @@ -6998,6 +6999,10 @@ noscript { width: 100%; } +.account-memorial-banner__message { + margin-bottom: 0; +} + .column-inline-form { padding: 15px; display: flex; -- GitLab