diff --git a/app/javascript/mastodon/features/notifications/components/notification_request.jsx b/app/javascript/mastodon/features/notifications/components/notification_request.jsx index 3a77ef4e2..c240b75d4 100644 --- a/app/javascript/mastodon/features/notifications/components/notification_request.jsx +++ b/app/javascript/mastodon/features/notifications/components/notification_request.jsx @@ -1,31 +1,26 @@ import PropTypes from 'prop-types'; import { useCallback } from 'react'; -import { defineMessages, useIntl } from 'react-intl'; +import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router-dom'; import { useSelector, useDispatch } from 'react-redux'; +import ChevronRightIcon from '@/material-icons/400-24px/chevron_right.svg?react'; import DeleteIcon from '@/material-icons/400-24px/delete.svg?react'; import DoneIcon from '@/material-icons/400-24px/done.svg?react'; import { acceptNotificationRequest, dismissNotificationRequest } from 'mastodon/actions/notifications'; import { Avatar } from 'mastodon/components/avatar'; -import { IconButton } from 'mastodon/components/icon_button'; +import { Icon } from 'mastodon/components/icon'; import { makeGetAccount } from 'mastodon/selectors'; import { toCappedNumber } from 'mastodon/utils/numbers'; const getAccount = makeGetAccount(); -const messages = defineMessages({ - accept: { id: 'notification_requests.accept', defaultMessage: 'Accept' }, - dismiss: { id: 'notification_requests.dismiss', defaultMessage: 'Dismiss' }, -}); - export const NotificationRequest = ({ id, accountId, notificationsCount }) => { const dispatch = useDispatch(); const account = useSelector(state => getAccount(state, accountId)); - const intl = useIntl(); const handleDismiss = useCallback(() => { dispatch(dismissNotificationRequest(id)); @@ -48,11 +43,19 @@ export const NotificationRequest = ({ id, accountId, notificationsCount }) => { @{account?.get('acct')} + +
- - + +
); diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index c575a033b..641ce8d9a 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -10195,6 +10195,7 @@ noscript { .notification-request { display: flex; + flex-direction: column; align-items: center; gap: 16px; padding: 15px; @@ -10208,6 +10209,7 @@ noscript { text-decoration: none; color: inherit; overflow: hidden; + width: 100%; .account__avatar { flex-shrink: 0; @@ -10234,21 +10236,24 @@ noscript { .filtered-notifications-banner__badge { background: $ui-button-background-color; - border-radius: 4px; + border-radius: 8px; padding: 1px 6px; color: $white; } } + &__disclosure-indicator { + color: $darker-text-color; + } + &__actions { display: flex; align-items: center; gap: 8px; + width: 100%; - .icon-button { - border-radius: 4px; - border: 1px solid var(--background-border-color); - padding: 5px; + .button { + flex-grow: 1; } } }