From 70982cd513ebee3039584a9c16134da5bc2bf5c7 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 12 Jun 2024 12:08:51 +0200 Subject: [PATCH] Add unread style --- .../components/moderation_warning.tsx | 30 +++++- .../relationships_severance_event.jsx | 7 +- .../components/avatar_group.tsx | 4 +- .../components/names_list.tsx | 2 +- .../components/notification_admin_report.tsx | 30 +++--- .../components/notification_admin_sign_up.tsx | 4 +- .../components/notification_favourite.tsx | 4 +- .../components/notification_follow.tsx | 4 +- .../notification_follow_request.tsx | 4 +- .../components/notification_group.tsx | 94 +++++++++++++------ .../notification_group_with_status.tsx | 10 +- .../components/notification_mention.tsx | 4 +- .../notification_moderation_warning.tsx | 8 +- .../components/notification_poll.tsx | 20 +++- .../components/notification_reblog.tsx | 4 +- .../notification_severed_relationships.tsx | 4 +- .../components/notification_status.tsx | 4 +- .../components/notification_update.tsx | 4 +- .../components/notification_with_status.tsx | 10 +- app/javascript/mastodon/locales/en.json | 2 +- .../styles/mastodon/components.scss | 8 +- 21 files changed, 189 insertions(+), 72 deletions(-) diff --git a/app/javascript/mastodon/features/notifications/components/moderation_warning.tsx b/app/javascript/mastodon/features/notifications/components/moderation_warning.tsx index e7ca77f423..fcb5138820 100644 --- a/app/javascript/mastodon/features/notifications/components/moderation_warning.tsx +++ b/app/javascript/mastodon/features/notifications/components/moderation_warning.tsx @@ -1,5 +1,7 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; +import classNames from 'classnames'; + import GavelIcon from '@/material-icons/400-24px/gavel.svg?react'; import { Icon } from 'mastodon/components/icon'; @@ -46,9 +48,15 @@ interface Props { | 'suspend'; id: string; hidden: boolean; + unread: boolean; } -export const ModerationWarning: React.FC = ({ action, id, hidden }) => { +export const ModerationWarning: React.FC = ({ + action, + id, + hidden, + unread, +}) => { const intl = useIntl(); if (hidden) { @@ -56,12 +64,26 @@ export const ModerationWarning: React.FC = ({ action, id, hidden }) => { } return ( -
-
+
+
+ +

{intl.formatMessage(messages[action])}

- +