diff options
author | JayZed <[email protected]> | 2024-07-08 17:33:43 -0400 |
---|---|---|
committer | JayZed <[email protected]> | 2024-07-08 17:33:43 -0400 |
commit | 4cc6806193127f9d6d3f2dab26969471d9bbf159 (patch) | |
tree | bfc90e4b55fa0f48f83e51c4e5947c1f7d7d7a2d /frontend/src/pages/Settings/General/index.tsx | |
parent | d875dc7733c901246881325ee3a84fe5d44b10b9 (diff) | |
parent | 5886c20c9c7929bf46836a99c2d9d4eb834638bd (diff) | |
download | bazarr-4cc6806193127f9d6d3f2dab26969471d9bbf159.tar.gz bazarr-4cc6806193127f9d6d3f2dab26969471d9bbf159.zip |
Merge branch 'development' of https://github.com/morpheus65535/bazarr into development
Diffstat (limited to 'frontend/src/pages/Settings/General/index.tsx')
-rw-r--r-- | frontend/src/pages/Settings/General/index.tsx | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/frontend/src/pages/Settings/General/index.tsx b/frontend/src/pages/Settings/General/index.tsx index 8cc5ea8c3..312d09d1f 100644 --- a/frontend/src/pages/Settings/General/index.tsx +++ b/frontend/src/pages/Settings/General/index.tsx @@ -1,12 +1,11 @@ -import { Environment, toggleState } from "@/utilities"; +import { FunctionComponent, useState } from "react"; +import { Box, Group as MantineGroup, Text as MantineText } from "@mantine/core"; +import { useClipboard } from "@mantine/hooks"; 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, @@ -20,7 +19,8 @@ import { Section, Selector, Text, -} from "../components"; +} from "@/pages/Settings/components"; +import { Environment, toggleState } from "@/utilities"; import { branchOptions, proxyOptions, securityOptions } from "./options"; const characters = "abcdef0123456789"; @@ -54,7 +54,7 @@ const SettingsGeneralView: FunctionComponent = () => { ></Number> <Text label="Base URL" - icon="/" + leftSection="/" settingKey="settings-general-base_url" settingOptions={{ onLoaded: (s) => s.general.base_url?.slice(1) ?? "", @@ -87,15 +87,14 @@ const SettingsGeneralView: FunctionComponent = () => { rightSectionWidth={95} rightSectionProps={{ style: { justifyContent: "flex-end" } }} rightSection={ - <MantineGroup spacing="xs" mx="xs" position="right"> + <MantineGroup gap="xs" mx="xs" justify="right"> { // Clipboard API is only available in secure contexts See: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API#interfaces window.isSecureContext && ( <Action label="Copy API Key" - variant="light" settingKey={settingApiKey} - color={copied ? "green" : undefined} + c={copied ? "green" : undefined} icon={copied ? faCheck : faClipboard} onClick={(update, value) => { if (value) { @@ -108,9 +107,8 @@ const SettingsGeneralView: FunctionComponent = () => { } <Action label="Regenerate" - variant="light" settingKey={settingApiKey} - color="red" + c="red" icon={faSync} onClick={(update) => { update(generateApiKey()); @@ -204,13 +202,12 @@ const SettingsGeneralView: FunctionComponent = () => { <Number label="Retention" settingKey="settings-backup-retention" - styles={{ - rightSection: { width: "4rem", justifyContent: "flex-end" }, - }} rightSection={ - <MantineText size="xs" px="sm" color="dimmed"> - Days - </MantineText> + <Box w="4rem" style={{ justifyContent: "flex-end" }}> + <MantineText size="xs" px="sm" c="dimmed"> + Days + </MantineText> + </Box> } ></Number> </Section> |