mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-03 09:09:42 +02:00
Don't display validation errors as HTML
Display the link to application only if it's enabled Thanks to higa on discord for pointing this to us.
This commit is contained in:
@@ -25,7 +25,7 @@ function FormInputHelpText(props) {
|
|||||||
isCheckInput && styles.isCheckInput
|
isCheckInput && styles.isCheckInput
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div dangerouslySetInnerHTML={{ __html: text }} />
|
{text}
|
||||||
|
|
||||||
{
|
{
|
||||||
link ?
|
link ?
|
||||||
|
@@ -57,6 +57,7 @@ class Application extends Component {
|
|||||||
const {
|
const {
|
||||||
id,
|
id,
|
||||||
name,
|
name,
|
||||||
|
enable,
|
||||||
syncLevel,
|
syncLevel,
|
||||||
fields,
|
fields,
|
||||||
tags,
|
tags,
|
||||||
@@ -77,7 +78,7 @@ class Application extends Component {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{
|
{
|
||||||
applicationUrl ?
|
enable && applicationUrl ?
|
||||||
<IconButton
|
<IconButton
|
||||||
className={styles.externalLink}
|
className={styles.externalLink}
|
||||||
name={icons.EXTERNAL_LINK}
|
name={icons.EXTERNAL_LINK}
|
||||||
@@ -140,6 +141,7 @@ class Application extends Component {
|
|||||||
Application.propTypes = {
|
Application.propTypes = {
|
||||||
id: PropTypes.number.isRequired,
|
id: PropTypes.number.isRequired,
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
|
enable: PropTypes.bool.isRequired,
|
||||||
syncLevel: PropTypes.string.isRequired,
|
syncLevel: PropTypes.string.isRequired,
|
||||||
fields: PropTypes.arrayOf(PropTypes.object).isRequired,
|
fields: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
tags: PropTypes.arrayOf(PropTypes.number).isRequired,
|
tags: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||||
|
@@ -5,6 +5,7 @@ namespace Prowlarr.Api.V1.Applications
|
|||||||
public class ApplicationResource : ProviderResource<ApplicationResource>
|
public class ApplicationResource : ProviderResource<ApplicationResource>
|
||||||
{
|
{
|
||||||
public ApplicationSyncLevel SyncLevel { get; set; }
|
public ApplicationSyncLevel SyncLevel { get; set; }
|
||||||
|
public bool Enable { get; set; }
|
||||||
public string TestCommand { get; set; }
|
public string TestCommand { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,6 +21,7 @@ namespace Prowlarr.Api.V1.Applications
|
|||||||
var resource = base.ToResource(definition);
|
var resource = base.ToResource(definition);
|
||||||
|
|
||||||
resource.SyncLevel = definition.SyncLevel;
|
resource.SyncLevel = definition.SyncLevel;
|
||||||
|
resource.Enable = definition.Enable;
|
||||||
|
|
||||||
return resource;
|
return resource;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user