mirror of https://github.com/morpheus65535/bazarr
chore: apply prettier
This commit is contained in:
parent
8ee8954e9d
commit
3d43f425f2
|
@ -41,14 +41,19 @@ import { SettingsProvider, useSettings } from "../utilities/SettingsProvider";
|
|||
import { useSettingValue } from "../utilities/hooks";
|
||||
import { ProviderInfo } from "./list";
|
||||
|
||||
type SettingsKey = "settings-general-enabled_providers" | "settings-general-enabled_integrations";
|
||||
type SettingsKey =
|
||||
| "settings-general-enabled_providers"
|
||||
| "settings-general-enabled_integrations";
|
||||
|
||||
interface ProviderViewProps {
|
||||
availableOptions: Readonly<ProviderInfo[]>
|
||||
settingsKey: SettingsKey
|
||||
availableOptions: Readonly<ProviderInfo[]>;
|
||||
settingsKey: SettingsKey;
|
||||
}
|
||||
|
||||
export const ProviderView: FunctionComponent<ProviderViewProps> = ({ availableOptions, settingsKey }) => {
|
||||
export const ProviderView: FunctionComponent<ProviderViewProps> = ({
|
||||
availableOptions,
|
||||
settingsKey,
|
||||
}) => {
|
||||
const settings = useSettings();
|
||||
const staged = useStagedValues();
|
||||
const providers = useSettingValue<string[]>(settingsKey);
|
||||
|
@ -71,7 +76,15 @@ export const ProviderView: FunctionComponent<ProviderViewProps> = ({ availableOp
|
|||
});
|
||||
}
|
||||
},
|
||||
[modals, providers, settings, staged, update, availableOptions, settingsKey],
|
||||
[
|
||||
modals,
|
||||
providers,
|
||||
settings,
|
||||
staged,
|
||||
update,
|
||||
availableOptions,
|
||||
settingsKey,
|
||||
],
|
||||
);
|
||||
|
||||
const cards = useMemo(() => {
|
||||
|
|
|
@ -17,8 +17,10 @@ const SettingsProvidersView: FunctionComponent = () => {
|
|||
return (
|
||||
<Layout name="Providers">
|
||||
<Section header="Providers">
|
||||
<ProviderView availableOptions={ProviderList} settingsKey="settings-general-enabled_providers">
|
||||
</ProviderView>
|
||||
<ProviderView
|
||||
availableOptions={ProviderList}
|
||||
settingsKey="settings-general-enabled_providers"
|
||||
></ProviderView>
|
||||
</Section>
|
||||
<Section header="Anti-Captcha Options">
|
||||
<Selector
|
||||
|
@ -60,9 +62,11 @@ const SettingsProvidersView: FunctionComponent = () => {
|
|||
<Message>Link to subscribe</Message>
|
||||
</CollapseBox>
|
||||
</Section>
|
||||
<Section header="Integrations">
|
||||
<ProviderView availableOptions={IntegrationList} settingsKey="settings-general-enabled_integrations">
|
||||
</ProviderView>
|
||||
<Section header="Integrations">
|
||||
<ProviderView
|
||||
availableOptions={IntegrationList}
|
||||
settingsKey="settings-general-enabled_integrations"
|
||||
></ProviderView>
|
||||
</Section>
|
||||
</Layout>
|
||||
);
|
||||
|
|
|
@ -67,7 +67,8 @@ export const ProviderList: Readonly<ProviderInfo[]> = [
|
|||
{
|
||||
key: "animetosho",
|
||||
name: "Anime Tosho",
|
||||
description: "Anime Tosho is a free, completely automated service which mirrors most torrents posted on TokyoTosho's anime category, Nyaa.si's English translated anime category and AniDex's anime category.",
|
||||
description:
|
||||
"Anime Tosho is a free, completely automated service which mirrors most torrents posted on TokyoTosho's anime category, Nyaa.si's English translated anime category and AniDex's anime category.",
|
||||
inputs: [
|
||||
{
|
||||
type: "text",
|
||||
|
@ -553,21 +554,22 @@ export const ProviderList: Readonly<ProviderInfo[]> = [
|
|||
];
|
||||
|
||||
export const IntegrationList: Readonly<ProviderInfo[]> = [
|
||||
{
|
||||
{
|
||||
key: "anidb",
|
||||
name: "AniDB",
|
||||
description: "AniDB is non-profit database of anime information that is freely open to the public.",
|
||||
description:
|
||||
"AniDB is non-profit database of anime information that is freely open to the public.",
|
||||
inputs: [
|
||||
{
|
||||
type: "text",
|
||||
key: "api_client",
|
||||
name: "API Client"
|
||||
name: "API Client",
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
key: "api_client_ver",
|
||||
name: "API Client Version"
|
||||
name: "API Client Version",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue