From a583317df62acced3cea1f102e5c7981ff1bdbea Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 20 Mar 2024 12:06:44 +0100 Subject: [PATCH] Fix icon and styling in browser notifications banner (#29658) --- .../notifications/components/column_settings.jsx | 14 ++++++++------ .../components/notifications_permission_banner.jsx | 4 ++-- .../material-icons/400-20px/settings-fill.svg | 1 + .../material-icons/400-20px/settings.svg | 1 + app/javascript/styles/mastodon/components.scss | 6 ++++++ 5 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 app/javascript/material-icons/400-20px/settings-fill.svg create mode 100644 app/javascript/material-icons/400-20px/settings.svg diff --git a/app/javascript/mastodon/features/notifications/components/column_settings.jsx b/app/javascript/mastodon/features/notifications/components/column_settings.jsx index 2a9425b82b..caa1b757a4 100644 --- a/app/javascript/mastodon/features/notifications/components/column_settings.jsx +++ b/app/javascript/mastodon/features/notifications/components/column_settings.jsx @@ -68,16 +68,18 @@ export default class ColumnSettings extends PureComponent { )} - {alertsEnabled && browserSupport && browserPermission === 'default' && ( - - - - )} -
+ {alertsEnabled && browserSupport && browserPermission === 'default' && ( +
+ + + +
+ )} +

diff --git a/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx b/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx index 1cdf5b5dfe..276bcbebad 100644 --- a/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx +++ b/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx @@ -5,8 +5,8 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; +import SettingsIcon from '@/material-icons/400-20px/settings.svg?react'; import CloseIcon from '@/material-icons/400-24px/close.svg?react'; -import TuneIcon from '@/material-icons/400-24px/tune.svg?react'; import { requestBrowserPermission } from 'mastodon/actions/notifications'; import { changeSetting } from 'mastodon/actions/settings'; import { Button } from 'mastodon/components/button'; @@ -42,7 +42,7 @@ class NotificationsPermissionBanner extends PureComponent {

-

}} />

+

}} />

); diff --git a/app/javascript/material-icons/400-20px/settings-fill.svg b/app/javascript/material-icons/400-20px/settings-fill.svg new file mode 100644 index 0000000000..f5de77821d --- /dev/null +++ b/app/javascript/material-icons/400-20px/settings-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/javascript/material-icons/400-20px/settings.svg b/app/javascript/material-icons/400-20px/settings.svg new file mode 100644 index 0000000000..472569ab6a --- /dev/null +++ b/app/javascript/material-icons/400-20px/settings.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 71f9e0d9d0..ff3b72158c 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -8581,6 +8581,12 @@ noscript { color: $darker-text-color; margin-bottom: 15px; text-align: center; + + .icon { + width: 20px; + height: 20px; + vertical-align: middle; + } } }