From ca93a72d63b89f7b1f3346643cc549e4df617263 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) --- .../AuthenticationRequiredModalContent.js | 93 ++++++++----------- src/NzbDrone.Core/Localization/Core/en.json | 3 + 2 files changed, 44 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 fd43f7cfb..7148f73c0 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -78,6 +78,9 @@ "AuthForm": "Forms (Login Page)", "Authentication": "Authentication", "AuthenticationMethodHelpText": "Require Username and Password to access Radarr", + "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, Radarr 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", "AutoTagging": "Auto Tagging",