mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 01:23:53 -07:00
New: Show all options when authentication modal is open
(cherry picked from commit c7d6c0f45264944bb5c00374ff025344218ef7eb) (cherry picked from commit ca93a72d63b89f7b1f3346643cc549e4df617263)
This commit is contained in:
parent
2d140e35bd
commit
6c4db36cdf
2 changed files with 40 additions and 47 deletions
|
@ -11,7 +11,8 @@ import ModalContent from 'Components/Modal/ModalContent';
|
||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||||
import { inputTypes, kinds } from 'Helpers/Props';
|
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';
|
import styles from './AuthenticationRequiredModalContent.css';
|
||||||
|
|
||||||
function onModalClose() {
|
function onModalClose() {
|
||||||
|
@ -54,7 +55,7 @@ function AuthenticationRequiredModalContent(props) {
|
||||||
onModalClose={onModalClose}
|
onModalClose={onModalClose}
|
||||||
>
|
>
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
Authentication Required
|
{translate('AuthenticationRequired')}
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
|
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
|
@ -62,71 +63,59 @@ function AuthenticationRequiredModalContent(props) {
|
||||||
className={styles.authRequiredAlert}
|
className={styles.authRequiredAlert}
|
||||||
kind={kinds.WARNING}
|
kind={kinds.WARNING}
|
||||||
>
|
>
|
||||||
{authenticationRequiredWarning}
|
{translate('AuthenticationRequiredWarning')}
|
||||||
</Alert>
|
</Alert>
|
||||||
|
|
||||||
{
|
{
|
||||||
isPopulated && !error ?
|
isPopulated && !error ?
|
||||||
<div>
|
<div>
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<FormLabel>Authentication</FormLabel>
|
<FormLabel>{translate('Authentication')}</FormLabel>
|
||||||
|
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.SELECT}
|
type={inputTypes.SELECT}
|
||||||
name="authenticationMethod"
|
name="authenticationMethod"
|
||||||
values={authenticationMethodOptions}
|
values={authenticationMethodOptions}
|
||||||
helpText="Require Username and Password to access Radarr"
|
helpText={translate('AuthenticationMethodHelpText')}
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
{...authenticationMethod}
|
{...authenticationMethod}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
{
|
<FormGroup>
|
||||||
authenticationEnabled ?
|
<FormLabel>{translate('AuthenticationRequired')}</FormLabel>
|
||||||
<FormGroup>
|
|
||||||
<FormLabel>Authentication Required</FormLabel>
|
|
||||||
|
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.SELECT}
|
type={inputTypes.SELECT}
|
||||||
name="authenticationRequired"
|
name="authenticationRequired"
|
||||||
values={authenticationRequiredOptions}
|
values={authenticationRequiredOptions}
|
||||||
helpText="Change which requests authentication is required for. Do not change unless you understand the risks."
|
helpText={translate('AuthenticationRequiredHelpText')}
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
{...authenticationRequired}
|
{...authenticationRequired}
|
||||||
/>
|
/>
|
||||||
</FormGroup> :
|
</FormGroup>
|
||||||
null
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
<FormGroup>
|
||||||
authenticationEnabled ?
|
<FormLabel>{translate('Username')}</FormLabel>
|
||||||
<FormGroup>
|
|
||||||
<FormLabel>Username</FormLabel>
|
|
||||||
|
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.TEXT}
|
type={inputTypes.TEXT}
|
||||||
name="username"
|
name="username"
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
{...username}
|
{...username}
|
||||||
/>
|
/>
|
||||||
</FormGroup> :
|
</FormGroup>
|
||||||
null
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
<FormGroup>
|
||||||
authenticationEnabled ?
|
<FormLabel>{translate('Password')}</FormLabel>
|
||||||
<FormGroup>
|
|
||||||
<FormLabel>Password</FormLabel>
|
|
||||||
|
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.PASSWORD}
|
type={inputTypes.PASSWORD}
|
||||||
name="password"
|
name="password"
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
{...password}
|
{...password}
|
||||||
/>
|
/>
|
||||||
</FormGroup> :
|
</FormGroup>
|
||||||
null
|
|
||||||
}
|
|
||||||
</div> :
|
</div> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
@ -143,7 +132,7 @@ function AuthenticationRequiredModalContent(props) {
|
||||||
isDisabled={!authenticationEnabled}
|
isDisabled={!authenticationEnabled}
|
||||||
onPress={onSavePress}
|
onPress={onSavePress}
|
||||||
>
|
>
|
||||||
Save
|
{translate('Save')}
|
||||||
</SpinnerButton>
|
</SpinnerButton>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
|
|
|
@ -108,6 +108,10 @@
|
||||||
"Authentication": "Authentication",
|
"Authentication": "Authentication",
|
||||||
"AuthenticationMethodHelpText": "Require Username and Password to access Lidarr",
|
"AuthenticationMethodHelpText": "Require Username and Password to access Lidarr",
|
||||||
"AutoAdd": "Auto Add",
|
"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",
|
"AutoRedownloadFailedHelpText": "Automatically search for and attempt to download a different release",
|
||||||
"Automatic": "Automatic",
|
"Automatic": "Automatic",
|
||||||
"AutomaticAdd": "Automatic Add",
|
"AutomaticAdd": "Automatic Add",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue