From 2cd952d1ca5e4cb6d741a7f82cf0b7dce59a2d69 Mon Sep 17 00:00:00 2001 From: TheCatLady <52870424+TheCatLady@users.noreply.github.com> Date: Tue, 13 Apr 2021 22:20:25 -0400 Subject: [PATCH] refactor(ui): improved alerts for services settings & removed alert titles (#1280) * refactor(ui): improved alerts for services settings & removed alert titles * fix(ui): set styling of alert links to be consistent w/ others * fix(ui): clarify appropriate 4K setting when user has not configured a default non-4K server * fix: remove unused var/eslint-disable & correct string --- src/components/AppDataWarning/index.tsx | 7 +- .../RequestModal/SearchByNameModal/index.tsx | 8 +- .../Notifications/NotificationsEmail.tsx | 65 +++++++------- .../NotificationsPushbullet/index.tsx | 36 ++++---- .../NotificationsPushover/index.tsx | 13 ++- .../NotificationsSlack/index.tsx | 10 +-- .../Notifications/NotificationsTelegram.tsx | 13 ++- .../NotificationsWebhook/index.tsx | 2 +- .../Settings/SettingsAbout/Releases/index.tsx | 7 +- src/components/Settings/SettingsPlex.tsx | 28 ++---- src/components/Settings/SettingsServices.tsx | 87 ++++++++++++++----- src/components/UserList/index.tsx | 7 +- .../UserSettings/UserPasswordChange/index.tsx | 31 +++---- .../UserSettings/UserPermissions/index.tsx | 6 +- .../UserProfile/UserSettings/index.tsx | 6 +- src/components/UserProfile/index.tsx | 2 +- src/i18n/globalMessages.ts | 1 - src/i18n/locale/en.json | 29 ++----- 18 files changed, 174 insertions(+), 184 deletions(-) diff --git a/src/components/AppDataWarning/index.tsx b/src/components/AppDataWarning/index.tsx index 3023db81..fce97bd5 100644 --- a/src/components/AppDataWarning/index.tsx +++ b/src/components/AppDataWarning/index.tsx @@ -4,7 +4,6 @@ import useSWR from 'swr'; import Alert from '../Common/Alert'; const messages = defineMessages({ - dockerVolumeMissing: 'Docker Volume Mount Missing', dockerVolumeMissingDescription: 'The {appDataPath} volume mount was not configured properly. All data will be cleared when the container is stopped or restarted.', }); @@ -26,14 +25,14 @@ const AppDataWarning: React.FC = () => { return ( <> {!data.appData && ( - - {intl.formatMessage(messages.dockerVolumeMissingDescription, { + {msg}; }, appDataPath: data.appDataPath, })} - + /> )} ); diff --git a/src/components/RequestModal/SearchByNameModal/index.tsx b/src/components/RequestModal/SearchByNameModal/index.tsx index ff0c6e1c..50df0469 100644 --- a/src/components/RequestModal/SearchByNameModal/index.tsx +++ b/src/components/RequestModal/SearchByNameModal/index.tsx @@ -8,7 +8,6 @@ import { SmallLoadingSpinner } from '../../Common/LoadingSpinner'; import Modal from '../../Common/Modal'; const messages = defineMessages({ - notvdbid: 'Manual Match Required', notvdbiddescription: "We couldn't automatically match your request. Please select the correct match from the list below.", nosummary: 'No summary for this title was found.', @@ -69,9 +68,10 @@ const SearchByNameModal: React.FC = ({ } > - - {intl.formatMessage(messages.notvdbiddescription)} - + {!data && !error && }
{data?.slice(0, 6).map((item) => ( diff --git a/src/components/Settings/Notifications/NotificationsEmail.tsx b/src/components/Settings/Notifications/NotificationsEmail.tsx index 625062bf..1daca614 100644 --- a/src/components/Settings/Notifications/NotificationsEmail.tsx +++ b/src/components/Settings/Notifications/NotificationsEmail.tsx @@ -30,7 +30,6 @@ const messages = defineMessages({ 'SSL should be disabled on standard TLS connections (port 587)', senderName: 'Sender Name', validationEmail: 'You must provide a valid email address', - emailNotificationTypesAlert: 'Email Notification Recipients', emailNotificationTypesAlertDescription: 'Media Requested, Media Automatically Approved, and Media Failed email notifications are sent to all users with the Manage Requests permission.', emailNotificationTypesAlertDescriptionPt2: @@ -198,38 +197,40 @@ const NotificationsEmail: React.FC = () => { return ( <> +

+ {intl.formatMessage( + messages.emailNotificationTypesAlertDescription, + { + strong: function strong(msg) { + return ( + + {msg} + + ); + }, + } + )} +

+

+ {intl.formatMessage( + messages.emailNotificationTypesAlertDescriptionPt2, + { + strong: function strong(msg) { + return ( + + {msg} + + ); + }, + } + )} +

+ + } type="info" - > -

- {intl.formatMessage( - messages.emailNotificationTypesAlertDescription, - { - strong: function strong(msg) { - return ( - - {msg} - - ); - }, - } - )} -

-

- {intl.formatMessage( - messages.emailNotificationTypesAlertDescriptionPt2, - { - strong: function strong(msg) { - return ( - - {msg} - - ); - }, - } - )} -

-
+ />