Fixed header and other small styling changes
This commit is contained in:
1 parent
3e5912cf09
commit
b0432c522c
5 files changed
+90
-37
No files matched your search
@@ -652,6 +652,9 @@ function Sidebar() {
|
|||||||
gap: theme.spacing(4),
|
gap: theme.spacing(4),
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
pl: theme.spacing(4),
|
pl: theme.spacing(4),
|
||||||
|
"& svg path": {
|
||||||
|
stroke: theme.palette.other.icon,
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<LogoutSvg />
|
<LogoutSvg />
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
.configure-monitor h1.MuiTypography-root {
|
|
||||||
font-size: var(--env-var-font-size-large-plus);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
.configure-monitor p.MuiTypography-root {
|
|
||||||
font-size: var(--env-var-font-size-medium);
|
|
||||||
}
|
|
||||||
.configure-monitor h1.MuiTypography-root + span.MuiTypography-root {
|
.configure-monitor h1.MuiTypography-root + span.MuiTypography-root {
|
||||||
font-size: var(--env-var-font-size-small-plus);
|
font-size: var(--env-var-font-size-small-plus);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useNavigate, useParams } from "react-router";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Box, Button, Modal, Stack, Typography } from "@mui/material";
|
import { Box, Button, Modal, Stack, Tooltip, Typography } from "@mui/material";
|
||||||
import { monitorValidation } from "../../../Validation/validation";
|
import { monitorValidation } from "../../../Validation/validation";
|
||||||
import { createToast } from "../../../Utils/toastUtils";
|
import { createToast } from "../../../Utils/toastUtils";
|
||||||
import { logger } from "../../../Utils/Logger";
|
import { logger } from "../../../Utils/Logger";
|
||||||
@@ -15,8 +15,8 @@ import {
|
|||||||
deleteUptimeMonitor,
|
deleteUptimeMonitor,
|
||||||
} from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
} from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
||||||
import Field from "../../../Components/Inputs/Field";
|
import Field from "../../../Components/Inputs/Field";
|
||||||
import PauseCircleOutlineIcon from "@mui/icons-material/PauseCircleOutline";
|
import PauseIcon from "../../../assets/icons/pause-icon.svg?react";
|
||||||
import PlayCircleOutlineRoundedIcon from "@mui/icons-material/PlayCircleOutlineRounded";
|
import ResumeIcon from "../../../assets/icons/resume-icon.svg?react";
|
||||||
import Select from "../../../Components/Inputs/Select";
|
import Select from "../../../Components/Inputs/Select";
|
||||||
import Checkbox from "../../../Components/Inputs/Checkbox";
|
import Checkbox from "../../../Components/Inputs/Checkbox";
|
||||||
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
@@ -202,7 +202,7 @@ const Configure = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack className="configure-monitor" gap={theme.spacing(12)}>
|
<Stack className="configure-monitor" gap={theme.spacing(10)}>
|
||||||
{Object.keys(monitor).length === 0 ? (
|
{Object.keys(monitor).length === 0 ? (
|
||||||
<SkeletonLayout />
|
<SkeletonLayout />
|
||||||
) : (
|
) : (
|
||||||
@@ -222,27 +222,74 @@ const Configure = () => {
|
|||||||
flex={1}
|
flex={1}
|
||||||
>
|
>
|
||||||
<Stack direction="row" gap={theme.spacing(2)}>
|
<Stack direction="row" gap={theme.spacing(2)}>
|
||||||
<PulseDot color={statusColor[monitor?.status ?? undefined]} />
|
|
||||||
<Box>
|
<Box>
|
||||||
{parsedUrl?.host ? (
|
|
||||||
<Typography
|
|
||||||
component="h1"
|
|
||||||
mb={theme.spacing(2)}
|
|
||||||
lineHeight={1}
|
|
||||||
color={theme.palette.text.primary}
|
|
||||||
>
|
|
||||||
{parsedUrl.host || "..."}
|
|
||||||
</Typography>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="h1"
|
||||||
lineHeight={theme.spacing(12)}
|
fontSize={22}
|
||||||
sx={{ color: statusColor[monitor?.status ?? undefined] }}
|
fontWeight={500}
|
||||||
|
color={theme.palette.text.primary}
|
||||||
>
|
>
|
||||||
{statusMsg[monitor?.status ?? undefined]}
|
{monitor.name}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
<Stack
|
||||||
|
direction="row"
|
||||||
|
alignItems="center"
|
||||||
|
height="fit-content"
|
||||||
|
gap={theme.spacing(2)}
|
||||||
|
>
|
||||||
|
<Tooltip
|
||||||
|
title={statusMsg[monitor?.status ?? undefined]}
|
||||||
|
disableInteractive
|
||||||
|
slotProps={{
|
||||||
|
popper: {
|
||||||
|
modifiers: [
|
||||||
|
{
|
||||||
|
name: "offset",
|
||||||
|
options: {
|
||||||
|
offset: [0, -8],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Box>
|
||||||
|
<PulseDot
|
||||||
|
color={statusColor[monitor?.status ?? undefined]}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
</Tooltip>
|
||||||
|
<Typography
|
||||||
|
component="h2"
|
||||||
|
fontSize={14.5}
|
||||||
|
color={theme.palette.text.secondary}
|
||||||
|
>
|
||||||
|
{monitor.url?.replace(/^https?:\/\//, "") || "..."}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
position="relative"
|
||||||
|
fontSize={12}
|
||||||
|
color={theme.palette.text.tertiary}
|
||||||
|
ml={theme.spacing(6)}
|
||||||
|
mt={theme.spacing(1)}
|
||||||
|
sx={{
|
||||||
|
"&:before": {
|
||||||
|
position: "absolute",
|
||||||
|
content: `""`,
|
||||||
|
width: 4,
|
||||||
|
height: 4,
|
||||||
|
borderRadius: "50%",
|
||||||
|
backgroundColor: theme.palette.text.tertiary,
|
||||||
|
opacity: 0.8,
|
||||||
|
left: -10,
|
||||||
|
top: "50%",
|
||||||
|
transform: "translateY(-50%)",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Editting...
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
@@ -255,24 +302,29 @@ const Configure = () => {
|
|||||||
color="secondary"
|
color="secondary"
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
sx={{
|
sx={{
|
||||||
border: "none",
|
pl: theme.spacing(4),
|
||||||
backgroundColor: theme.palette.background.main,
|
pr: theme.spacing(6),
|
||||||
px: theme.spacing(5),
|
|
||||||
mr: theme.spacing(6),
|
mr: theme.spacing(6),
|
||||||
"& svg": {
|
"& svg": {
|
||||||
mr: theme.spacing(2),
|
mr: theme.spacing(2),
|
||||||
|
width: 22,
|
||||||
|
height: 22,
|
||||||
|
"& path": {
|
||||||
|
stroke: theme.palette.text.tertiary,
|
||||||
|
strokeWidth: 1.7,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
onClick={handlePause}
|
onClick={handlePause}
|
||||||
>
|
>
|
||||||
{monitor?.isActive ? (
|
{monitor?.isActive ? (
|
||||||
<>
|
<>
|
||||||
<PauseCircleOutlineIcon />
|
<PauseIcon />
|
||||||
Pause
|
Pause
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<PlayCircleOutlineRoundedIcon />
|
<ResumeIcon />
|
||||||
Resume
|
Resume
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import { networkService } from "../../../main";
|
|||||||
import { logger } from "../../../Utils/Logger";
|
import { logger } from "../../../Utils/Logger";
|
||||||
import {
|
import {
|
||||||
formatDate,
|
formatDate,
|
||||||
formatDuration,
|
|
||||||
formatDurationRounded,
|
formatDurationRounded,
|
||||||
formatDurationSplit,
|
formatDurationSplit,
|
||||||
} from "../../../Utils/timeUtils";
|
} from "../../../Utils/timeUtils";
|
||||||
@@ -158,7 +157,8 @@ const DetailsPage = ({ isAdmin }) => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
alignItems="flex-end"
|
alignItems="center"
|
||||||
|
height="fit-content"
|
||||||
gap={theme.spacing(2)}
|
gap={theme.spacing(2)}
|
||||||
>
|
>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
@@ -185,13 +185,14 @@ const DetailsPage = ({ isAdmin }) => {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Typography
|
<Typography
|
||||||
component="h2"
|
component="h2"
|
||||||
|
fontSize={14.5}
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.text.secondary}
|
||||||
>
|
>
|
||||||
{monitor.url?.replace(/^https?:\/\//, "") || "..."}
|
{monitor.url?.replace(/^https?:\/\//, "") || "..."}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
|
mt={theme.spacing(1)}
|
||||||
ml={theme.spacing(6)}
|
ml={theme.spacing(6)}
|
||||||
lineHeight="20px"
|
|
||||||
fontSize={12}
|
fontSize={12}
|
||||||
position="relative"
|
position="relative"
|
||||||
color={theme.palette.text.tertiary}
|
color={theme.palette.text.tertiary}
|
||||||
@@ -205,7 +206,8 @@ const DetailsPage = ({ isAdmin }) => {
|
|||||||
backgroundColor: theme.palette.text.tertiary,
|
backgroundColor: theme.palette.text.tertiary,
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
left: -9,
|
left: -9,
|
||||||
top: "42%",
|
top: "50%",
|
||||||
|
transform: "translateY(-50%)",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -32,4 +32,7 @@ export const ConfigBox = styled(Stack)(({ theme }) => ({
|
|||||||
"& h3, & p": {
|
"& h3, & p": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.text.tertiary,
|
||||||
},
|
},
|
||||||
|
"& p": {
|
||||||
|
fontSize: 13,
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
Reference in new issue
Block a user