feat(plex): add support for custom Plex Web App URLs (#1581)

* feat(plex): add support for custom Plex Web App URLs

* refactor: clean up Yup validation in *arr modals & email settings

* fix(lang): change Web App URL tip

* fix: remove web app URL validation and add 'Advanced' badge
This commit is contained in:
TheCatLady
2021-05-06 04:40:22 -04:00
committed by GitHub
parent 93c441ef66
commit a640a91390
8 changed files with 90 additions and 84 deletions

View File

@@ -92,15 +92,13 @@ const NotificationsEmail: React.FC = () => {
/^(([a-z]|\d|_|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*)?([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])$/i,
intl.formatMessage(messages.validationSmtpHostRequired)
),
smtpPort: Yup.number()
.typeError(intl.formatMessage(messages.validationSmtpPortRequired))
.when('enabled', {
is: true,
then: Yup.number().required(
intl.formatMessage(messages.validationSmtpPortRequired)
),
otherwise: Yup.number().nullable(),
}),
smtpPort: Yup.number().when('enabled', {
is: true,
then: Yup.number()
.nullable()
.required(intl.formatMessage(messages.validationSmtpPortRequired)),
otherwise: Yup.number().nullable(),
}),
pgpPrivateKey: Yup.string()
.when('pgpPassword', {
is: (value: unknown) => !!value,