From ce0266f74ea3979b291ff962271a928682892788 Mon Sep 17 00:00:00 2001 From: sct Date: Thu, 17 Dec 2020 01:36:23 +0000 Subject: [PATCH] fix(frontend): add http/https prefix to hostname fields for plex/radarr/sonarr fixes #357 --- src/components/Settings/RadarrModal/index.tsx | 5 ++++- src/components/Settings/SettingsPlex.tsx | 5 ++++- src/components/Settings/SonarrModal/index.tsx | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/Settings/RadarrModal/index.tsx b/src/components/Settings/RadarrModal/index.tsx index f7d80081f..dbe47c9fd 100644 --- a/src/components/Settings/RadarrModal/index.tsx +++ b/src/components/Settings/RadarrModal/index.tsx @@ -316,6 +316,9 @@ const RadarrModal: React.FC = ({
+ + {values.ssl ? 'https://' : 'http://'} + = ({ setIsValidated(false); setFieldValue('hostname', e.target.value); }} - className="flex-1 form-input block w-full min-w-0 rounded-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500" + className="flex-1 form-input block w-full min-w-0 rounded-r-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500" />
{errors.hostname && touched.hostname && ( diff --git a/src/components/Settings/SettingsPlex.tsx b/src/components/Settings/SettingsPlex.tsx index d4fa052ed..0fa23ad3b 100644 --- a/src/components/Settings/SettingsPlex.tsx +++ b/src/components/Settings/SettingsPlex.tsx @@ -224,12 +224,15 @@ const SettingsPlex: React.FC = ({ onComplete }) => {
+ + {values.useSsl ? 'https://' : 'http://'} +
{errors.hostname && touched.hostname && ( diff --git a/src/components/Settings/SonarrModal/index.tsx b/src/components/Settings/SonarrModal/index.tsx index a98c64ed0..9303131d7 100644 --- a/src/components/Settings/SonarrModal/index.tsx +++ b/src/components/Settings/SonarrModal/index.tsx @@ -319,6 +319,9 @@ const SonarrModal: React.FC = ({
+ + {values.ssl ? 'https://' : 'http://'} + = ({ setIsValidated(false); setFieldValue('hostname', e.target.value); }} - className="flex-1 form-input block w-full min-w-0 rounded-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500" + className="flex-1 form-input block w-full min-w-0 rounded-r-md transition duration-150 ease-in-out sm:text-sm sm:leading-5 bg-gray-700 border border-gray-500" />
{errors.hostname && touched.hostname && (