Show warning when using the docker update mechanism

pull/5907/head
Bogdan 1 year ago committed by GitHub
parent 6a0dc72808
commit cc538c4b2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,7 +9,7 @@ import titleCase from 'Utilities/String/titleCase';
import translate from 'Utilities/String/translate';
const branchValues = [
'master',
'main',
'develop'
];
@ -83,6 +83,7 @@ function UpdateSettings(props) {
type={inputTypes.CHECK}
name="updateAutomatically"
helpText={translate('UpdateAutomaticallyHelpText')}
helpTextWarning={updateMechanism.value === 'docker' ? translate('AutomaticUpdatesDisabledDocker', { appName: 'Sonarr' }) : undefined}
onChange={onInputChange}
{...updateAutomatically}
/>

@ -111,7 +111,6 @@ class Updates extends Component {
name={icons.CHECK_CIRCLE}
size={30}
/>
<div className={styles.message}>
{translate('OnLatestVersion')}
</div>
@ -149,8 +148,8 @@ class Updates extends Component {
</div>
{
update.branch === 'master' ?
null:
update.branch === 'main' ?
null :
<Label
className={styles.label}
>

@ -149,7 +149,7 @@ namespace NzbDrone.Common.Extensions
public static bool IsPathValid(this string path, PathValidationType validationType)
{
if (path.ContainsInvalidPathChars() || string.IsNullOrWhiteSpace(path))
if (string.IsNullOrWhiteSpace(path) || path.ContainsInvalidPathChars())
{
return false;
}

@ -97,6 +97,7 @@
"Automatic": "Automatic",
"AutomaticAdd": "Automatic Add",
"AutomaticSearch": "Automatic Search",
"AutomaticUpdatesDisabledDocker": "Automatic updates are not directly supported when using the Docker update mechanism. You will need to update the container image outside of {appName} or use a script",
"Backup": "Backup",
"BackupFolderHelpText": "Relative paths will be under Sonarr's AppData directory",
"BackupIntervalHelpText": "Interval between automatic backups",

@ -58,7 +58,7 @@ namespace Sonarr.Api.V3.Config
.Must((resource, path) => IsValidSslCertificate(resource)).WithMessage("Invalid SSL certificate file or password")
.When(c => c.EnableSsl);
SharedValidator.RuleFor(c => c.Branch).NotEmpty().WithMessage("Branch name is required, 'master' is the default");
SharedValidator.RuleFor(c => c.Branch).NotEmpty().WithMessage("Branch name is required, 'main' is the default");
SharedValidator.RuleFor(c => c.UpdateScriptPath).IsValidPath().When(c => c.UpdateMechanism == UpdateMechanism.Script);
SharedValidator.RuleFor(c => c.BackupFolder).IsValidPath().When(c => Path.IsPathRooted(c.BackupFolder));

Loading…
Cancel
Save