feat: updating texts
This commit is contained in:
1 parent
36bbf5aba0
commit
db86753701
54 files changed
+530
-341
No files matched your search
@@ -251,7 +251,7 @@ const BasicTable = ({ data, paginated, reversed, table, emptyMessage = "No data"
|
|||||||
px={theme.spacing(4)}
|
px={theme.spacing(4)}
|
||||||
sx={{
|
sx={{
|
||||||
"& p": {
|
"& p": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -305,9 +305,9 @@ const BasicTable = ({ data, paginated, reversed, table, emptyMessage = "No data"
|
|||||||
}}
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
mt: theme.spacing(6),
|
mt: theme.spacing(6),
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.primary.contrastText.secondary,
|
||||||
"& svg path": {
|
"& svg path": {
|
||||||
stroke: theme.palette.text.tertiary,
|
stroke: theme.palette.primary.contrastText.tertiary,
|
||||||
strokeWidth: 1.3,
|
strokeWidth: 1.3,
|
||||||
},
|
},
|
||||||
"& .MuiSelect-select": {
|
"& .MuiSelect-select": {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ const Breadcrumbs = ({ list }) => {
|
|||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
textTransform: "capitalize",
|
textTransform: "capitalize",
|
||||||
"&, &:hover": {
|
"&, &:hover": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -124,12 +124,12 @@ const BarChart = ({ checks = [] }) => {
|
|||||||
},
|
},
|
||||||
"& .MuiTooltip-tooltip p": {
|
"& .MuiTooltip-tooltip p": {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
},
|
},
|
||||||
"& .MuiTooltip-tooltip span": {
|
"& .MuiTooltip-tooltip span": {
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ const CustomToolTip = ({ active, payload, label }) => {
|
|||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
}}
|
}}
|
||||||
@@ -58,7 +58,7 @@ const CustomToolTip = ({ active, payload, label }) => {
|
|||||||
ml={theme.spacing(3)}
|
ml={theme.spacing(3)}
|
||||||
sx={{
|
sx={{
|
||||||
"& span": {
|
"& span": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
},
|
},
|
||||||
@@ -114,7 +114,7 @@ const CustomTick = ({ x, y, payload, index }) => {
|
|||||||
x={x}
|
x={x}
|
||||||
y={y + 10}
|
y={y + 10}
|
||||||
textAnchor="middle"
|
textAnchor="middle"
|
||||||
fill={theme.palette.text.tertiary}
|
fill={theme.palette.primary.contrastText.tertiary}
|
||||||
fontSize={11}
|
fontSize={11}
|
||||||
fontWeight={400}
|
fontWeight={400}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export const TzTick = ({ x, y, payload, index }) => {
|
|||||||
x={x}
|
x={x}
|
||||||
y={y + 10}
|
y={y + 10}
|
||||||
textAnchor="middle"
|
textAnchor="middle"
|
||||||
fill={theme.palette.text.tertiary}
|
fill={theme.palette.primary.contrastText.tertiary}
|
||||||
fontSize={11}
|
fontSize={11}
|
||||||
fontWeight={400}
|
fontWeight={400}
|
||||||
>
|
>
|
||||||
@@ -57,7 +57,7 @@ export const PercentTick = ({ x, y, payload, index }) => {
|
|||||||
x={x - 20}
|
x={x - 20}
|
||||||
y={y}
|
y={y}
|
||||||
textAnchor="middle"
|
textAnchor="middle"
|
||||||
fill={theme.palette.text.tertiary}
|
fill={theme.palette.primary.contrastText.tertiary}
|
||||||
fontSize={11}
|
fontSize={11}
|
||||||
fontWeight={400}
|
fontWeight={400}
|
||||||
>
|
>
|
||||||
@@ -128,7 +128,7 @@ export const InfrastructureTooltip = ({
|
|||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
}}
|
}}
|
||||||
@@ -150,7 +150,7 @@ export const InfrastructureTooltip = ({
|
|||||||
ml={theme.spacing(3)}
|
ml={theme.spacing(3)}
|
||||||
sx={{
|
sx={{
|
||||||
"& span": {
|
"& span": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
},
|
},
|
||||||
@@ -208,7 +208,7 @@ export const TemperatureTooltip = ({ active, payload, label, keys, dotColor }) =
|
|||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
}}
|
}}
|
||||||
@@ -227,7 +227,7 @@ export const TemperatureTooltip = ({ active, payload, label, keys, dotColor }) =
|
|||||||
ml={theme.spacing(3)}
|
ml={theme.spacing(3)}
|
||||||
sx={{
|
sx={{
|
||||||
"& span": {
|
"& span": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -49,7 +49,10 @@ const Check = ({ text, noHighlightText, variant = "info", outlined = false }) =>
|
|||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="span"
|
||||||
sx={{
|
sx={{
|
||||||
color: variant === "info" ? theme.palette.text.tertiary : colors[variant],
|
color:
|
||||||
|
variant === "info"
|
||||||
|
? theme.palette.primary.contrastText.tertiary
|
||||||
|
: colors[variant],
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ const ConfigBox = styled(Stack)(({ theme }) => ({
|
|||||||
paddingLeft: theme.spacing(18),
|
paddingLeft: theme.spacing(18),
|
||||||
},
|
},
|
||||||
"& h1, & h2": {
|
"& h1, & h2": {
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.primary.contrastText.secondary,
|
||||||
},
|
},
|
||||||
"& p": {
|
"& p": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const GenericDialog = ({ title, description, open, onClose, theme, children }) =
|
|||||||
id={titleId}
|
id={titleId}
|
||||||
component="h2"
|
component="h2"
|
||||||
fontSize={16}
|
fontSize={16}
|
||||||
color={theme.palette.text.primary}
|
color={theme.palette.primary.contrastText.main}
|
||||||
fontWeight={600}
|
fontWeight={600}
|
||||||
>
|
>
|
||||||
{title}
|
{title}
|
||||||
@@ -45,7 +45,7 @@ const GenericDialog = ({ title, description, open, onClose, theme, children }) =
|
|||||||
{description && (
|
{description && (
|
||||||
<Typography
|
<Typography
|
||||||
id={descriptionId}
|
id={descriptionId}
|
||||||
color={theme.palette.text.tertiary}
|
color={theme.palette.primary.contrastText.tertiary}
|
||||||
>
|
>
|
||||||
{description}
|
{description}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false }) =>
|
|||||||
<Typography
|
<Typography
|
||||||
component="h1"
|
component="h1"
|
||||||
marginY={theme.spacing(4)}
|
marginY={theme.spacing(4)}
|
||||||
color={theme.palette.text.tertiary}
|
color={theme.palette.primary.contrastText.tertiary}
|
||||||
>
|
>
|
||||||
{vowelStart ? "An" : "A"} {title} is used to:
|
{vowelStart ? "An" : "A"} {title} is used to:
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ const IconBox = styled(Box)(
|
|||||||
width: svgWidth,
|
width: svgWidth,
|
||||||
height: svgHeight,
|
height: svgHeight,
|
||||||
"& path": {
|
"& path": {
|
||||||
stroke: theme.palette.text.tertiary,
|
stroke: theme.palette.primary.contrastText.tertiary,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -94,10 +94,10 @@ const Checkbox = ({
|
|||||||
},
|
},
|
||||||
"& span.MuiTypography-root": {
|
"& span.MuiTypography-root": {
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
},
|
},
|
||||||
".MuiFormControlLabel-label.Mui-disabled": {
|
".MuiFormControlLabel-label.Mui-disabled": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
opacity: 0.25,
|
opacity: 0.25,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ const ImageField = ({ id, src, loading, onChange }) => {
|
|||||||
</IconButton>
|
</IconButton>
|
||||||
<Typography
|
<Typography
|
||||||
component="h2"
|
component="h2"
|
||||||
color={theme.palette.text.tertiary}
|
color={theme.palette.primary.contrastText.tertiary}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="span"
|
||||||
@@ -108,7 +108,7 @@ const ImageField = ({ id, src, loading, onChange }) => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
component="p"
|
component="p"
|
||||||
color={theme.palette.text.tertiary}
|
color={theme.palette.primary.contrastText.tertiary}
|
||||||
sx={{ opacity: 0.6 }}
|
sx={{ opacity: 0.6 }}
|
||||||
>
|
>
|
||||||
(maximum size: 3MB)
|
(maximum size: 3MB)
|
||||||
@@ -117,7 +117,7 @@ const ImageField = ({ id, src, loading, onChange }) => {
|
|||||||
</Box>
|
</Box>
|
||||||
<Typography
|
<Typography
|
||||||
component="p"
|
component="p"
|
||||||
color={theme.palette.text.tertiary}
|
color={theme.palette.primary.contrastText.tertiary}
|
||||||
sx={{ opacity: 0.6 }}
|
sx={{ opacity: 0.6 }}
|
||||||
>
|
>
|
||||||
Supported formats: JPG, PNG
|
Supported formats: JPG, PNG
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const Radio = (props) => {
|
|||||||
height: 16,
|
height: 16,
|
||||||
boxShadow: `inset 0 0 0 1px ${theme.palette.secondary.main}`,
|
boxShadow: `inset 0 0 0 1px ${theme.palette.secondary.main}`,
|
||||||
"&:not(.Mui-checked)": {
|
"&:not(.Mui-checked)": {
|
||||||
boxShadow: `inset 0 0 0 1px ${theme.palette.text.primary}70`, // Use theme text color for the outline
|
boxShadow: `inset 0 0 0 1px ${theme.palette.primary.contrastText.main}70`, // Use theme text color for the outline
|
||||||
},
|
},
|
||||||
mt: theme.spacing(0.5),
|
mt: theme.spacing(0.5),
|
||||||
}}
|
}}
|
||||||
@@ -56,7 +56,7 @@ const Radio = (props) => {
|
|||||||
<Typography
|
<Typography
|
||||||
component="h6"
|
component="h6"
|
||||||
mt={theme.spacing(1)}
|
mt={theme.spacing(1)}
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
>
|
>
|
||||||
{props.desc}
|
{props.desc}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const SearchAdornment = () => {
|
|||||||
width: 16,
|
width: 16,
|
||||||
height: 16,
|
height: 16,
|
||||||
"& path": {
|
"& path": {
|
||||||
stroke: theme.palette.text.tertiary,
|
stroke: theme.palette.primary.contrastText.tertiary,
|
||||||
strokeWidth: 1.2,
|
strokeWidth: 1.2,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -80,7 +80,7 @@ const Search = ({
|
|||||||
<Typography
|
<Typography
|
||||||
component="h3"
|
component="h3"
|
||||||
fontSize={"var(--env-var-font-size-medium)"}
|
fontSize={"var(--env-var-font-size-medium)"}
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
fontWeight={500}
|
fontWeight={500}
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
@@ -157,7 +157,7 @@ const Search = ({
|
|||||||
sx: {
|
sx: {
|
||||||
"& ul": { p: 2 },
|
"& ul": { p: 2 },
|
||||||
"& li.MuiAutocomplete-option": {
|
"& li.MuiAutocomplete-option": {
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.primary.contrastText.secondary,
|
||||||
px: 4,
|
px: 4,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -54,11 +54,11 @@ const Select = ({
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const itemStyles = {
|
const itemStyles = {
|
||||||
fontSize: "var(--env-var-font-size-medium)",
|
fontSize: "var(--env-var-font-size-medium)",
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
margin: theme.spacing(2),
|
margin: theme.spacing(2),
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
gap={theme.spacing(labelControlSpacing)}
|
gap={theme.spacing(labelControlSpacing)}
|
||||||
@@ -67,7 +67,7 @@ const Select = ({
|
|||||||
{label && (
|
{label && (
|
||||||
<Typography
|
<Typography
|
||||||
component="h3"
|
component="h3"
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
fontWeight={500}
|
fontWeight={500}
|
||||||
fontSize={13}
|
fontSize={13}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const HttpAdornment = ({ https }) => {
|
|||||||
<Typography
|
<Typography
|
||||||
component="h5"
|
component="h5"
|
||||||
paddingRight={"var(--env-var-spacing-1-minus)"}
|
paddingRight={"var(--env-var-spacing-1-minus)"}
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
sx={{ lineHeight: 1, opacity: 0.8 }}
|
sx={{ lineHeight: 1, opacity: 0.8 }}
|
||||||
>
|
>
|
||||||
{https ? "https" : "http"}://
|
{https ? "https" : "http"}://
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ const TextInput = forwardRef(
|
|||||||
<Typography
|
<Typography
|
||||||
component="h3"
|
component="h3"
|
||||||
fontSize={"var(--env-var-font-size-medium)"}
|
fontSize={"var(--env-var-font-size-medium)"}
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
fontWeight={500}
|
fontWeight={500}
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ const BaseLabel = ({ label, styles, children }) => {
|
|||||||
className="label"
|
className="label"
|
||||||
sx={{
|
sx={{
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
border: `1px solid ${theme.palette.text.tertiary}`,
|
border: `1px solid ${theme.palette.primary.contrastText.tertiary}`,
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
padding: padding,
|
padding: padding,
|
||||||
...styles,
|
...styles,
|
||||||
}}
|
}}
|
||||||
@@ -141,7 +141,7 @@ const StatusLabel = ({ status, text, customStyles }) => {
|
|||||||
borderColor: theme.palette.warning.light,
|
borderColor: theme.palette.warning.light,
|
||||||
},
|
},
|
||||||
pending: {
|
pending: {
|
||||||
dotColor: theme.palette.text.secondary,
|
dotColor: theme.palette.primary.contrastText.secondary,
|
||||||
bgColor: theme.palette.background.main,
|
bgColor: theme.palette.background.main,
|
||||||
borderColor: theme.palette.border.dark,
|
borderColor: theme.palette.border.dark,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -16,22 +16,22 @@ const Link = ({ level, label, url }) => {
|
|||||||
const levelConfig = {
|
const levelConfig = {
|
||||||
primary: {},
|
primary: {},
|
||||||
secondary: {
|
secondary: {
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.primary.contrastText.secondary,
|
||||||
sx: {
|
sx: {
|
||||||
":hover": {
|
":hover": {
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.primary.contrastText.secondary,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tertiary: {
|
tertiary: {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
sx: {
|
sx: {
|
||||||
textDecoration: "underline",
|
textDecoration: "underline",
|
||||||
textDecorationStyle: "dashed",
|
textDecorationStyle: "dashed",
|
||||||
textDecorationColor: theme.palette.primary.main,
|
textDecorationColor: theme.palette.primary.main,
|
||||||
textUnderlineOffset: "1px",
|
textUnderlineOffset: "1px",
|
||||||
":hover": {
|
":hover": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
textDecorationColor: theme.palette.primary.main,
|
textDecorationColor: theme.palette.primary.main,
|
||||||
backgroundColor: theme.palette.background.fill,
|
backgroundColor: theme.palette.background.fill,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ const ProgressUpload = ({ icon, label, size, progress = 0, onClick, error }) =>
|
|||||||
{error}
|
{error}
|
||||||
</Typography>
|
</Typography>
|
||||||
) : (
|
) : (
|
||||||
<Box color={theme.palette.text.tertiary}>
|
<Box color={theme.palette.primary.contrastText.tertiary}>
|
||||||
<Typography
|
<Typography
|
||||||
component="h2"
|
component="h2"
|
||||||
mb={theme.spacing(1.5)}
|
mb={theme.spacing(1.5)}
|
||||||
|
|||||||
@@ -173,10 +173,10 @@ function Sidebar() {
|
|||||||
backgroundColor: theme.palette.background.accent,
|
backgroundColor: theme.palette.background.accent,
|
||||||
},
|
},
|
||||||
"& .MuiList-root svg path": {
|
"& .MuiList-root svg path": {
|
||||||
stroke: theme.palette.text.tertiary,
|
stroke: theme.palette.primary.contrastText.tertiary,
|
||||||
},
|
},
|
||||||
"& p, & span, & .MuiListSubheader-root": {
|
"& p, & span, & .MuiListSubheader-root": {
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.primary.contrastText.secondary,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -231,7 +231,7 @@ function Sidebar() {
|
|||||||
width: theme.spacing(8),
|
width: theme.spacing(8),
|
||||||
height: theme.spacing(8),
|
height: theme.spacing(8),
|
||||||
"& path": {
|
"& path": {
|
||||||
stroke: theme.palette.text.secondary,
|
stroke: theme.palette.primary.contrastText.secondary,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"&:focus": { outline: "none" },
|
"&:focus": { outline: "none" },
|
||||||
@@ -490,7 +490,7 @@ function Sidebar() {
|
|||||||
backgroundColor: theme.palette.other.line,
|
backgroundColor: theme.palette.other.line,
|
||||||
},
|
},
|
||||||
"&.selected-path::after": {
|
"&.selected-path::after": {
|
||||||
backgroundColor: theme.palette.text.tertiary,
|
backgroundColor: theme.palette.primary.contrastText.tertiary,
|
||||||
transform: "scale(1.2)",
|
transform: "scale(1.2)",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -573,7 +573,7 @@ function Sidebar() {
|
|||||||
mr: "-8px",
|
mr: "-8px",
|
||||||
"&:focus": { outline: "none" },
|
"&:focus": { outline: "none" },
|
||||||
alignSelf: "center",
|
alignSelf: "center",
|
||||||
padding: '10px',
|
padding: "10px",
|
||||||
|
|
||||||
"& svg": {
|
"& svg": {
|
||||||
width: "22px",
|
width: "22px",
|
||||||
|
|||||||
@@ -43,15 +43,15 @@ const StatBox = ({ heading, subHeading, sx }) => {
|
|||||||
"& h2": {
|
"& h2": {
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.primary.contrastText.secondary,
|
||||||
textTransform: "uppercase",
|
textTransform: "uppercase",
|
||||||
},
|
},
|
||||||
"& p": {
|
"& p": {
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.primary.contrastText.main,
|
||||||
marginTop: theme.spacing(2),
|
marginTop: theme.spacing(2),
|
||||||
"& span": {
|
"& span": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
marginLeft: theme.spacing(2),
|
marginLeft: theme.spacing(2),
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ const PasswordPanel = () => {
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
|
const SPACING_GAP = theme.spacing(12);
|
||||||
const SPACING_GAP = theme.spacing(12);
|
|
||||||
|
|
||||||
//redux state
|
//redux state
|
||||||
const { authToken, isLoading } = useSelector((state) => state.auth);
|
const { authToken, isLoading } = useSelector((state) => state.auth);
|
||||||
@@ -116,7 +115,7 @@ const PasswordPanel = () => {
|
|||||||
value="password"
|
value="password"
|
||||||
sx={{
|
sx={{
|
||||||
"& h1, & input": {
|
"& h1, & input": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -126,8 +125,7 @@ const PasswordPanel = () => {
|
|||||||
noValidate
|
noValidate
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
gap={theme.spacing(26)}
|
gap={theme.spacing(26)}
|
||||||
maxWidth={"80ch"} // Keep maxWidth
|
maxWidth={"80ch"} // Keep maxWidth
|
||||||
|
|
||||||
>
|
>
|
||||||
<TextInput
|
<TextInput
|
||||||
type="text"
|
type="text"
|
||||||
@@ -142,7 +140,7 @@ const PasswordPanel = () => {
|
|||||||
direction="row"
|
direction="row"
|
||||||
justifyContent={"flex-start"}
|
justifyContent={"flex-start"}
|
||||||
alignItems={"center"}
|
alignItems={"center"}
|
||||||
gap={SPACING_GAP}
|
gap={SPACING_GAP}
|
||||||
flexWrap={"wrap"}
|
flexWrap={"wrap"}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -167,7 +165,7 @@ const PasswordPanel = () => {
|
|||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
alignItems={"flex-start"}
|
alignItems={"flex-start"}
|
||||||
gap={SPACING_GAP}
|
gap={SPACING_GAP}
|
||||||
flexWrap={"wrap"}
|
flexWrap={"wrap"}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -193,7 +191,7 @@ const PasswordPanel = () => {
|
|||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
alignItems={"flex-start"}
|
alignItems={"flex-start"}
|
||||||
gap={SPACING_GAP}
|
gap={SPACING_GAP}
|
||||||
flexWrap={"wrap"}
|
flexWrap={"wrap"}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -255,4 +253,4 @@ PasswordPanel.propTypes = {
|
|||||||
// No props are being passed to this component, hence no specific PropTypes are defined.
|
// No props are being passed to this component, hence no specific PropTypes are defined.
|
||||||
};
|
};
|
||||||
|
|
||||||
export default PasswordPanel;
|
export default PasswordPanel;
|
||||||
@@ -29,7 +29,7 @@ import Dialog from "../../Dialog";
|
|||||||
const ProfilePanel = () => {
|
const ProfilePanel = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
const SPACING_GAP = theme.spacing(12);
|
const SPACING_GAP = theme.spacing(12);
|
||||||
|
|
||||||
//redux state
|
//redux state
|
||||||
@@ -216,7 +216,7 @@ const ProfilePanel = () => {
|
|||||||
value="profile"
|
value="profile"
|
||||||
sx={{
|
sx={{
|
||||||
"& h1, & p, & input": {
|
"& h1, & p, & input": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -225,9 +225,12 @@ const ProfilePanel = () => {
|
|||||||
className="edit-profile-form"
|
className="edit-profile-form"
|
||||||
noValidate
|
noValidate
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
gap={SPACING_GAP}
|
gap={SPACING_GAP}
|
||||||
>
|
>
|
||||||
<Stack direction="row" gap={SPACING_GAP}>
|
<Stack
|
||||||
|
direction="row"
|
||||||
|
gap={SPACING_GAP}
|
||||||
|
>
|
||||||
<Box flex={0.9}>
|
<Box flex={0.9}>
|
||||||
<Typography component="h1">First name</Typography>
|
<Typography component="h1">First name</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@@ -242,7 +245,10 @@ const ProfilePanel = () => {
|
|||||||
flex={1}
|
flex={1}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack direction="row" gap={SPACING_GAP}>
|
<Stack
|
||||||
|
direction="row"
|
||||||
|
gap={SPACING_GAP}
|
||||||
|
>
|
||||||
<Box flex={0.9}>
|
<Box flex={0.9}>
|
||||||
<Typography component="h1">Last name</Typography>
|
<Typography component="h1">Last name</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@@ -257,7 +263,10 @@ const ProfilePanel = () => {
|
|||||||
flex={1}
|
flex={1}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack direction="row" gap={SPACING_GAP}>
|
<Stack
|
||||||
|
direction="row"
|
||||||
|
gap={SPACING_GAP}
|
||||||
|
>
|
||||||
<Stack flex={0.9}>
|
<Stack flex={0.9}>
|
||||||
<Typography component="h1">Email</Typography>
|
<Typography component="h1">Email</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -277,7 +286,10 @@ const ProfilePanel = () => {
|
|||||||
flex={1}
|
flex={1}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack direction="row" gap={SPACING_GAP}>
|
<Stack
|
||||||
|
direction="row"
|
||||||
|
gap={SPACING_GAP}
|
||||||
|
>
|
||||||
<Stack flex={0.9}>
|
<Stack flex={0.9}>
|
||||||
<Typography component="h1">Your photo</Typography>
|
<Typography component="h1">Your photo</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ const TeamPanel = () => {
|
|||||||
id: idx,
|
id: idx,
|
||||||
data: (
|
data: (
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography color={theme.palette.text.secondary}>
|
<Typography color={theme.palette.primary.contrastText.secondary}>
|
||||||
{member.firstName + " " + member.lastName}
|
{member.firstName + " " + member.lastName}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
@@ -190,7 +190,7 @@ const TeamPanel = () => {
|
|||||||
value="team"
|
value="team"
|
||||||
sx={{
|
sx={{
|
||||||
"& h1": {
|
"& h1": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
},
|
},
|
||||||
"& .MuiTable-root .MuiTableBody-root .MuiTableCell-root, & .MuiTable-root p + p":
|
"& .MuiTable-root .MuiTableBody-root .MuiTableCell-root, & .MuiTable-root p + p":
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ const SunAndMoonIcon = () => {
|
|||||||
cx="12"
|
cx="12"
|
||||||
cy="12"
|
cy="12"
|
||||||
r="6"
|
r="6"
|
||||||
fill={theme.palette.text.secondary}
|
fill={theme.palette.primary.contrastText.secondary}
|
||||||
mask="url(#moon-mask)"
|
mask="url(#moon-mask)"
|
||||||
/>
|
/>
|
||||||
<g
|
<g
|
||||||
className="sun-beams"
|
className="sun-beams"
|
||||||
stroke={theme.palette.text.secondary}
|
stroke={theme.palette.primary.contrastText.secondary}
|
||||||
>
|
>
|
||||||
<line
|
<line
|
||||||
x1="12"
|
x1="12"
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ const Account = ({ open = "profile" }) => {
|
|||||||
tabIndex={index}
|
tabIndex={index}
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
textTransform: "none",
|
textTransform: "none",
|
||||||
minWidth: "fit-content",
|
minWidth: "fit-content",
|
||||||
minHeight: 0,
|
minHeight: 0,
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ const LandingPage = ({ isSuperAdmin, onSignup }) => {
|
|||||||
}}
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -95,7 +95,7 @@ const LandingPage = ({ isSuperAdmin, onSignup }) => {
|
|||||||
}}
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ const Empty = ({ styles, mode }) => {
|
|||||||
</Box>
|
</Box>
|
||||||
<Typography
|
<Typography
|
||||||
textAlign="center"
|
textAlign="center"
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
>
|
>
|
||||||
No incidents recorded yet.
|
No incidents recorded yet.
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ const IncidentTable = ({ monitors, selectedMonitor, filter }) => {
|
|||||||
</Box>
|
</Box>
|
||||||
<Typography
|
<Typography
|
||||||
textAlign="center"
|
textAlign="center"
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
>
|
>
|
||||||
The monitor you have selected has no recorded incidents yet.
|
The monitor you have selected has no recorded incidents yet.
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -185,7 +185,7 @@ const IncidentTable = ({ monitors, selectedMonitor, filter }) => {
|
|||||||
"YYYY-MM-DD HH:mm:ss A",
|
"YYYY-MM-DD HH:mm:ss A",
|
||||||
uiTimezone
|
uiTimezone
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TableRow key={check._id}>
|
<TableRow key={check._id}>
|
||||||
<TableCell>{monitors[check.monitorId]?.name}</TableCell>
|
<TableCell>{monitors[check.monitorId]?.name}</TableCell>
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ const Incidents = () => {
|
|||||||
<Typography
|
<Typography
|
||||||
display="inline-block"
|
display="inline-block"
|
||||||
component="h1"
|
component="h1"
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
>
|
>
|
||||||
Incidents for
|
Incidents for
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const Empty = ({ styles }) => {
|
|||||||
<Typography variant="h2">Your infrastructure dashboard will show here</Typography>
|
<Typography variant="h2">Your infrastructure dashboard will show here</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
textAlign="center"
|
textAlign="center"
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
>
|
>
|
||||||
Hang tight! Data is loading
|
Hang tight! Data is loading
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -98,9 +98,9 @@ function Pagination({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.primary.contrastText.secondary,
|
||||||
"& svg path": {
|
"& svg path": {
|
||||||
stroke: theme.palette.text.tertiary,
|
stroke: theme.palette.primary.contrastText.tertiary,
|
||||||
strokeWidth: 1.3,
|
strokeWidth: 1.3,
|
||||||
},
|
},
|
||||||
"& .MuiSelect-select": {
|
"& .MuiSelect-select": {
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ function Infrastructure() {
|
|||||||
<Box
|
<Box
|
||||||
component="span"
|
component="span"
|
||||||
className="current-monitors-counter"
|
className="current-monitors-counter"
|
||||||
color={theme.palette.text.primary}
|
color={theme.palette.primary.contrastText.main}
|
||||||
border={1}
|
border={1}
|
||||||
borderColor={theme.palette.border.light}
|
borderColor={theme.palette.border.light}
|
||||||
backgroundColor={theme.palette.background.accent}
|
backgroundColor={theme.palette.background.accent}
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ const Integrations = () => {
|
|||||||
gap={theme.spacing(2)}
|
gap={theme.spacing(2)}
|
||||||
sx={{
|
sx={{
|
||||||
"& h1, & p": {
|
"& h1, & p": {
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.primary.contrastText.secondary,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -329,9 +329,9 @@ const MaintenanceTable = ({
|
|||||||
}}
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
mt: theme.spacing(6),
|
mt: theme.spacing(6),
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.primary.contrastText.secondary,
|
||||||
"& svg path": {
|
"& svg path": {
|
||||||
stroke: theme.palette.text.tertiary,
|
stroke: theme.palette.primary.contrastText.tertiary,
|
||||||
strokeWidth: 1.3,
|
strokeWidth: 1.3,
|
||||||
},
|
},
|
||||||
"& .MuiSelect-select": {
|
"& .MuiSelect-select": {
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ const PageSpeedConfigure = () => {
|
|||||||
width: 4,
|
width: 4,
|
||||||
height: 4,
|
height: 4,
|
||||||
borderRadius: "50%",
|
borderRadius: "50%",
|
||||||
backgroundColor: theme.palette.text.tertiary,
|
backgroundColor: theme.palette.primary.contrastText.tertiary,
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
left: -10,
|
left: -10,
|
||||||
top: "50%",
|
top: "50%",
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ const CreatePageSpeed = () => {
|
|||||||
className="create-monitor"
|
className="create-monitor"
|
||||||
sx={{
|
sx={{
|
||||||
"& h1": {
|
"& h1": {
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.primary.contrastText.main,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -207,7 +207,7 @@ const CreatePageSpeed = () => {
|
|||||||
component="span"
|
component="span"
|
||||||
fontSize="inherit"
|
fontSize="inherit"
|
||||||
fontWeight="inherit"
|
fontWeight="inherit"
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
>
|
>
|
||||||
PageSpeed monitor
|
PageSpeed monitor
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ const CustomToolTip = ({ active, payload, label, config }) => {
|
|||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
}}
|
}}
|
||||||
@@ -86,7 +86,7 @@ const CustomToolTip = ({ active, payload, label, config }) => {
|
|||||||
mt={theme.spacing(1)}
|
mt={theme.spacing(1)}
|
||||||
sx={{
|
sx={{
|
||||||
"& span": {
|
"& span": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
},
|
},
|
||||||
@@ -186,7 +186,7 @@ const CustomTick = ({ x, y, payload, index }) => {
|
|||||||
x={x}
|
x={x}
|
||||||
y={y + 8}
|
y={y + 8}
|
||||||
textAnchor="middle"
|
textAnchor="middle"
|
||||||
fill={theme.palette.text.tertiary}
|
fill={theme.palette.primary.contrastText.tertiary}
|
||||||
fontSize={11}
|
fontSize={11}
|
||||||
fontWeight={400}
|
fontWeight={400}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ const PageSpeedDetails = () => {
|
|||||||
width: 4,
|
width: 4,
|
||||||
height: 4,
|
height: 4,
|
||||||
borderRadius: "50%",
|
borderRadius: "50%",
|
||||||
backgroundColor: theme.palette.text.tertiary,
|
backgroundColor: theme.palette.primary.contrastText.tertiary,
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
left: -9,
|
left: -9,
|
||||||
top: "50%",
|
top: "50%",
|
||||||
@@ -410,7 +410,7 @@ const PageSpeedDetails = () => {
|
|||||||
component="span"
|
component="span"
|
||||||
fontSize={14}
|
fontSize={14}
|
||||||
fontWeight={500}
|
fontWeight={500}
|
||||||
color={theme.palette.text.primary}
|
color={theme.palette.primary.contrastText.main}
|
||||||
>
|
>
|
||||||
{value}
|
{value}
|
||||||
<Typography
|
<Typography
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ export const ChartBox = styled(Stack)(({ theme }) => ({
|
|||||||
borderBottomRightRadius: 16,
|
borderBottomRightRadius: 16,
|
||||||
backgroundColor: theme.palette.background.main,
|
backgroundColor: theme.palette.background.main,
|
||||||
"& h2": {
|
"& h2": {
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.primary.contrastText.secondary,
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
},
|
},
|
||||||
"& p": { color: theme.palette.text.tertiary },
|
"& p": { color: theme.palette.primary.contrastText.tertiary },
|
||||||
"& > :nth-of-type(1)": {
|
"& > :nth-of-type(1)": {
|
||||||
gridColumn: 1,
|
gridColumn: 1,
|
||||||
gridRow: 1,
|
gridRow: 1,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const CustomToolTip = ({ payload }) => {
|
|||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
}}
|
}}
|
||||||
@@ -52,7 +52,7 @@ const CustomToolTip = ({ payload }) => {
|
|||||||
mt={theme.spacing(1)}
|
mt={theme.spacing(1)}
|
||||||
sx={{
|
sx={{
|
||||||
"& span": {
|
"& span": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
},
|
},
|
||||||
@@ -299,7 +299,7 @@ const Card = ({ monitor }) => {
|
|||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="span"
|
||||||
fontSize={12}
|
fontSize={12}
|
||||||
color={theme.palette.text.primary}
|
color={theme.palette.primary.contrastText.main}
|
||||||
>
|
>
|
||||||
{time}{" "}
|
{time}{" "}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ const PageSpeed = () => {
|
|||||||
<Box
|
<Box
|
||||||
component="span"
|
component="span"
|
||||||
className="current-monitors-counter"
|
className="current-monitors-counter"
|
||||||
color={theme.palette.text.primary}
|
color={theme.palette.primary.contrastText.main}
|
||||||
border={1}
|
border={1}
|
||||||
borderColor={theme.palette.border.light}
|
borderColor={theme.palette.border.light}
|
||||||
backgroundColor={theme.palette.background.accent}
|
backgroundColor={theme.palette.background.accent}
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ const Configure = () => {
|
|||||||
width: 4,
|
width: 4,
|
||||||
height: 4,
|
height: 4,
|
||||||
borderRadius: "50%",
|
borderRadius: "50%",
|
||||||
backgroundColor: theme.palette.text.tertiary,
|
backgroundColor: theme.palette.primary.contrastText.tertiary,
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
left: -10,
|
left: -10,
|
||||||
top: "50%",
|
top: "50%",
|
||||||
@@ -307,7 +307,7 @@ const Configure = () => {
|
|||||||
width: 22,
|
width: 22,
|
||||||
height: 22,
|
height: 22,
|
||||||
"& path": {
|
"& path": {
|
||||||
stroke: theme.palette.text.tertiary,
|
stroke: theme.palette.primary.contrastText.tertiary,
|
||||||
strokeWidth: 1.7,
|
strokeWidth: 1.7,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ const DetailsPage = () => {
|
|||||||
width: 4,
|
width: 4,
|
||||||
height: 4,
|
height: 4,
|
||||||
borderRadius: "50%",
|
borderRadius: "50%",
|
||||||
backgroundColor: theme.palette.text.tertiary,
|
backgroundColor: theme.palette.primary.contrastText.tertiary,
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
left: -9,
|
left: -9,
|
||||||
top: "50%",
|
top: "50%",
|
||||||
@@ -204,7 +204,7 @@ const DetailsPage = () => {
|
|||||||
"& svg": {
|
"& svg": {
|
||||||
mr: theme.spacing(3),
|
mr: theme.spacing(3),
|
||||||
"& path": {
|
"& path": {
|
||||||
stroke: theme.palette.text.tertiary,
|
stroke: theme.palette.primary.contrastText.tertiary,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -242,7 +242,7 @@ const DetailsPage = () => {
|
|||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="span"
|
||||||
fontSize={13}
|
fontSize={13}
|
||||||
color={theme.palette.text.primary}
|
color={theme.palette.primary.contrastText.main}
|
||||||
>
|
>
|
||||||
{certificateExpiry}
|
{certificateExpiry}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -316,7 +316,7 @@ const DetailsPage = () => {
|
|||||||
position="absolute"
|
position="absolute"
|
||||||
top="100%"
|
top="100%"
|
||||||
fontSize={11}
|
fontSize={11}
|
||||||
color={theme.palette.text.tertiary}
|
color={theme.palette.primary.contrastText.tertiary}
|
||||||
>
|
>
|
||||||
{formatDateWithTz(
|
{formatDateWithTz(
|
||||||
hoveredUptimeData._id,
|
hoveredUptimeData._id,
|
||||||
@@ -373,7 +373,7 @@ const DetailsPage = () => {
|
|||||||
position="absolute"
|
position="absolute"
|
||||||
top="100%"
|
top="100%"
|
||||||
fontSize={11}
|
fontSize={11}
|
||||||
color={theme.palette.text.tertiary}
|
color={theme.palette.primary.contrastText.tertiary}
|
||||||
>
|
>
|
||||||
{formatDateWithTz(
|
{formatDateWithTz(
|
||||||
hoveredIncidentsData._id,
|
hoveredIncidentsData._id,
|
||||||
@@ -426,7 +426,7 @@ const DetailsPage = () => {
|
|||||||
</IconBox>
|
</IconBox>
|
||||||
<Typography
|
<Typography
|
||||||
component="h2"
|
component="h2"
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
>
|
>
|
||||||
History
|
History
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -12,16 +12,16 @@ export const ChartBox = styled(Stack)(({ theme }) => ({
|
|||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
backgroundColor: theme.palette.background.main,
|
backgroundColor: theme.palette.background.main,
|
||||||
"& h2": {
|
"& h2": {
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.primary.contrastText.secondary,
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
},
|
},
|
||||||
"& .MuiBox-root:not(.area-tooltip) p": {
|
"& .MuiBox-root:not(.area-tooltip) p": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
},
|
},
|
||||||
"& .MuiBox-root > span": {
|
"& .MuiBox-root > span": {
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.primary.contrastText.main,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
"& span": {
|
"& span": {
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
@@ -37,7 +37,7 @@ export const ChartBox = styled(Stack)(({ theme }) => ({
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
},
|
},
|
||||||
"& tspan, & text": {
|
"& tspan, & text": {
|
||||||
fill: theme.palette.text.tertiary,
|
fill: theme.palette.primary.contrastText.tertiary,
|
||||||
},
|
},
|
||||||
"& path": {
|
"& path": {
|
||||||
transition: "fill 300ms ease, stroke-width 400ms ease",
|
transition: "fill 300ms ease, stroke-width 400ms ease",
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const CurrentMonitoring = ({ totalMonitors, monitors, isAdmin, handlePause }) =>
|
|||||||
|
|
||||||
<Box
|
<Box
|
||||||
className="current-monitors-counter"
|
className="current-monitors-counter"
|
||||||
color={theme.palette.text.primary}
|
color={theme.palette.primary.contrastText.main}
|
||||||
border={1}
|
border={1}
|
||||||
borderColor={theme.palette.border.light}
|
borderColor={theme.palette.border.light}
|
||||||
backgroundColor={theme.palette.background.accent}
|
backgroundColor={theme.palette.background.accent}
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ const StatusBox = ({ title, value }) => {
|
|||||||
textTransform="uppercase"
|
textTransform="uppercase"
|
||||||
fontSize={15}
|
fontSize={15}
|
||||||
letterSpacing={0.5}
|
letterSpacing={0.5}
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
mb={theme.spacing(8)}
|
mb={theme.spacing(8)}
|
||||||
sx={{ opacity: 0.6 }}
|
sx={{ opacity: 0.6 }}
|
||||||
>
|
>
|
||||||
@@ -93,7 +93,7 @@ const StatusBox = ({ title, value }) => {
|
|||||||
component="span"
|
component="span"
|
||||||
fontSize={20}
|
fontSize={20}
|
||||||
fontWeight={300}
|
fontWeight={300}
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
sx={{ opacity: 0.3 }}
|
sx={{ opacity: 0.3 }}
|
||||||
>
|
>
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const Fallback = ({ isAdmin }) => {
|
|||||||
border={1}
|
border={1}
|
||||||
borderRadius={theme.shape.borderRadius}
|
borderRadius={theme.shape.borderRadius}
|
||||||
borderColor={theme.palette.border.light}
|
borderColor={theme.palette.border.light}
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
>
|
>
|
||||||
<Box pb={theme.spacing(20)}>
|
<Box pb={theme.spacing(20)}>
|
||||||
{mode === "light" ? <PlaceholderLight /> : <PlaceholderDark />}
|
{mode === "light" ? <PlaceholderLight /> : <PlaceholderDark />}
|
||||||
|
|||||||
@@ -253,4 +253,131 @@ const semanticColors = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
export { typographyLevels, semanticColors as colors };
|
|
||||||
|
const newColors = {
|
||||||
|
offWhite: "#FEFEFE",
|
||||||
|
offBlack: "#131315",
|
||||||
|
gray300: "#E3E3E3",
|
||||||
|
gray600: "#A2A3A3",
|
||||||
|
blueGray50: "#E8F0FE",
|
||||||
|
blueGray500: "#475467",
|
||||||
|
blueGray600: "#344054",
|
||||||
|
blueGray800: "#1C2130",
|
||||||
|
gray200: "#E3E3E3",
|
||||||
|
gray500: "#A2A3A3",
|
||||||
|
blueBlueWave: "#1570EF",
|
||||||
|
green100: "#8CFFCB",
|
||||||
|
green200: "#4B9B77",
|
||||||
|
green400: "#079455",
|
||||||
|
green700: "#19543A",
|
||||||
|
orange100: "#FFE5CC",
|
||||||
|
orange400: "#FD8F22",
|
||||||
|
orange600: "#9B734B",
|
||||||
|
orange700: "#694016",
|
||||||
|
red100: "#F9C2C2",
|
||||||
|
red400: "#D92020",
|
||||||
|
red600: "#9B4B4B",
|
||||||
|
red700: "#791515",
|
||||||
|
};
|
||||||
|
|
||||||
|
const newSemanticColors = {
|
||||||
|
accent: {
|
||||||
|
main: {
|
||||||
|
light: newColors.blueBlueWave,
|
||||||
|
dark: newColors.blueBlueWave,
|
||||||
|
},
|
||||||
|
contrastText: {
|
||||||
|
light: newColors.offWhite,
|
||||||
|
dark: newColors.offWhite,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
primary: {
|
||||||
|
main: {
|
||||||
|
light: newColors.offWhite,
|
||||||
|
dark: newColors.offBlack,
|
||||||
|
},
|
||||||
|
contrastText: {
|
||||||
|
main: {
|
||||||
|
light: newColors.blueGray800,
|
||||||
|
dark: newColors.blueGray50,
|
||||||
|
},
|
||||||
|
secondary: {
|
||||||
|
light: newColors.blueGray600,
|
||||||
|
dark: newColors.gray300,
|
||||||
|
},
|
||||||
|
tertiary: {
|
||||||
|
light: newColors.blueGray500,
|
||||||
|
dark: newColors.gray500,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
/* For success, warning and error, contrastText works wll with main, and with the theme primary main color. Accent is to be used in graphs */
|
||||||
|
success: {
|
||||||
|
main: {
|
||||||
|
light: newColors.green700,
|
||||||
|
dark: newColors.green100,
|
||||||
|
},
|
||||||
|
contrastText: {
|
||||||
|
light: newColors.green100,
|
||||||
|
dark: newColors.green700,
|
||||||
|
},
|
||||||
|
accent: {
|
||||||
|
light: newColors.green400,
|
||||||
|
dark: newColors.green200,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
error: {
|
||||||
|
main: {
|
||||||
|
light: newColors.red700,
|
||||||
|
dark: newColors.red100,
|
||||||
|
},
|
||||||
|
contrastText: {
|
||||||
|
light: newColors.red100,
|
||||||
|
dark: newColors.red700,
|
||||||
|
},
|
||||||
|
accent: {
|
||||||
|
light: newColors.red400,
|
||||||
|
dark: newColors.red600,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
warning: {
|
||||||
|
main: {
|
||||||
|
light: newColors.orange700,
|
||||||
|
dark: newColors.orange100,
|
||||||
|
},
|
||||||
|
contrastText: {
|
||||||
|
light: newColors.orange100,
|
||||||
|
dark: newColors.orange700,
|
||||||
|
},
|
||||||
|
accent: {
|
||||||
|
light: newColors.orange400,
|
||||||
|
dark: newColors.orange600,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
gradient: {
|
||||||
|
color1: {
|
||||||
|
light: paletteColors.gray90,
|
||||||
|
dark: paletteColors.gray890,
|
||||||
|
},
|
||||||
|
color2: {
|
||||||
|
light: paletteColors.gray80,
|
||||||
|
dark: paletteColors.gray880,
|
||||||
|
},
|
||||||
|
color3: {
|
||||||
|
light: paletteColors.gray70,
|
||||||
|
dark: paletteColors.gray870,
|
||||||
|
},
|
||||||
|
color4: {
|
||||||
|
light: paletteColors.gray60,
|
||||||
|
dark: paletteColors.gray860,
|
||||||
|
},
|
||||||
|
color5: {
|
||||||
|
light: paletteColors.gray50,
|
||||||
|
dark: paletteColors.gray850,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
/* TODO proximo passo: quebrar o projeto */
|
||||||
|
|
||||||
|
export { typographyLevels, semanticColors as colors, newSemanticColors };
|
||||||
+129
-104
@@ -1,111 +1,31 @@
|
|||||||
import { createTheme } from "@mui/material";
|
import { createTheme } from "@mui/material";
|
||||||
import { baseTheme } from "./globalTheme";
|
import { baseTheme } from "./globalTheme";
|
||||||
import { colors } from "./constants";
|
import { colors, newSemanticColors } from "./constants";
|
||||||
|
|
||||||
const {
|
function extractThemeColors(themeType, colorObject) {
|
||||||
primary,
|
if (!["light", "dark"].includes(themeType)) {
|
||||||
secondary,
|
throw new Error('Invalid theme type. Use "light" or "dark".');
|
||||||
success,
|
}
|
||||||
error,
|
|
||||||
warning,
|
|
||||||
neutral,
|
|
||||||
gradient: {
|
|
||||||
color1: { dark: color1 },
|
|
||||||
color2: { dark: color2 },
|
|
||||||
color3: { dark: color3 },
|
|
||||||
color4: { dark: color4 },
|
|
||||||
color5: { dark: color5 },
|
|
||||||
},
|
|
||||||
background,
|
|
||||||
text,
|
|
||||||
border,
|
|
||||||
unresolved,
|
|
||||||
other,
|
|
||||||
} = colors;
|
|
||||||
|
|
||||||
const palette = {
|
const extract = (obj) => {
|
||||||
action: {
|
if (typeof obj !== "object" || obj === null) {
|
||||||
disabled: border.dark.disabled,
|
return obj;
|
||||||
},
|
}
|
||||||
primary: { main: primary.main.dark },
|
|
||||||
secondary: {
|
if ("light" in obj && "dark" in obj) {
|
||||||
main: secondary.main.dark,
|
return obj[themeType]; // Return the value for the specified theme
|
||||||
contrastText: secondary.contrastText.dark,
|
}
|
||||||
light: secondary.dark.dark,
|
|
||||||
dark: secondary.dark.dark,
|
// Reduce the object, keeping only the extracted themeType values
|
||||||
},
|
return Object.keys(obj).reduce((acc, key) => {
|
||||||
success: {
|
acc[key] = extract(obj[key]);
|
||||||
main: success.main.dark,
|
return acc;
|
||||||
contrastText: success.contrastText.dark,
|
}, {});
|
||||||
light: success.light.dark,
|
};
|
||||||
dark: success.dark.dark,
|
|
||||||
},
|
return extract(colorObject);
|
||||||
error: {
|
}
|
||||||
main: error.main.dark,
|
const palette = extractThemeColors("dark", newSemanticColors);
|
||||||
contrastText: error.contrastText.dark,
|
|
||||||
light: error.light.dark,
|
|
||||||
dark: error.dark.dark,
|
|
||||||
},
|
|
||||||
warning: {
|
|
||||||
main: warning.main.dark,
|
|
||||||
light: warning.light.dark,
|
|
||||||
contrastText: warning.contrastText.dark,
|
|
||||||
dark: warning.dark.dark,
|
|
||||||
},
|
|
||||||
neutral: {
|
|
||||||
contrastText: neutral.contrastText.dark,
|
|
||||||
},
|
|
||||||
/* From this part on, try to create semantic structure, not feature based structure */
|
|
||||||
percentage: {
|
|
||||||
uptimePoor: error.main.dark,
|
|
||||||
uptimeFair: warning.contrastText.dark,
|
|
||||||
uptimeGood: warning.main.dark /* Change for a success color? ?*/,
|
|
||||||
uptimeExcellent: success.main.dark,
|
|
||||||
},
|
|
||||||
unresolved: {
|
|
||||||
main: unresolved.main.dark,
|
|
||||||
light: unresolved.light.dark,
|
|
||||||
bg: unresolved.bg.dark,
|
|
||||||
},
|
|
||||||
divider: border.light.dark,
|
|
||||||
other: {
|
|
||||||
icon: text.secondary.dark,
|
|
||||||
line: border.light.dark,
|
|
||||||
fill: background.accent.dark,
|
|
||||||
grid: other.grid.dark,
|
|
||||||
autofill: secondary.main.dark,
|
|
||||||
},
|
|
||||||
gradient: {
|
|
||||||
color1,
|
|
||||||
color2,
|
|
||||||
color3,
|
|
||||||
color4,
|
|
||||||
color5,
|
|
||||||
},
|
|
||||||
text: {
|
|
||||||
primary: text.primary.dark,
|
|
||||||
secondary: text.secondary.dark,
|
|
||||||
tertiary: text.tertiary.dark,
|
|
||||||
accent: text.accent.dark,
|
|
||||||
},
|
|
||||||
background: {
|
|
||||||
main: background.main.dark,
|
|
||||||
alt: background.alt.dark,
|
|
||||||
fill: background.fill.dark,
|
|
||||||
accent: background.accent.dark,
|
|
||||||
},
|
|
||||||
border: {
|
|
||||||
light: border.light.dark,
|
|
||||||
dark: border.dark.dark,
|
|
||||||
},
|
|
||||||
info: {
|
|
||||||
text: text.primary.dark,
|
|
||||||
main: text.secondary.dark,
|
|
||||||
bg: background.main.dark,
|
|
||||||
light: background.main.dark,
|
|
||||||
border: border.light.dark,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const darkTheme = createTheme({
|
const darkTheme = createTheme({
|
||||||
palette,
|
palette,
|
||||||
@@ -113,3 +33,108 @@ const darkTheme = createTheme({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export default darkTheme;
|
export default darkTheme;
|
||||||
|
|
||||||
|
// const {
|
||||||
|
// primary,
|
||||||
|
// secondary,
|
||||||
|
// success,
|
||||||
|
// error,
|
||||||
|
// warning,
|
||||||
|
// neutral,
|
||||||
|
// gradient: {
|
||||||
|
// color1: { dark: color1 },
|
||||||
|
// color2: { dark: color2 },
|
||||||
|
// color3: { dark: color3 },
|
||||||
|
// color4: { dark: color4 },
|
||||||
|
// color5: { dark: color5 },
|
||||||
|
// },
|
||||||
|
// background,
|
||||||
|
// text,
|
||||||
|
// border,
|
||||||
|
// unresolved,
|
||||||
|
// other,
|
||||||
|
// } = colors;
|
||||||
|
|
||||||
|
// const palette = {
|
||||||
|
// action: {
|
||||||
|
// disabled: border.dark.disabled,
|
||||||
|
// },
|
||||||
|
// primary: { main: primary.main.dark },
|
||||||
|
// secondary: {
|
||||||
|
// main: secondary.main.dark,
|
||||||
|
// contrastText: secondary.contrastText.dark,
|
||||||
|
// light: secondary.dark.dark,
|
||||||
|
// dark: secondary.dark.dark,
|
||||||
|
// },
|
||||||
|
// success: {
|
||||||
|
// main: success.main.dark,
|
||||||
|
// contrastText: success.contrastText.dark,
|
||||||
|
// light: success.light.dark,
|
||||||
|
// dark: success.dark.dark,
|
||||||
|
// },
|
||||||
|
// error: {
|
||||||
|
// main: error.main.dark,
|
||||||
|
// contrastText: error.contrastText.dark,
|
||||||
|
// light: error.light.dark,
|
||||||
|
// dark: error.dark.dark,
|
||||||
|
// },
|
||||||
|
// warning: {
|
||||||
|
// main: warning.main.dark,
|
||||||
|
// light: warning.light.dark,
|
||||||
|
// contrastText: warning.contrastText.dark,
|
||||||
|
// dark: warning.dark.dark,
|
||||||
|
// },
|
||||||
|
// neutral: {
|
||||||
|
// contrastText: neutral.contrastText.dark,
|
||||||
|
// },
|
||||||
|
// /* From this part on, try to create semantic structure, not feature based structure */
|
||||||
|
// percentage: {
|
||||||
|
// uptimePoor: error.main.dark,
|
||||||
|
// uptimeFair: warning.contrastText.dark,
|
||||||
|
// uptimeGood: warning.main.dark /* Change for a success color? ?*/,
|
||||||
|
// uptimeExcellent: success.main.dark,
|
||||||
|
// },
|
||||||
|
// unresolved: {
|
||||||
|
// main: unresolved.main.dark,
|
||||||
|
// light: unresolved.light.dark,
|
||||||
|
// bg: unresolved.bg.dark,
|
||||||
|
// },
|
||||||
|
// divider: border.light.dark,
|
||||||
|
// other: {
|
||||||
|
// icon: text.secondary.dark,
|
||||||
|
// line: border.light.dark,
|
||||||
|
// fill: background.accent.dark,
|
||||||
|
// grid: other.grid.dark,
|
||||||
|
// autofill: secondary.main.dark,
|
||||||
|
// },
|
||||||
|
// gradient: {
|
||||||
|
// color1,
|
||||||
|
// color2,
|
||||||
|
// color3,
|
||||||
|
// color4,
|
||||||
|
// color5,
|
||||||
|
// },
|
||||||
|
// text: {
|
||||||
|
// primary: text.primary.dark,
|
||||||
|
// secondary: text.secondary.dark,
|
||||||
|
// tertiary: text.tertiary.dark,
|
||||||
|
// accent: text.accent.dark,
|
||||||
|
// },
|
||||||
|
// background: {
|
||||||
|
// main: background.main.dark,
|
||||||
|
// alt: background.alt.dark,
|
||||||
|
// fill: background.fill.dark,
|
||||||
|
// accent: background.accent.dark,
|
||||||
|
// },
|
||||||
|
// border: {
|
||||||
|
// light: border.light.dark,
|
||||||
|
// dark: border.dark.dark,
|
||||||
|
// },
|
||||||
|
// info: {
|
||||||
|
// text: text.primary.dark,
|
||||||
|
// main: text.secondary.dark,
|
||||||
|
// bg: background.main.dark,
|
||||||
|
// light: background.main.dark,
|
||||||
|
// border: border.light.dark,
|
||||||
|
// },
|
||||||
|
// };
|
||||||
@@ -13,22 +13,22 @@ const baseTheme = (palette) => ({
|
|||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
h1: {
|
h1: {
|
||||||
fontSize: typographyLevels.xl,
|
fontSize: typographyLevels.xl,
|
||||||
color: palette.text.primary,
|
color: palette.primary.contrastText.main,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
},
|
},
|
||||||
h2: {
|
h2: {
|
||||||
fontSize: typographyLevels.l,
|
fontSize: typographyLevels.l,
|
||||||
color: palette.text.secondary,
|
color: palette.primary.contrastText.secondary,
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
},
|
},
|
||||||
body1: {
|
body1: {
|
||||||
fontSize: typographyLevels.m,
|
fontSize: typographyLevels.m,
|
||||||
color: palette.text.tertiary,
|
color: palette.primary.contrastText.tertiary,
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
},
|
},
|
||||||
body2: {
|
body2: {
|
||||||
fontSize: typographyLevels.s,
|
fontSize: typographyLevels.s,
|
||||||
color: palette.text.tertiary,
|
color: palette.primary.contrastText.tertiary,
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -97,7 +97,7 @@ const baseTheme = (palette) => ({
|
|||||||
"&.MuiLoadingButton-root": {
|
"&.MuiLoadingButton-root": {
|
||||||
"&:disabled": {
|
"&:disabled": {
|
||||||
backgroundColor: theme.palette.secondary.main,
|
backgroundColor: theme.palette.secondary.main,
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.primary.contrastText.main,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"&.MuiLoadingButton-loading": {
|
"&.MuiLoadingButton-loading": {
|
||||||
@@ -160,7 +160,7 @@ const baseTheme = (palette) => ({
|
|||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
backgroundColor: "inherit",
|
backgroundColor: "inherit",
|
||||||
padding: "4px 6px",
|
padding: "4px 6px",
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.primary.contrastText.secondary,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
margin: 2,
|
margin: 2,
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
@@ -193,7 +193,7 @@ const baseTheme = (palette) => ({
|
|||||||
borderStyle: "solid",
|
borderStyle: "solid",
|
||||||
borderColor: theme.palette.border.light,
|
borderColor: theme.palette.border.light,
|
||||||
"& button": {
|
"& button": {
|
||||||
color: theme.palette.text.tertiary,
|
color: theme.palette.primary.contrastText.tertiary,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
},
|
},
|
||||||
"& li:first-of-type button, & li:last-of-type button": {
|
"& li:first-of-type button, & li:last-of-type button": {
|
||||||
@@ -232,7 +232,7 @@ const baseTheme = (palette) => ({
|
|||||||
minHeight: "var(--env-var-height-2)",
|
minHeight: "var(--env-var-height-2)",
|
||||||
fontSize: "var(--env-var-font-size-medium)",
|
fontSize: "var(--env-var-font-size-medium)",
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
color: palette.text.secondary,
|
color: palette.primary.contrastText.secondary,
|
||||||
"&.Mui-disabled": {
|
"&.Mui-disabled": {
|
||||||
opacity: 0.3,
|
opacity: 0.3,
|
||||||
WebkitTextFillColor: "unset",
|
WebkitTextFillColor: "unset",
|
||||||
@@ -241,7 +241,7 @@ const baseTheme = (palette) => ({
|
|||||||
"& .MuiInputBase-input:-webkit-autofill": {
|
"& .MuiInputBase-input:-webkit-autofill": {
|
||||||
transition: "background-color 5000s ease-in-out 0s",
|
transition: "background-color 5000s ease-in-out 0s",
|
||||||
WebkitBoxShadow: `0 0 0px 1000px ${theme.palette.background.main} inset`,
|
WebkitBoxShadow: `0 0 0px 1000px ${theme.palette.background.main} inset`,
|
||||||
WebkitTextFillColor: theme.palette.text.primary,
|
WebkitTextFillColor: theme.palette.primary.contrastText.main,
|
||||||
},
|
},
|
||||||
"& .MuiInputBase-input.MuiOutlinedInput-input": {
|
"& .MuiInputBase-input.MuiOutlinedInput-input": {
|
||||||
padding: "0 var(--env-var-spacing-1-minus) !important",
|
padding: "0 var(--env-var-spacing-1-minus) !important",
|
||||||
|
|||||||
@@ -1,118 +1,31 @@
|
|||||||
import { createTheme } from "@mui/material";
|
import { createTheme } from "@mui/material";
|
||||||
import { baseTheme } from "./globalTheme";
|
import { baseTheme } from "./globalTheme";
|
||||||
import { colors } from "./constants";
|
import { colors, newSemanticColors } from "./constants";
|
||||||
|
|
||||||
/*
|
function extractThemeColors(themeType, colorObject) {
|
||||||
TODO
|
if (!["light", "dark"].includes(themeType)) {
|
||||||
Next step: check if all keys here are being used in the codebase. e.g.: Search codebase for palette.primary; also check for destructuring palette ('= theme.palette')
|
throw new Error('Invalid theme type. Use "light" or "dark".');
|
||||||
*/
|
}
|
||||||
|
|
||||||
const {
|
const extract = (obj) => {
|
||||||
primary,
|
if (typeof obj !== "object" || obj === null) {
|
||||||
secondary,
|
return obj;
|
||||||
success,
|
}
|
||||||
error,
|
|
||||||
warning,
|
|
||||||
neutral,
|
|
||||||
gradient: {
|
|
||||||
color1: { light: color1 },
|
|
||||||
color2: { light: color2 },
|
|
||||||
color3: { light: color3 },
|
|
||||||
color4: { light: color4 },
|
|
||||||
color5: { light: color5 },
|
|
||||||
},
|
|
||||||
background,
|
|
||||||
text,
|
|
||||||
border,
|
|
||||||
unresolved,
|
|
||||||
other,
|
|
||||||
} = colors;
|
|
||||||
|
|
||||||
const palette = {
|
if ("light" in obj && "dark" in obj) {
|
||||||
/* TODO check if we need the addition of a new color gray150 for this. Also, this color would probably fit for primary contrastText */
|
return obj[themeType]; // Return the value for the specified theme
|
||||||
action: {
|
}
|
||||||
disabled: border.light.disabled,
|
|
||||||
},
|
|
||||||
primary: { main: primary.main.light },
|
|
||||||
secondary: {
|
|
||||||
main: secondary.main.light,
|
|
||||||
contrastText: secondary.contrastText.light,
|
|
||||||
light: secondary.dark.light,
|
|
||||||
dark: secondary.dark.light,
|
|
||||||
},
|
|
||||||
success: {
|
|
||||||
main: success.main.light,
|
|
||||||
contrastText: success.contrastText.light,
|
|
||||||
light: success.light.light,
|
|
||||||
dark: success.dark.light,
|
|
||||||
},
|
|
||||||
error: {
|
|
||||||
main: error.main.light,
|
|
||||||
contrastText: error.contrastText.light,
|
|
||||||
light: error.light.light,
|
|
||||||
dark: error.dark.light,
|
|
||||||
},
|
|
||||||
warning: {
|
|
||||||
main: warning.main.light,
|
|
||||||
light: warning.light.light,
|
|
||||||
contrastText: warning.contrastText.light,
|
|
||||||
dark: warning.dark.light,
|
|
||||||
},
|
|
||||||
neutral: {
|
|
||||||
contrastText: neutral.contrastText.light,
|
|
||||||
},
|
|
||||||
/* From this part on, try to create semantic structure, not feature based structure */
|
|
||||||
percentage: {
|
|
||||||
uptimePoor: error.main.light,
|
|
||||||
uptimeFair: warning.contrastText.light,
|
|
||||||
uptimeGood: warning.main.light /* Change for a success color? */,
|
|
||||||
uptimeExcellent: success.main.light,
|
|
||||||
},
|
|
||||||
unresolved: {
|
|
||||||
main: unresolved.main.light,
|
|
||||||
light: unresolved.light.light,
|
|
||||||
bg: unresolved.bg.light,
|
|
||||||
},
|
|
||||||
divider: border.light.light,
|
|
||||||
other: {
|
|
||||||
icon: other.icon.light,
|
|
||||||
line: other.line.light,
|
|
||||||
fill: secondary.dark.light,
|
|
||||||
grid: other.grid.light,
|
|
||||||
autofill: other.autofill.light,
|
|
||||||
},
|
|
||||||
gradient: {
|
|
||||||
color1,
|
|
||||||
color2,
|
|
||||||
color3,
|
|
||||||
color4,
|
|
||||||
color5,
|
|
||||||
},
|
|
||||||
text: {
|
|
||||||
primary: text.primary.light,
|
|
||||||
secondary: text.secondary.light,
|
|
||||||
tertiary: text.tertiary.light,
|
|
||||||
accent: text.accent.light,
|
|
||||||
},
|
|
||||||
background: {
|
|
||||||
main: background.main.light,
|
|
||||||
alt: background.alt.light,
|
|
||||||
fill: background.fill.light,
|
|
||||||
accent: background.accent.light,
|
|
||||||
},
|
|
||||||
border: {
|
|
||||||
light: border.light.light,
|
|
||||||
dark: border.dark.light,
|
|
||||||
},
|
|
||||||
info: {
|
|
||||||
text: text.primary.light,
|
|
||||||
main: text.tertiary.light,
|
|
||||||
bg: background.main.light,
|
|
||||||
light: background.main.light,
|
|
||||||
border: border.dark.light,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
|
// Reduce the object, keeping only the extracted themeType values
|
||||||
|
return Object.keys(obj).reduce((acc, key) => {
|
||||||
|
acc[key] = extract(obj[key]);
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
};
|
||||||
|
|
||||||
|
return extract(colorObject);
|
||||||
|
}
|
||||||
|
const palette = extractThemeColors("light", newSemanticColors);
|
||||||
/* TODO I figured out we could have just one theme by passing mode as parameter for theme function. Implement later */
|
/* TODO I figured out we could have just one theme by passing mode as parameter for theme function. Implement later */
|
||||||
const lightTheme = createTheme({
|
const lightTheme = createTheme({
|
||||||
palette,
|
palette,
|
||||||
@@ -120,3 +33,114 @@ const lightTheme = createTheme({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export default lightTheme;
|
export default lightTheme;
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO
|
||||||
|
Next step: check if all keys here are being used in the codebase. e.g.: Search codebase for palette.primary; also check for destructuring palette ('= theme.palette')
|
||||||
|
*/
|
||||||
|
|
||||||
|
// const {
|
||||||
|
// primary,
|
||||||
|
// secondary,
|
||||||
|
// success,
|
||||||
|
// error,
|
||||||
|
// warning,
|
||||||
|
// neutral,
|
||||||
|
// gradient: {
|
||||||
|
// color1: { light: color1 },
|
||||||
|
// color2: { light: color2 },
|
||||||
|
// color3: { light: color3 },
|
||||||
|
// color4: { light: color4 },
|
||||||
|
// color5: { light: color5 },
|
||||||
|
// },
|
||||||
|
// background,
|
||||||
|
// text,
|
||||||
|
// border,
|
||||||
|
// unresolved,
|
||||||
|
// other,
|
||||||
|
// } = colors;
|
||||||
|
|
||||||
|
// const palette = {
|
||||||
|
// /* TODO check if we need the addition of a new color gray150 for this. Also, this color would probably fit for primary contrastText */
|
||||||
|
// action: {
|
||||||
|
// disabled: border.light.disabled,
|
||||||
|
// },
|
||||||
|
// primary: { main: primary.main.light },
|
||||||
|
// secondary: {
|
||||||
|
// main: secondary.main.light,
|
||||||
|
// contrastText: secondary.contrastText.light,
|
||||||
|
// light: secondary.dark.light,
|
||||||
|
// dark: secondary.dark.light,
|
||||||
|
// },
|
||||||
|
// success: {
|
||||||
|
// main: success.main.light,
|
||||||
|
// contrastText: success.contrastText.light,
|
||||||
|
// light: success.light.light,
|
||||||
|
// dark: success.dark.light,
|
||||||
|
// },
|
||||||
|
// error: {
|
||||||
|
// main: error.main.light,
|
||||||
|
// contrastText: error.contrastText.light,
|
||||||
|
// light: error.light.light,
|
||||||
|
// dark: error.dark.light,
|
||||||
|
// },
|
||||||
|
// warning: {
|
||||||
|
// main: warning.main.light,
|
||||||
|
// light: warning.light.light,
|
||||||
|
// contrastText: warning.contrastText.light,
|
||||||
|
// dark: warning.dark.light,
|
||||||
|
// },
|
||||||
|
// neutral: {
|
||||||
|
// contrastText: neutral.contrastText.light,
|
||||||
|
// },
|
||||||
|
// /* From this part on, try to create semantic structure, not feature based structure */
|
||||||
|
// percentage: {
|
||||||
|
// uptimePoor: error.main.light,
|
||||||
|
// uptimeFair: warning.contrastText.light,
|
||||||
|
// uptimeGood: warning.main.light /* Change for a success color? */,
|
||||||
|
// uptimeExcellent: success.main.light,
|
||||||
|
// },
|
||||||
|
// unresolved: {
|
||||||
|
// main: unresolved.main.light,
|
||||||
|
// light: unresolved.light.light,
|
||||||
|
// bg: unresolved.bg.light,
|
||||||
|
// },
|
||||||
|
// divider: border.light.light,
|
||||||
|
// other: {
|
||||||
|
// icon: other.icon.light,
|
||||||
|
// line: other.line.light,
|
||||||
|
// fill: secondary.dark.light,
|
||||||
|
// grid: other.grid.light,
|
||||||
|
// autofill: other.autofill.light,
|
||||||
|
// },
|
||||||
|
// gradient: {
|
||||||
|
// color1,
|
||||||
|
// color2,
|
||||||
|
// color3,
|
||||||
|
// color4,
|
||||||
|
// color5,
|
||||||
|
// },
|
||||||
|
// text: {
|
||||||
|
// primary: text.primary.light,
|
||||||
|
// secondary: text.secondary.light,
|
||||||
|
// tertiary: text.tertiary.light,
|
||||||
|
// accent: text.accent.light,
|
||||||
|
// },
|
||||||
|
// background: {
|
||||||
|
// main: background.main.light,
|
||||||
|
// alt: background.alt.light,
|
||||||
|
// fill: background.fill.light,
|
||||||
|
// accent: background.accent.light,
|
||||||
|
// },
|
||||||
|
// border: {
|
||||||
|
// light: border.light.light,
|
||||||
|
// dark: border.dark.light,
|
||||||
|
// },
|
||||||
|
// info: {
|
||||||
|
// text: text.primary.light,
|
||||||
|
// main: text.tertiary.light,
|
||||||
|
// bg: background.main.light,
|
||||||
|
// light: background.main.light,
|
||||||
|
// border: border.dark.light,
|
||||||
|
// },
|
||||||
|
// };
|
||||||
@@ -170,7 +170,7 @@ const Greeting = ({ type = "" }) => {
|
|||||||
component="span"
|
component="span"
|
||||||
fontSize="inherit"
|
fontSize="inherit"
|
||||||
fontWeight="inherit"
|
fontWeight="inherit"
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.primary.contrastText.secondary}
|
||||||
>
|
>
|
||||||
{firstName} {emoji}
|
{firstName} {emoji}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
Reference in new issue
Block a user