import { Environment, toggleState } from "@/utilities"; import { faCheck, faClipboard, faSync, } from "@fortawesome/free-solid-svg-icons"; import { Group as MantineGroup, Text as MantineText } from "@mantine/core"; import { useClipboard } from "@mantine/hooks"; import { FunctionComponent, useState } from "react"; import { Action, Check, Chips, CollapseBox, File, Layout, Message, Number, Password, Section, Selector, Text, } from "../components"; import { branchOptions, proxyOptions, securityOptions } from "./options"; const characters = "abcdef0123456789"; const settingApiKey = "settings-auth-apikey"; const generateApiKey = () => { return Array(32) .fill(null) .map(() => characters.charAt(Math.floor(Math.random() * characters.length))) .join(""); }; const baseUrlOverride = (settings: Settings) => settings.general.base_url?.slice(1) ?? ""; const SettingsGeneralView: FunctionComponent = () => { const [copied, setCopy] = useState(false); const clipboard = useClipboard(); return (
Valid IPv4 address or '0.0.0.0' for all interfaces "/" + v} > Reverse proxy support
(v === null ? "None" : v)} > { if (value) { clipboard.copy(value); toggleState(setCopy, 1500); } }} > { update(generateApiKey()); }} > } settingKey={settingApiKey} >
(v === null ? "None" : v)} > k !== null && k !== "None"} > You only need to enter a username and password if one is required. Leave them blank otherwise List of excluded domains or IP addresses. Asterisk(wildcard), regex and CIDR are unsupported. You can use '.domain.com' to include all subdomains.
Debug logging should only be enabled temporarily
Absolute path to the backup directory Days } >
Send anonymous usage information, nothing that can identify you. This includes information on which providers you use, what languages you search for, Bazarr, Python, Sonarr, Radarr and what OS version you are using. We will use this information to prioritize features and bug fixes. Please, keep this enabled as this is the only way we have to better understand how you use Bazarr.
); }; export default SettingsGeneralView;