mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Improve messaging in Authentication Required modal
Co-authored-by: bakerboy448 <55419169+bakerboy448@users.noreply.github.com>
This commit is contained in:
@@ -11,7 +11,7 @@ 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 translate from 'Utilities/String/translate';
|
||||||
import styles from './AuthenticationRequiredModalContent.css';
|
import styles from './AuthenticationRequiredModalContent.css';
|
||||||
|
|
||||||
@@ -63,27 +63,27 @@ function AuthenticationRequiredModalContent(props) {
|
|||||||
className={styles.authRequiredAlert}
|
className={styles.authRequiredAlert}
|
||||||
kind={kinds.WARNING}
|
kind={kinds.WARNING}
|
||||||
>
|
>
|
||||||
{authenticationRequiredWarning}
|
{translate('AuthenticationRequiredWarning', { appName: 'Prowlarr' })}
|
||||||
</Alert>
|
</Alert>
|
||||||
|
|
||||||
{
|
{
|
||||||
isPopulated && !error ?
|
isPopulated && !error ?
|
||||||
<div>
|
<div>
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<FormLabel>{translate('Authentication')}</FormLabel>
|
<FormLabel>{translate('AuthenticationMethod')}</FormLabel>
|
||||||
|
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.SELECT}
|
type={inputTypes.SELECT}
|
||||||
name="authenticationMethod"
|
name="authenticationMethod"
|
||||||
values={authenticationMethodOptions}
|
values={authenticationMethodOptions}
|
||||||
helpText={translate('AuthenticationMethodHelpText')}
|
helpText={translate('AuthenticationMethodHelpText', { appName: 'Prowlarr' })}
|
||||||
|
helpTextWarning={authenticationMethod.value === 'none' ? translate('AuthenticationMethodHelpTextWarning') : undefined}
|
||||||
|
helpLink="https://wiki.servarr.com/prowlarr/faq#forced-authentication"
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
{...authenticationMethod}
|
{...authenticationMethod}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
{
|
|
||||||
authenticationEnabled ?
|
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<FormLabel>{translate('AuthenticationRequired')}</FormLabel>
|
<FormLabel>{translate('AuthenticationRequired')}</FormLabel>
|
||||||
|
|
||||||
@@ -95,12 +95,8 @@ function AuthenticationRequiredModalContent(props) {
|
|||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
{...authenticationRequired}
|
{...authenticationRequired}
|
||||||
/>
|
/>
|
||||||
</FormGroup> :
|
</FormGroup>
|
||||||
null
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
authenticationEnabled ?
|
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<FormLabel>{translate('Username')}</FormLabel>
|
<FormLabel>{translate('Username')}</FormLabel>
|
||||||
|
|
||||||
@@ -108,14 +104,11 @@ function AuthenticationRequiredModalContent(props) {
|
|||||||
type={inputTypes.TEXT}
|
type={inputTypes.TEXT}
|
||||||
name="username"
|
name="username"
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
|
helpTextWarning={username.value === '' ? translate('AuthenticationRequiredUsernameHelpTextWarning') : undefined}
|
||||||
{...username}
|
{...username}
|
||||||
/>
|
/>
|
||||||
</FormGroup> :
|
</FormGroup>
|
||||||
null
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
authenticationEnabled ?
|
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<FormLabel>{translate('Password')}</FormLabel>
|
<FormLabel>{translate('Password')}</FormLabel>
|
||||||
|
|
||||||
@@ -123,11 +116,10 @@ function AuthenticationRequiredModalContent(props) {
|
|||||||
type={inputTypes.PASSWORD}
|
type={inputTypes.PASSWORD}
|
||||||
name="password"
|
name="password"
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
|
helpTextWarning={password.value === '' ? translate('AuthenticationRequiredPasswordHelpTextWarning') : undefined}
|
||||||
{...password}
|
{...password}
|
||||||
/>
|
/>
|
||||||
</FormGroup> :
|
</FormGroup>
|
||||||
null
|
|
||||||
}
|
|
||||||
</div> :
|
</div> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
@@ -11,24 +11,69 @@ import ConfirmModal from 'Components/Modal/ConfirmModal';
|
|||||||
import { icons, inputTypes, kinds } from 'Helpers/Props';
|
import { icons, inputTypes, kinds } from 'Helpers/Props';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
|
|
||||||
export const authenticationRequiredWarning = translate('AuthenticationRequiredWarning');
|
|
||||||
|
|
||||||
export const authenticationMethodOptions = [
|
export const authenticationMethodOptions = [
|
||||||
{ key: 'none', value: 'None', isDisabled: true },
|
{
|
||||||
{ key: 'external', value: 'External', isHidden: true },
|
key: 'none',
|
||||||
{ key: 'basic', value: 'Basic (Browser Popup)' },
|
get value() {
|
||||||
{ key: 'forms', value: 'Forms (Login Page)' }
|
return translate('None');
|
||||||
|
},
|
||||||
|
isDisabled: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'external',
|
||||||
|
get value() {
|
||||||
|
return translate('External');
|
||||||
|
},
|
||||||
|
isHidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'basic',
|
||||||
|
get value() {
|
||||||
|
return translate('AuthBasic');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'forms',
|
||||||
|
get value() {
|
||||||
|
return translate('AuthForm');
|
||||||
|
}
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
export const authenticationRequiredOptions = [
|
export const authenticationRequiredOptions = [
|
||||||
{ key: 'enabled', value: 'Enabled' },
|
{
|
||||||
{ key: 'disabledForLocalAddresses', value: 'Disabled for Local Addresses' }
|
key: 'enabled',
|
||||||
|
get value() {
|
||||||
|
return translate('Enabled');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'disabledForLocalAddresses',
|
||||||
|
get value() {
|
||||||
|
return translate('DisabledForLocalAddresses');
|
||||||
|
}
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const certificateValidationOptions = [
|
const certificateValidationOptions = [
|
||||||
{ key: 'enabled', value: 'Enabled' },
|
{
|
||||||
{ key: 'disabledForLocalAddresses', value: 'Disabled for Local Addresses' },
|
key: 'enabled',
|
||||||
{ key: 'disabled', value: 'Disabled' }
|
get value() {
|
||||||
|
return translate('Enabled');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'disabledForLocalAddresses',
|
||||||
|
get value() {
|
||||||
|
return translate('DisabledForLocalAddresses');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'disabled',
|
||||||
|
get value() {
|
||||||
|
return translate('Disabled');
|
||||||
|
}
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
class SecuritySettings extends Component {
|
class SecuritySettings extends Component {
|
||||||
@@ -95,7 +140,7 @@ class SecuritySettings extends Component {
|
|||||||
name="authenticationMethod"
|
name="authenticationMethod"
|
||||||
values={authenticationMethodOptions}
|
values={authenticationMethodOptions}
|
||||||
helpText={translate('AuthenticationMethodHelpText')}
|
helpText={translate('AuthenticationMethodHelpText')}
|
||||||
helpTextWarning={authenticationRequiredWarning}
|
helpTextWarning={translate('AuthenticationRequiredWarning', { appName: 'Prowlarr' })}
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
{...authenticationMethod}
|
{...authenticationMethod}
|
||||||
/>
|
/>
|
||||||
@@ -155,6 +200,7 @@ class SecuritySettings extends Component {
|
|||||||
type={inputTypes.TEXT}
|
type={inputTypes.TEXT}
|
||||||
name="apiKey"
|
name="apiKey"
|
||||||
readOnly={true}
|
readOnly={true}
|
||||||
|
helpTextWarning={translate('RestartRequiredHelpTextWarning')}
|
||||||
buttons={[
|
buttons={[
|
||||||
<ClipboardButton
|
<ClipboardButton
|
||||||
key="copy"
|
key="copy"
|
||||||
@@ -196,7 +242,7 @@ class SecuritySettings extends Component {
|
|||||||
isOpen={this.state.isConfirmApiKeyResetModalOpen}
|
isOpen={this.state.isConfirmApiKeyResetModalOpen}
|
||||||
kind={kinds.DANGER}
|
kind={kinds.DANGER}
|
||||||
title={translate('ResetAPIKey')}
|
title={translate('ResetAPIKey')}
|
||||||
message={translate('AreYouSureYouWantToResetYourAPIKey')}
|
message={translate('ResetAPIKeyMessageText')}
|
||||||
confirmLabel={translate('Reset')}
|
confirmLabel={translate('Reset')}
|
||||||
onConfirm={this.onConfirmResetApiKey}
|
onConfirm={this.onConfirmResetApiKey}
|
||||||
onCancel={this.onCloseResetApiKeyModal}
|
onCancel={this.onCloseResetApiKeyModal}
|
||||||
|
@@ -61,16 +61,21 @@
|
|||||||
"AppsMinimumSeedersHelpText": "Minimum seeders required by the Applications for the indexer to grab, empty is Sync profile's default",
|
"AppsMinimumSeedersHelpText": "Minimum seeders required by the Applications for the indexer to grab, empty is Sync profile's default",
|
||||||
"AreYouSureYouWantToDeleteCategory": "Are you sure you want to delete mapped category?",
|
"AreYouSureYouWantToDeleteCategory": "Are you sure you want to delete mapped category?",
|
||||||
"AreYouSureYouWantToDeleteIndexer": "Are you sure you want to delete '{name}' from Prowlarr?",
|
"AreYouSureYouWantToDeleteIndexer": "Are you sure you want to delete '{name}' from Prowlarr?",
|
||||||
"AreYouSureYouWantToResetYourAPIKey": "Are you sure you want to reset your API Key?",
|
|
||||||
"Artist": "Artist",
|
"Artist": "Artist",
|
||||||
"AudioSearch": "Audio Search",
|
"AudioSearch": "Audio Search",
|
||||||
"Auth": "Auth",
|
"Auth": "Auth",
|
||||||
|
"AuthBasic": "Basic (Browser Popup)",
|
||||||
|
"AuthForm": "Forms (Login Page)",
|
||||||
"AuthQueries": "Auth Queries",
|
"AuthQueries": "Auth Queries",
|
||||||
"Authentication": "Authentication",
|
"Authentication": "Authentication",
|
||||||
"AuthenticationMethodHelpText": "Require Username and Password to access Prowlarr",
|
"AuthenticationMethod": "Authentication Method",
|
||||||
|
"AuthenticationMethodHelpText": "Require Username and Password to access {appName}",
|
||||||
|
"AuthenticationMethodHelpTextWarning": "Please select a valid authentication method",
|
||||||
"AuthenticationRequired": "Authentication Required",
|
"AuthenticationRequired": "Authentication Required",
|
||||||
"AuthenticationRequiredHelpText": "Change which requests authentication is required for. Do not change unless you understand the risks.",
|
"AuthenticationRequiredHelpText": "Change which requests authentication is required for. Do not change unless you understand the risks.",
|
||||||
"AuthenticationRequiredWarning": "To prevent remote access without authentication, Prowlarr now requires authentication to be enabled. Configure your authentication method and credentials. You can optionally disable authentication from local addresses. Refer to the FAQ for additional information.",
|
"AuthenticationRequiredPasswordHelpTextWarning": "Enter a new password",
|
||||||
|
"AuthenticationRequiredUsernameHelpTextWarning": "Enter a new username",
|
||||||
|
"AuthenticationRequiredWarning": "To prevent remote access without authentication, {appName} now requires authentication to be enabled. You can optionally disable authentication from local addresses.",
|
||||||
"Author": "Author",
|
"Author": "Author",
|
||||||
"Automatic": "Automatic",
|
"Automatic": "Automatic",
|
||||||
"AutomaticSearch": "Automatic Search",
|
"AutomaticSearch": "Automatic Search",
|
||||||
@@ -153,6 +158,7 @@
|
|||||||
"Details": "Details",
|
"Details": "Details",
|
||||||
"DevelopmentSettings": "Development Settings",
|
"DevelopmentSettings": "Development Settings",
|
||||||
"Disabled": "Disabled",
|
"Disabled": "Disabled",
|
||||||
|
"DisabledForLocalAddresses": "Disabled for Local Addresses",
|
||||||
"DisabledUntil": "Disabled Until",
|
"DisabledUntil": "Disabled Until",
|
||||||
"Discord": "Discord",
|
"Discord": "Discord",
|
||||||
"Docker": "Docker",
|
"Docker": "Docker",
|
||||||
@@ -199,6 +205,7 @@
|
|||||||
"Events": "Events",
|
"Events": "Events",
|
||||||
"Exception": "Exception",
|
"Exception": "Exception",
|
||||||
"ExistingTag": "Existing tag",
|
"ExistingTag": "Existing tag",
|
||||||
|
"External": "External",
|
||||||
"Failed": "Failed",
|
"Failed": "Failed",
|
||||||
"FeatureRequests": "Feature Requests",
|
"FeatureRequests": "Feature Requests",
|
||||||
"Filename": "Filename",
|
"Filename": "Filename",
|
||||||
@@ -331,6 +338,7 @@
|
|||||||
"NoSearchResultsFound": "No search results found, try performing a new search below.",
|
"NoSearchResultsFound": "No search results found, try performing a new search below.",
|
||||||
"NoTagsHaveBeenAddedYet": "No tags have been added yet",
|
"NoTagsHaveBeenAddedYet": "No tags have been added yet",
|
||||||
"NoUpdatesAreAvailable": "No updates are available",
|
"NoUpdatesAreAvailable": "No updates are available",
|
||||||
|
"None": "None",
|
||||||
"NotSupported": "Not Supported",
|
"NotSupported": "Not Supported",
|
||||||
"Notification": "Notification",
|
"Notification": "Notification",
|
||||||
"NotificationStatusAllClientHealthCheckMessage": "All notifications are unavailable due to failures",
|
"NotificationStatusAllClientHealthCheckMessage": "All notifications are unavailable due to failures",
|
||||||
@@ -409,6 +417,7 @@
|
|||||||
"Replace": "Replace",
|
"Replace": "Replace",
|
||||||
"Reset": "Reset",
|
"Reset": "Reset",
|
||||||
"ResetAPIKey": "Reset API Key",
|
"ResetAPIKey": "Reset API Key",
|
||||||
|
"ResetAPIKeyMessageText": "Are you sure you want to reset your API Key?",
|
||||||
"Restart": "Restart",
|
"Restart": "Restart",
|
||||||
"RestartNow": "Restart Now",
|
"RestartNow": "Restart Now",
|
||||||
"RestartProwlarr": "Restart Prowlarr",
|
"RestartProwlarr": "Restart Prowlarr",
|
||||||
|
Reference in New Issue
Block a user