mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-15 11:17:49 +08:00
Fix display issues of the base URL
This commit is contained in:
parent
5624ae431e
commit
af8a14c92b
4 changed files with 3 additions and 9 deletions
|
@ -21,7 +21,6 @@ import {
|
|||
Selector,
|
||||
Text,
|
||||
} from "../components";
|
||||
import { BaseUrlModification } from "../utilities/modifications";
|
||||
import { branchOptions, proxyOptions, securityOptions } from "./options";
|
||||
|
||||
const characters = "abcdef0123456789";
|
||||
|
@ -58,7 +57,7 @@ const SettingsGeneralView: FunctionComponent = () => {
|
|||
icon="/"
|
||||
settingKey="settings-general-base_url"
|
||||
settingOptions={{
|
||||
onLoaded: BaseUrlModification,
|
||||
onLoaded: (s) => s.general.base_url?.slice(1) ?? "",
|
||||
onSubmit: (v) => "/" + v,
|
||||
}}
|
||||
></Text>
|
||||
|
|
|
@ -14,7 +14,6 @@ import {
|
|||
URLTestButton,
|
||||
} from "../components";
|
||||
import { moviesEnabledKey } from "../keys";
|
||||
import { BaseUrlModification } from "../utilities/modifications";
|
||||
|
||||
const SettingsRadarrView: FunctionComponent = () => {
|
||||
return (
|
||||
|
@ -32,7 +31,7 @@ const SettingsRadarrView: FunctionComponent = () => {
|
|||
icon="/"
|
||||
settingKey="settings-radarr-base_url"
|
||||
settingOptions={{
|
||||
onLoaded: BaseUrlModification,
|
||||
onLoaded: (s) => s.radarr.base_url?.slice(1) ?? "",
|
||||
onSubmit: (v) => "/" + v,
|
||||
}}
|
||||
></Text>
|
||||
|
|
|
@ -16,7 +16,6 @@ import {
|
|||
} from "../components";
|
||||
import { seriesEnabledKey } from "../keys";
|
||||
import { seriesTypeOptions } from "../options";
|
||||
import { BaseUrlModification } from "../utilities/modifications";
|
||||
|
||||
const SettingsSonarrView: FunctionComponent = () => {
|
||||
return (
|
||||
|
@ -34,7 +33,7 @@ const SettingsSonarrView: FunctionComponent = () => {
|
|||
icon="/"
|
||||
settingKey="settings-sonarr-base_url"
|
||||
settingOptions={{
|
||||
onLoaded: BaseUrlModification,
|
||||
onLoaded: (s) => s.sonarr.base_url?.slice(1) ?? "",
|
||||
onSubmit: (v) => "/" + v,
|
||||
}}
|
||||
></Text>
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
export const BaseUrlModification = (settings: Settings) =>
|
||||
settings.general.base_url?.slice(1) ?? "";
|
||||
|
||||
export const SubzeroModification = (key: string) => (settings: Settings) =>
|
||||
settings.general.subzero_mods?.includes(key) ?? false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue