diff --git a/Client/src/Pages/Monitors/Configure/index.css b/Client/src/Pages/Monitors/Configure/index.css index 1f46d12d3..23b6af57a 100644 --- a/Client/src/Pages/Monitors/Configure/index.css +++ b/Client/src/Pages/Monitors/Configure/index.css @@ -1,52 +1,17 @@ .configure-monitor h1.MuiTypography-root { font-size: var(--env-var-font-size-large-plus); - color: var(--primary-color); font-weight: 600; } -.configure-monitor h2.MuiTypography-root { - font-size: var(--env-var-font-size-large); - font-weight: 600; -} -.configure-monitor h2.MuiTypography-root, -.configure-monitor .config-box p.MuiTypography-root, -.configure-monitor .MuiSelect-select { - color: var(--secondary-color); -} -.configure-monitor .MuiModal-root h2.MuiTypography-root { - color: var(--primary-color); -} -.configure-monitor p.MuiTypography-root, -.configure-monitor .MuiSelect-select { +.configure-monitor p.MuiTypography-root { font-size: var(--env-var-font-size-medium); } -.configure-monitor h6.MuiTypography-root { - opacity: 0.6; -} -.configure-monitor h6.MuiTypography-root, .configure-monitor h1.MuiTypography-root + span.MuiTypography-root { font-size: var(--env-var-font-size-small-plus); } -.configure-monitor button.MuiButtonBase-root { - font-size: var(--env-var-font-size-medium); -} .configure-monitor button.MuiButtonBase-root { height: var(--env-var-height-2); } -.configure-monitor .config-box { - border: 1px solid var(--border-color); - border-radius: var(--env-var-radius-1); - background-color: var(--primary-bg); -} -.configure-monitor .config-box > .MuiBox-root, -.configure-monitor .config-box > .MuiStack-root { - flex: 1; - padding: 24px 30px; - padding-bottom: 40px; -} -.configure-monitor .config-box > *:first-child { - flex: 0.7; - border-right: solid 1px var(--border-color); -} + .configure-monitor .MuiStack-root:has(span.MuiTypography-root.input-error) { position: relative; } @@ -54,25 +19,3 @@ position: absolute; top: 100%; } -.configure-monitor .MuiInputBase-root:has(> .Mui-disabled) { - background-color: var(--primary-bg-accent); -} - -.MuiInputBase-root:has(#monitor-interval) { - height: 34px; - width: 100%; -} -#monitor-interval { - padding: 0 10px; - height: 100%; - display: flex; - align-items: center; -} -.MuiInputBase-root:not(.Mui-focused):has(#monitor-interval):hover fieldset { - border-color: var(--border-color-dark); -} - -body:has(.configure-monitor) .select-dropdown .MuiMenuItem-root, -.configure-monitor .select-wrapper .select-component > .MuiSelect-select { - text-transform: lowercase; -} diff --git a/Client/src/Pages/Monitors/Configure/index.jsx b/Client/src/Pages/Monitors/Configure/index.jsx index 2bf3a4d5b..3a546c582 100644 --- a/Client/src/Pages/Monitors/Configure/index.jsx +++ b/Client/src/Pages/Monitors/Configure/index.jsx @@ -6,6 +6,7 @@ import { Box, Modal, Skeleton, Stack, Typography } from "@mui/material"; import { monitorValidation } from "../../../Validation/validation"; import { createToast } from "../../../Utils/toastUtils"; import { logger } from "../../../Utils/Logger"; +import { ConfigBox } from "../styled"; import { updateUptimeMonitor, getUptimeMonitorsByTeamId, @@ -45,8 +46,8 @@ const SkeletonLayout = () => { return ( <> - - + + { variant="rounded" width="50%" height={24} - sx={{ mb: theme.gap.small }} + sx={{ mb: theme.spacing(4) }} /> { let loading = Object.keys(monitor).length === 0; return ( - + {loading ? ( ) : ( @@ -225,20 +226,25 @@ const Configure = () => { component="form" noValidate spellCheck="false" - gap={theme.gap.large} + gap={theme.spacing(12)} flex={1} > - + {parsedUrl?.host ? ( - + {parsedUrl.host || "..."} ) : ( @@ -246,11 +252,11 @@ const Configure = () => { )} Your site is {monitor?.status ? "up" : "down"}. @@ -268,12 +274,12 @@ const Configure = () => { animate="rotate180" img={} sx={{ - backgroundColor: theme.palette.otherColors.fillGray, - pl: theme.gap.small, - pr: theme.gap.medium, - mr: theme.gap.medium, + backgroundColor: theme.palette.background.main, + pl: theme.spacing(4), + pr: theme.spacing(6), + mr: theme.spacing(6), "& svg": { - mr: theme.gap.xs, + mr: theme.spacing(2), }, }} /> @@ -282,25 +288,21 @@ const Configure = () => { label="Remove" sx={{ boxShadow: "none", - px: theme.gap.ml, + px: theme.spacing(8), }} onClick={() => setIsOpen(true)} /> - + General settings - + Here you can select the URL of the host, together with the type of monitor. - + { error={errors["name"]} /> - - + + Incident notifications - + When there is an incident, notify users. - - + + When there is a new incident, { {monitor?.notifications?.some( (notification) => notification.type === "emails" ) ? ( - + { value="" onChange={() => logger.warn("disabled")} /> - + You can separate multiple emails with a comma @@ -384,16 +382,12 @@ const Configure = () => { "" )} - - + + Advanced settings - + { onChange={(event) => handleChange(event, "interval")} items={frequencies} /> - {/* TODO */} - {/* - handleChange(event, "retries", setAdvancedSettings) - } - /> - - handleChange(event, "codes", setAdvancedSettings) - } - /> - - handleChange(event, "redirects", setAdvancedSettings) - } - /> */} - - {/* TODO */} - {/* - -
Proxy settings
- - } - rightLayout={ -
- handleCheck("enabled", setProxy)} - /> - handleChange(event, "protocol", setProxy)} - /> - handleChange(event, "address", setProxy)} - /> - handleChange(event, "proxy_port", setProxy)} - /> -
- } - /> */} +