diff options
author | LASER-Yi <[email protected]> | 2022-07-26 21:23:51 +0800 |
---|---|---|
committer | LASER-Yi <[email protected]> | 2022-07-26 21:23:51 +0800 |
commit | af8a14c92bbd79f4a0801bd975b6e9fb08d5fcf0 (patch) | |
tree | 93ed49b84d232e654dc6556ef9d5f05b6860b030 | |
parent | 5624ae431ea6e1d29a0c9fd909949e1021dc1226 (diff) | |
download | bazarr-af8a14c92bbd79f4a0801bd975b6e9fb08d5fcf0.tar.gz bazarr-af8a14c92bbd79f4a0801bd975b6e9fb08d5fcf0.zip |
Fix display issues of the base URL
-rw-r--r-- | frontend/src/pages/Settings/General/index.tsx | 3 | ||||
-rw-r--r-- | frontend/src/pages/Settings/Radarr/index.tsx | 3 | ||||
-rw-r--r-- | frontend/src/pages/Settings/Sonarr/index.tsx | 3 | ||||
-rw-r--r-- | frontend/src/pages/Settings/utilities/modifications.ts | 3 |
4 files changed, 3 insertions, 9 deletions
diff --git a/frontend/src/pages/Settings/General/index.tsx b/frontend/src/pages/Settings/General/index.tsx index 175278dc4..fe101bd2f 100644 --- a/frontend/src/pages/Settings/General/index.tsx +++ b/frontend/src/pages/Settings/General/index.tsx @@ -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> diff --git a/frontend/src/pages/Settings/Radarr/index.tsx b/frontend/src/pages/Settings/Radarr/index.tsx index 41f186a25..497ef7873 100644 --- a/frontend/src/pages/Settings/Radarr/index.tsx +++ b/frontend/src/pages/Settings/Radarr/index.tsx @@ -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> diff --git a/frontend/src/pages/Settings/Sonarr/index.tsx b/frontend/src/pages/Settings/Sonarr/index.tsx index 2f5490392..ef2464fd3 100644 --- a/frontend/src/pages/Settings/Sonarr/index.tsx +++ b/frontend/src/pages/Settings/Sonarr/index.tsx @@ -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> diff --git a/frontend/src/pages/Settings/utilities/modifications.ts b/frontend/src/pages/Settings/utilities/modifications.ts index 61abc4f91..90158cc90 100644 --- a/frontend/src/pages/Settings/utilities/modifications.ts +++ b/frontend/src/pages/Settings/utilities/modifications.ts @@ -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; |