From 694d0ffcf6b3e3fa00175400fa4217a7d6eb787f Mon Sep 17 00:00:00 2001 From: TheCatLady <52870424+TheCatLady@users.noreply.github.com> Date: Sat, 8 May 2021 00:10:47 -0400 Subject: [PATCH] fix(ui): hide Plex alert after setup and add local login warning to local user modal (#1600) --- src/components/Settings/SettingsPlex.tsx | 40 +++++++++++++----------- src/components/UserList/index.tsx | 18 +++++++++++ src/i18n/locale/en.json | 1 + 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/src/components/Settings/SettingsPlex.tsx b/src/components/Settings/SettingsPlex.tsx index 801d882c..6ac99805 100644 --- a/src/components/Settings/SettingsPlex.tsx +++ b/src/components/Settings/SettingsPlex.tsx @@ -262,25 +262,27 @@ const SettingsPlex: React.FC = ({ onComplete }) => {

{intl.formatMessage(messages.plexsettingsDescription)}

-
- - {msg} - - ); - }, - })} - type="info" - /> -
+ {!!onComplete && ( +
+ + {msg} + + ); + }, + })} + type="info" + /> +
+ )} Enable Local Sign-In setting is currently disabled.', }); type Sort = 'created' | 'updated' | 'requests' | 'displayname'; @@ -84,6 +87,7 @@ type Sort = 'created' | 'updated' | 'requests' | 'displayname'; const UserList: React.FC = () => { const intl = useIntl(); const router = useRouter(); + const settings = useSettings(); const { addToast } = useToasts(); const { user: currentUser, hasPermission: currentHasPermission } = useUser(); const [currentSort, setCurrentSort] = useState('created'); @@ -347,6 +351,20 @@ const UserList: React.FC = () => { okButtonType="primary" onCancel={() => setCreateModal({ isOpen: false })} > + {!settings.currentSettings.localLogin && ( + + {msg} + + ); + }, + })} + type="warning" + /> + )} {!notificationSettings?.emailEnabled && ( Enable Local Sign-In setting is currently disabled.", "components.UserList.localuser": "Local User", "components.UserList.nouserstoimport": "No new users to import from Plex.", "components.UserList.owner": "Owner",