mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix(frontend): add http/https prefix to hostname fields for plex/radarr/sonarr
fixes #357
This commit is contained in:
@@ -316,6 +316,9 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
|
|||||||
</label>
|
</label>
|
||||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||||
<div className="max-w-lg flex rounded-md shadow-sm">
|
<div className="max-w-lg flex rounded-md shadow-sm">
|
||||||
|
<span className="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-500 bg-gray-600 text-gray-100 sm:text-sm cursor-default">
|
||||||
|
{values.ssl ? 'https://' : 'http://'}
|
||||||
|
</span>
|
||||||
<Field
|
<Field
|
||||||
id="hostname"
|
id="hostname"
|
||||||
name="hostname"
|
name="hostname"
|
||||||
@@ -325,7 +328,7 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
|
|||||||
setIsValidated(false);
|
setIsValidated(false);
|
||||||
setFieldValue('hostname', e.target.value);
|
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"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{errors.hostname && touched.hostname && (
|
{errors.hostname && touched.hostname && (
|
||||||
|
@@ -224,12 +224,15 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
|||||||
</label>
|
</label>
|
||||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||||
<div className="max-w-lg flex rounded-md shadow-sm">
|
<div className="max-w-lg flex rounded-md shadow-sm">
|
||||||
|
<span className="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-500 bg-gray-800 text-gray-100 sm:text-sm cursor-default">
|
||||||
|
{values.useSsl ? 'https://' : 'http://'}
|
||||||
|
</span>
|
||||||
<Field
|
<Field
|
||||||
type="text"
|
type="text"
|
||||||
id="hostname"
|
id="hostname"
|
||||||
name="hostname"
|
name="hostname"
|
||||||
placeholder="127.0.0.1"
|
placeholder="127.0.0.1"
|
||||||
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"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{errors.hostname && touched.hostname && (
|
{errors.hostname && touched.hostname && (
|
||||||
|
@@ -319,6 +319,9 @@ const SonarrModal: React.FC<SonarrModalProps> = ({
|
|||||||
</label>
|
</label>
|
||||||
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
||||||
<div className="max-w-lg flex rounded-md shadow-sm">
|
<div className="max-w-lg flex rounded-md shadow-sm">
|
||||||
|
<span className="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-500 bg-gray-600 text-gray-100 sm:text-sm cursor-default">
|
||||||
|
{values.ssl ? 'https://' : 'http://'}
|
||||||
|
</span>
|
||||||
<Field
|
<Field
|
||||||
id="hostname"
|
id="hostname"
|
||||||
name="hostname"
|
name="hostname"
|
||||||
@@ -328,7 +331,7 @@ const SonarrModal: React.FC<SonarrModalProps> = ({
|
|||||||
setIsValidated(false);
|
setIsValidated(false);
|
||||||
setFieldValue('hostname', e.target.value);
|
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"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{errors.hostname && touched.hostname && (
|
{errors.hostname && touched.hostname && (
|
||||||
|
Reference in New Issue
Block a user