2025-05-23 12:40:47 +05:30
|
|
|
import Box from "@mui/material/Box";
|
|
|
|
|
import Stack from "@mui/material/Stack";
|
|
|
|
|
import Typography from "@mui/material/Typography";
|
|
|
|
|
import ConfigBox from "../../Components/ConfigBox";
|
|
|
|
|
import Select from "../../Components/Inputs/Select";
|
|
|
|
|
|
|
|
|
|
// Utils
|
|
|
|
|
import { useTheme } from "@emotion/react";
|
|
|
|
|
import { PropTypes } from "prop-types";
|
|
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
|
|
2025-05-29 21:01:09 -04:00
|
|
|
const SettingsURL = ({ HEADING_SX, handleChange, showURL = false }) => {
|
2025-05-23 12:40:47 +05:30
|
|
|
const { t } = useTranslation();
|
|
|
|
|
const theme = useTheme();
|
|
|
|
|
return (
|
|
|
|
|
<ConfigBox>
|
|
|
|
|
<Box>
|
2025-07-28 16:28:44 -04:00
|
|
|
<Typography
|
|
|
|
|
component="h1"
|
|
|
|
|
variant="h2"
|
|
|
|
|
>
|
|
|
|
|
{t("settingsPage.urlSettings.title")}
|
|
|
|
|
</Typography>
|
2025-06-24 14:30:14 +08:00
|
|
|
<Typography sx={HEADING_SX}>
|
|
|
|
|
{t("settingsPage.urlSettings.description")}
|
|
|
|
|
</Typography>
|
2025-05-23 12:40:47 +05:30
|
|
|
</Box>
|
|
|
|
|
<Stack gap={theme.spacing(20)}>
|
|
|
|
|
<Select
|
2025-05-26 00:19:49 +05:30
|
|
|
name="showURL"
|
2025-06-24 14:30:14 +08:00
|
|
|
label={t("settingsPage.urlSettings.label")}
|
2025-08-21 23:05:50 -04:00
|
|
|
value={showURL === true}
|
2025-05-23 12:40:47 +05:30
|
|
|
onChange={handleChange}
|
|
|
|
|
items={[
|
2025-06-24 14:30:14 +08:00
|
|
|
{ _id: true, name: t("settingsPage.urlSettings.selectEnabled") },
|
|
|
|
|
{ _id: false, name: t("settingsPage.urlSettings.selectDisabled") },
|
2025-05-23 12:40:47 +05:30
|
|
|
]}
|
|
|
|
|
></Select>
|
|
|
|
|
</Stack>
|
|
|
|
|
</ConfigBox>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
SettingsURL.propTypes = {
|
|
|
|
|
HEADING_SX: PropTypes.object,
|
|
|
|
|
handleChange: PropTypes.func,
|
2025-05-26 00:19:49 +05:30
|
|
|
showURL: PropTypes.bool,
|
2025-05-23 12:40:47 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default SettingsURL;
|