feat: changing background accent for tertiary main
This commit is contained in:
1 parent
6bb38c9339
commit
c0df164e46
14 files changed
+25
-24
No files matched your search
@@ -32,13 +32,16 @@ const Avatar = ({ src, small, sx }) => {
|
|||||||
return (
|
return (
|
||||||
<MuiAvatar
|
<MuiAvatar
|
||||||
alt={`${user?.firstName} ${user?.lastName}`}
|
alt={`${user?.firstName} ${user?.lastName}`}
|
||||||
|
/* TODO What is the /static/images/avatar/2.jpg ?*/
|
||||||
src={src ? src : user?.avatarImage ? image : "/static/images/avatar/2.jpg"}
|
src={src ? src : user?.avatarImage ? image : "/static/images/avatar/2.jpg"}
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: small ? "16px" : "22px",
|
fontSize: small ? "16px" : "22px",
|
||||||
color: "white",
|
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
backgroundColor: theme.palette.primary.main, // Same BG color as checkmate BG in sidebar
|
color: theme.palette.accent.contrastText,
|
||||||
|
backgroundColor: theme.palette.accent.main, // Same BG color as checkmate BG in sidebar
|
||||||
display: "inline-flex",
|
display: "inline-flex",
|
||||||
|
/*
|
||||||
|
TODO not sure what this is for*/
|
||||||
"&::before": {
|
"&::before": {
|
||||||
content: `""`,
|
content: `""`,
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
@@ -54,7 +57,7 @@ const Avatar = ({ src, small, sx }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{user.firstName?.charAt(0)}
|
{user.firstName?.charAt(0)}
|
||||||
{user.lastName?.charAt(0) || ''}
|
{user.lastName?.charAt(0) || ""}
|
||||||
</MuiAvatar>
|
</MuiAvatar>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ const IconBox = styled(Box)(
|
|||||||
borderStyle: "solid",
|
borderStyle: "solid",
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.primary.lowContrast,
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
backgroundColor: theme.palette.background.accent,
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
"& svg": {
|
"& svg": {
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
top: "50%",
|
top: "50%",
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ const Checkbox = ({
|
|||||||
mr: theme.spacing(6),
|
mr: theme.spacing(6),
|
||||||
},
|
},
|
||||||
"&:not(:has(.Mui-disabled)):hover": {
|
"&:not(:has(.Mui-disabled)):hover": {
|
||||||
backgroundColor: theme.palette.background.accent,
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
},
|
},
|
||||||
"& span.MuiTypography-root": {
|
"& span.MuiTypography-root": {
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ const Radio = (props) => {
|
|||||||
m: theme.spacing(-2.5),
|
m: theme.spacing(-2.5),
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
backgroundColor: theme.palette.background.accent,
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
},
|
},
|
||||||
"& .MuiButtonBase-root": {
|
"& .MuiButtonBase-root": {
|
||||||
p: 0,
|
p: 0,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export const HttpAdornment = ({ https }) => {
|
|||||||
height="100%"
|
height="100%"
|
||||||
sx={{
|
sx={{
|
||||||
borderRight: `solid 1px ${theme.palette.primary.lowContrast}`,
|
borderRight: `solid 1px ${theme.palette.primary.lowContrast}`,
|
||||||
backgroundColor: theme.palette.background.accent,
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
pl: theme.spacing(6),
|
pl: theme.spacing(6),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -157,7 +157,6 @@ function Sidebar() {
|
|||||||
}, [location]);
|
}, [location]);
|
||||||
|
|
||||||
/* TODO refactor this, there are a some ternaries and comments in the return */
|
/* TODO refactor this, there are a some ternaries and comments in the return */
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
component="aside"
|
component="aside"
|
||||||
@@ -170,9 +169,8 @@ function Sidebar() {
|
|||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
/* TODO selected item */
|
/* TODO selected item */
|
||||||
"& .selected-path": {
|
"& .selected-path": {
|
||||||
/* TODO lookup theme.palette.background.accent */
|
/* TODO lookup theme.palette.tertiary.main */
|
||||||
backgroundColor:
|
backgroundColor: theme.palette.secondary.main /* theme.palette.tertiary.main */,
|
||||||
theme.palette.secondary.main /* theme.palette.background.accent */,
|
|
||||||
|
|
||||||
/* TODO not working */
|
/* TODO not working */
|
||||||
color: theme.palette.primary.main,
|
color: theme.palette.primary.main,
|
||||||
@@ -383,7 +381,7 @@ function Sidebar() {
|
|||||||
sx={{
|
sx={{
|
||||||
ml: theme.spacing(8),
|
ml: theme.spacing(8),
|
||||||
"& .selected-path": {
|
"& .selected-path": {
|
||||||
backgroundColor: theme.palette.background.accent,
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const StatBox = ({ heading, subHeading, sx }) => {
|
|||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.primary.lowContrast,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
backgroundColor: theme.palette.background.main,
|
backgroundColor: theme.palette.background.main,
|
||||||
/* background: `linear-gradient(340deg, ${theme.palette.background.accent} 20%, ${theme.palette.background.main} 45%)`, */
|
/* background: `linear-gradient(340deg, ${theme.palette.tertiary.main} 20%, ${theme.palette.background.main} 45%)`, */
|
||||||
"& h2": {
|
"& h2": {
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
|
|||||||
@@ -232,21 +232,21 @@ function Infrastructure() {
|
|||||||
color={theme.palette.primary.contrastText.main}
|
color={theme.palette.primary.contrastText.main}
|
||||||
border={1}
|
border={1}
|
||||||
borderColor={theme.palette.primary.lowContrast}
|
borderColor={theme.palette.primary.lowContrast}
|
||||||
backgroundColor={theme.palette.background.accent}
|
backgroundColor={theme.palette.tertiary.main}
|
||||||
>
|
>
|
||||||
{totalMonitors}
|
{totalMonitors}
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
<TableContainer component={Paper}>
|
<TableContainer component={Paper}>
|
||||||
<Table stickyHeader>
|
<Table stickyHeader>
|
||||||
<TableHead sx={{ backgroundColor: theme.palette.background.accent }}>
|
<TableHead sx={{ backgroundColor: theme.palette.tertiary.main }}>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
{columns.map((column, index) => (
|
{columns.map((column, index) => (
|
||||||
<TableCell
|
<TableCell
|
||||||
key={index}
|
key={index}
|
||||||
align={index === 0 ? "left" : "center"}
|
align={index === 0 ? "left" : "center"}
|
||||||
sx={{
|
sx={{
|
||||||
backgroundColor: theme.palette.background.accent,
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{column.label}
|
{column.label}
|
||||||
@@ -263,7 +263,7 @@ function Infrastructure() {
|
|||||||
sx={{
|
sx={{
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
backgroundColor: theme.palette.background.accent,
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ const PageSpeedConfigure = () => {
|
|||||||
gap={theme.spacing(20)}
|
gap={theme.spacing(20)}
|
||||||
sx={{
|
sx={{
|
||||||
".MuiInputBase-root:has(> .Mui-disabled)": {
|
".MuiInputBase-root:has(> .Mui-disabled)": {
|
||||||
backgroundColor: theme.palette.background.accent,
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export const ChartBox = styled(Stack)(({ theme }) => ({
|
|||||||
borderLeftColor: theme.palette.primary.lowContrast,
|
borderLeftColor: theme.palette.primary.lowContrast,
|
||||||
borderRadius: 16,
|
borderRadius: 16,
|
||||||
backgroundColor: theme.palette.background.main,
|
backgroundColor: theme.palette.background.main,
|
||||||
background: `linear-gradient(325deg, ${theme.palette.background.accent} 20%, ${theme.palette.background.main} 45%)`,
|
background: `linear-gradient(325deg, ${theme.palette.tertiary.main} 20%, ${theme.palette.background.main} 45%)`,
|
||||||
},
|
},
|
||||||
"& path": {
|
"& path": {
|
||||||
transition: "stroke-width 400ms ease",
|
transition: "stroke-width 400ms ease",
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ const Card = ({ monitor }) => {
|
|||||||
gridTemplateRows: "34px 1fr 3fr",
|
gridTemplateRows: "34px 1fr 3fr",
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
backgroundColor: theme.palette.background.accent,
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
},
|
},
|
||||||
"& path": {
|
"& path": {
|
||||||
transition: "stroke-width 400ms ease",
|
transition: "stroke-width 400ms ease",
|
||||||
@@ -279,7 +279,7 @@ const Card = ({ monitor }) => {
|
|||||||
borderTop={1}
|
borderTop={1}
|
||||||
borderRight={1}
|
borderRight={1}
|
||||||
borderColor={theme.palette.primary.lowContrast}
|
borderColor={theme.palette.primary.lowContrast}
|
||||||
backgroundColor={theme.palette.background.accent}
|
backgroundColor={theme.palette.tertiary.main}
|
||||||
sx={{
|
sx={{
|
||||||
pointerEvents: "none",
|
pointerEvents: "none",
|
||||||
userSelect: "none",
|
userSelect: "none",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ const PageSpeed = () => {
|
|||||||
color={theme.palette.primary.contrastText.main}
|
color={theme.palette.primary.contrastText.main}
|
||||||
border={1}
|
border={1}
|
||||||
borderColor={theme.palette.primary.lowContrast}
|
borderColor={theme.palette.primary.lowContrast}
|
||||||
backgroundColor={theme.palette.background.accent}
|
backgroundColor={theme.palette.tertiary.main}
|
||||||
>
|
>
|
||||||
{monitorCount}
|
{monitorCount}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const CurrentMonitoring = ({ totalMonitors, monitors, isAdmin, handlePause }) =>
|
|||||||
color={theme.palette.primary.contrastText.main}
|
color={theme.palette.primary.contrastText.main}
|
||||||
border={1}
|
border={1}
|
||||||
borderColor={theme.palette.primary.lowContrast}
|
borderColor={theme.palette.primary.lowContrast}
|
||||||
backgroundColor={theme.palette.background.accent}
|
backgroundColor={theme.palette.tertiary.main}
|
||||||
>
|
>
|
||||||
{totalMonitors}
|
{totalMonitors}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ const baseTheme = (palette) => ({
|
|||||||
MuiTableHead: {
|
MuiTableHead: {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: ({ theme }) => ({
|
root: ({ theme }) => ({
|
||||||
backgroundColor: theme.palette.background.accent,
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user