fix(frontend): autofill with Plex server address (#1381)

pull/1385/head
TheCatLady 4 years ago committed by GitHub
parent 33542c9b2d
commit d9e314bad2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -115,7 +115,6 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
hostname: Yup.string() hostname: Yup.string()
.required(intl.formatMessage(messages.validationHostnameRequired)) .required(intl.formatMessage(messages.validationHostnameRequired))
.matches( .matches(
// eslint-disable-next-line
/^(([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, /^(([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.validationHostnameRequired) intl.formatMessage(messages.validationHostnameRequired)
), ),
@ -394,7 +393,7 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
const targPreset = const targPreset =
availablePresets[Number(e.target.value)]; availablePresets[Number(e.target.value)];
if (targPreset) { if (targPreset) {
setFieldValue('hostname', targPreset.host); setFieldValue('hostname', targPreset.address);
setFieldValue('port', targPreset.port); setFieldValue('port', targPreset.port);
setFieldValue('useSsl', targPreset.ssl); setFieldValue('useSsl', targPreset.ssl);
} }

Loading…
Cancel
Save