Added breadcrumbs to create and configure pagespeed
This commit is contained in:
1 parent
14cf13fd82
commit
705eff338d
5 files changed
+44
-61
No files matched your search
@@ -146,7 +146,7 @@ const CreateMonitor = () => {
|
|||||||
<Breadcrumbs
|
<Breadcrumbs
|
||||||
list={[
|
list={[
|
||||||
{ name: "monitors", path: "/monitors" },
|
{ name: "monitors", path: "/monitors" },
|
||||||
{ name: "details", path: `/monitors/create` },
|
{ name: "create", path: `/monitors/create` },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<Stack
|
<Stack
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
background-color: var(--env-var-color-8);
|
background-color: var(--env-var-color-8);
|
||||||
border: solid 1px var(--env-var-color-6);
|
border: solid 1px var(--env-var-color-6);
|
||||||
border-radius: var(--env-var-radius-1);
|
border-radius: var(--env-var-radius-1);
|
||||||
padding: var(--env-var-default-2);
|
padding: var(--env-var-font-size-large-plus) var(--env-var-font-size-xlarge);
|
||||||
}
|
}
|
||||||
.configure-pagespeed h1.MuiTypography-root {
|
.configure-pagespeed h1.MuiTypography-root {
|
||||||
font-size: var(--env-var-font-size-large-plus);
|
font-size: var(--env-var-font-size-large-plus);
|
||||||
@@ -60,9 +60,12 @@ body:has(.configure-pagespeed) .select-dropdown .MuiMenuItem-root,
|
|||||||
text-transform: lowercase;
|
text-transform: lowercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.configure-pagespeed h3.MuiTypography-root {
|
||||||
|
flex: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
.configure-pagespeed .field,
|
.configure-pagespeed .field,
|
||||||
.configure-pagespeed .section-disabled,
|
.configure-pagespeed .section-disabled,
|
||||||
.configure-pagespeed .select-wrapper,
|
.configure-pagespeed .select-wrapper {
|
||||||
.configure-pagespeed h3.MuiTypography-root {
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
@@ -20,6 +20,7 @@ import GreenCheck from "../../../assets/icons/checkbox-green.svg?react";
|
|||||||
import RedCheck from "../../../assets/icons/checkbox-red.svg?react";
|
import RedCheck from "../../../assets/icons/checkbox-red.svg?react";
|
||||||
|
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders a skeleton layout.
|
* Renders a skeleton layout.
|
||||||
@@ -147,37 +148,25 @@ const PageSpeedConfigure = () => {
|
|||||||
let loading = Object.keys(monitor).length === 0;
|
let loading = Object.keys(monitor).length === 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box className="configure-pagespeed">
|
<Stack className="configure-pagespeed" gap={theme.gap.large}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<SkeletonLayout />
|
<SkeletonLayout />
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Breadcrumbs
|
||||||
level="tertiary"
|
list={[
|
||||||
label="Back"
|
{ name: "pagespeed", path: "/pagespeed" },
|
||||||
animate="slideLeft"
|
{ name: "details", path: `/pagespeed/${monitorId}` },
|
||||||
img={<WestRoundedIcon />}
|
{ name: "configure", path: `/pagespeed/configure/${monitorId}` },
|
||||||
onClick={() => navigate(-1)}
|
]}
|
||||||
sx={{
|
|
||||||
backgroundColor: theme.palette.otherColors.fillGray,
|
|
||||||
mb: theme.gap.large,
|
|
||||||
px: theme.gap.ml,
|
|
||||||
"& svg.MuiSvgIcon-root": {
|
|
||||||
mr: theme.gap.small,
|
|
||||||
fill: theme.palette.otherColors.slateGray,
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
<form
|
<Stack
|
||||||
|
component="form"
|
||||||
noValidate
|
noValidate
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
onSubmit={handleSave}
|
onSubmit={handleSave}
|
||||||
style={{
|
flex={1}
|
||||||
display: "flex",
|
gap={theme.gap.large}
|
||||||
flexDirection: "column",
|
|
||||||
gap: theme.gap.large,
|
|
||||||
maxWidth: "1000px",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Stack direction="row" gap={theme.gap.small}>
|
<Stack direction="row" gap={theme.gap.small}>
|
||||||
{monitor?.status ? <GreenCheck /> : <RedCheck />}
|
{monitor?.status ? <GreenCheck /> : <RedCheck />}
|
||||||
@@ -300,7 +289,7 @@ const PageSpeedConfigure = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack direction="row" justifyContent="flex-end">
|
<Stack direction="row" justifyContent="flex-end" mt="auto">
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
level="primary"
|
level="primary"
|
||||||
@@ -309,7 +298,7 @@ const PageSpeedConfigure = () => {
|
|||||||
sx={{ px: theme.gap.large, mt: theme.gap.large }}
|
sx={{ px: theme.gap.large, mt: theme.gap.large }}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</form>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<Modal
|
<Modal
|
||||||
@@ -358,7 +347,7 @@ const PageSpeedConfigure = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Modal>
|
</Modal>
|
||||||
</Box>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
background-color: var(--env-var-color-8);
|
background-color: var(--env-var-color-8);
|
||||||
border: solid 1px var(--env-var-color-6);
|
border: solid 1px var(--env-var-color-6);
|
||||||
border-radius: var(--env-var-radius-1);
|
border-radius: var(--env-var-radius-1);
|
||||||
padding: var(--env-var-default-2);
|
padding: var(--env-var-font-size-large-plus) var(--env-var-font-size-xlarge);
|
||||||
}
|
}
|
||||||
.create-page-speed h1.MuiTypography-root {
|
.create-page-speed h1.MuiTypography-root {
|
||||||
font-size: var(--env-var-font-size-large);
|
font-size: 22px;
|
||||||
color: var(--env-var-color-1);
|
color: var(--env-var-color-1);
|
||||||
}
|
}
|
||||||
.create-page-speed p.MuiTypography-root,
|
.create-page-speed p.MuiTypography-root,
|
||||||
@@ -50,9 +50,12 @@ body:has(.create-page-speed) .select-dropdown .MuiMenuItem-root,
|
|||||||
text-transform: lowercase;
|
text-transform: lowercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.create-page-speed h3.MuiTypography-root {
|
||||||
|
flex: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
.create-page-speed .field,
|
.create-page-speed .field,
|
||||||
.create-page-speed .section-disabled,
|
.create-page-speed .section-disabled,
|
||||||
.create-page-speed .select-wrapper,
|
.create-page-speed .select-wrapper {
|
||||||
.create-page-speed h3.MuiTypography-root {
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,7 @@ import Checkbox from "../../../Components/Inputs/Checkbox";
|
|||||||
import { monitorValidation } from "../../../Validation/validation";
|
import { monitorValidation } from "../../../Validation/validation";
|
||||||
import { createToast } from "../../../Utils/toastUtils";
|
import { createToast } from "../../../Utils/toastUtils";
|
||||||
import { createPageSpeed } from "../../../Features/PageSpeedMonitor/pageSpeedMonitorSlice";
|
import { createPageSpeed } from "../../../Features/PageSpeedMonitor/pageSpeedMonitorSlice";
|
||||||
import WestRoundedIcon from "@mui/icons-material/WestRounded";
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
|
||||||
const CreatePageSpeed = () => {
|
const CreatePageSpeed = () => {
|
||||||
@@ -97,34 +97,22 @@ const CreatePageSpeed = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box className="create-page-speed">
|
<Stack className="create-page-speed" gap={theme.gap.mlplus}>
|
||||||
<Button
|
<Breadcrumbs
|
||||||
level="tertiary"
|
list={[
|
||||||
label="Back"
|
{ name: "pagespeed", path: "/pagespeed" },
|
||||||
animate="slideLeft"
|
{ name: "create", path: `/pagespeed/create` },
|
||||||
img={<WestRoundedIcon />}
|
]}
|
||||||
onClick={() => navigate("/pagespeed")}
|
|
||||||
sx={{
|
|
||||||
backgroundColor: theme.palette.otherColors.fillGray,
|
|
||||||
mb: theme.gap.medium,
|
|
||||||
px: theme.gap.ml,
|
|
||||||
"& svg.MuiSvgIcon-root": {
|
|
||||||
mr: theme.gap.small,
|
|
||||||
fill: theme.palette.otherColors.slateGray,
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
<form
|
<Stack
|
||||||
|
component="form"
|
||||||
noValidate
|
noValidate
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
onSubmit={handleCreate}
|
onSubmit={handleCreate}
|
||||||
style={{
|
gap={theme.gap.large}
|
||||||
display: "flex",
|
flex={1}
|
||||||
flexDirection: "column",
|
|
||||||
gap: theme.gap.large,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Typography component="h1">Create a page speed monitor</Typography>
|
<Typography component="h1">Create pagespeed monitor</Typography>
|
||||||
<Stack gap={theme.gap.xl}>
|
<Stack gap={theme.gap.xl}>
|
||||||
<Stack direction="row">
|
<Stack direction="row">
|
||||||
<Typography component="h3">Monitor friendly name</Typography>
|
<Typography component="h3">Monitor friendly name</Typography>
|
||||||
@@ -197,7 +185,7 @@ const CreatePageSpeed = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack direction="row" justifyContent="flex-end">
|
<Stack direction="row" justifyContent="flex-end" mt="auto">
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
level="primary"
|
level="primary"
|
||||||
@@ -206,8 +194,8 @@ const CreatePageSpeed = () => {
|
|||||||
sx={{ px: theme.gap.large, mt: theme.gap.large }}
|
sx={{ px: theme.gap.large, mt: theme.gap.large }}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</form>
|
</Stack>
|
||||||
</Box>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user