From 6c4db36cdf32ac1a8c4512d849e16396a1da080a Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 5 Dec 2022 23:00:27 -0800 Subject: [PATCH] New: Show all options when authentication modal is open (cherry picked from commit c7d6c0f45264944bb5c00374ff025344218ef7eb) (cherry picked from commit ca93a72d63b89f7b1f3346643cc549e4df617263) --- .../AuthenticationRequiredModalContent.js | 93 ++++++++----------- src/NzbDrone.Core/Localization/Core/en.json | 4 + 2 files changed, 45 insertions(+), 52 deletions(-) diff --git a/frontend/src/FirstRun/AuthenticationRequiredModalContent.js b/frontend/src/FirstRun/AuthenticationRequiredModalContent.js index 985186fde..5b9141a7b 100644 --- a/frontend/src/FirstRun/AuthenticationRequiredModalContent.js +++ b/frontend/src/FirstRun/AuthenticationRequiredModalContent.js @@ -11,7 +11,8 @@ import ModalContent from 'Components/Modal/ModalContent'; import ModalFooter from 'Components/Modal/ModalFooter'; import ModalHeader from 'Components/Modal/ModalHeader'; import { inputTypes, kinds } from 'Helpers/Props'; -import { authenticationMethodOptions, authenticationRequiredOptions, authenticationRequiredWarning } from 'Settings/General/SecuritySettings'; +import { authenticationMethodOptions, authenticationRequiredOptions } from 'Settings/General/SecuritySettings'; +import translate from 'Utilities/String/translate'; import styles from './AuthenticationRequiredModalContent.css'; function onModalClose() { @@ -54,7 +55,7 @@ function AuthenticationRequiredModalContent(props) { onModalClose={onModalClose} > - Authentication Required + {translate('AuthenticationRequired')} @@ -62,71 +63,59 @@ function AuthenticationRequiredModalContent(props) { className={styles.authRequiredAlert} kind={kinds.WARNING} > - {authenticationRequiredWarning} + {translate('AuthenticationRequiredWarning')} { isPopulated && !error ?
- Authentication + {translate('Authentication')} - { - authenticationEnabled ? - - Authentication Required - - - : - null - } - - { - authenticationEnabled ? - - Username - - - : - null - } - - { - authenticationEnabled ? - - Password - - - : - null - } + + {translate('AuthenticationRequired')} + + + + + + {translate('Username')} + + + + + + {translate('Password')} + + +
: null } @@ -143,7 +132,7 @@ function AuthenticationRequiredModalContent(props) { isDisabled={!authenticationEnabled} onPress={onSavePress} > - Save + {translate('Save')} diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index 670c26a5c..b29e17432 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -108,6 +108,10 @@ "Authentication": "Authentication", "AuthenticationMethodHelpText": "Require Username and Password to access Lidarr", "AutoAdd": "Auto Add", + "AuthenticationRequired": "Authentication Required", + "AuthenticationRequiredHelpText": "Change which requests authentication is required for. Do not change unless you understand the risks.", + "AuthenticationRequiredWarning": "To prevent remote access without authentication, Lidarr now requires authentication to be enabled. You can optionally disable authentication from local addresses.", + "Auto": "Auto", "AutoRedownloadFailedHelpText": "Automatically search for and attempt to download a different release", "Automatic": "Automatic", "AutomaticAdd": "Automatic Add",