Added darkmode warning palette

This commit is contained in:
Daniel Cojocea committed 2024-08-30 12:53:23 -04:00
1 parent 15defa33eb
commit d56ee2abb7
4 files changed
+32 -54

No files matched your search

+4 -33
View File
@@ -200,31 +200,12 @@ const BasicTable = ({ data, paginated, reversed, table }) => {
return ( return (
<> <>
<TableContainer <TableContainer component={Paper}>
component={Paper}
sx={{
backgroundColor: theme.palette.background.main,
border: `solid 1px ${theme.palette.border.light}`,
borderRadius: theme.shape.borderRadius,
}}
>
<Table> <Table>
<TableHead <TableHead>
sx={{
backgroundColor: theme.palette.background.accent,
}}
>
<TableRow> <TableRow>
{data.cols.map((col) => ( {data.cols.map((col) => (
<TableCell <TableCell key={col.id}>{col.name}</TableCell>
key={col.id}
sx={{
color: theme.palette.text.secondary,
borderBottomColor: theme.palette.border.light,
}}
>
{col.name}
</TableCell>
))} ))}
</TableRow> </TableRow>
</TableHead> </TableHead>
@@ -242,17 +223,7 @@ const BasicTable = ({ data, paginated, reversed, table }) => {
onClick={row.handleClick ? row.handleClick : null} onClick={row.handleClick ? row.handleClick : null}
> >
{row.data.map((cell) => { {row.data.map((cell) => {
return ( return <TableCell key={cell.id}>{cell.data}</TableCell>;
<TableCell
key={cell.id}
sx={{
color: theme.palette.text.secondary,
borderBottomColor: theme.palette.border.light,
}}
>
{cell.data}
</TableCell>
);
})} })}
</TableRow> </TableRow>
); );
+18 -3
View File
@@ -598,8 +598,9 @@ function Sidebar() {
MenuListProps={{ MenuListProps={{
sx: { sx: {
p: 2, p: 2,
"& li": { m: 0 },
"& li:has(.MuiBox-root):hover": { "& li:has(.MuiBox-root):hover": {
backgroundColor: theme.palette.background.main, backgroundColor: "transparent",
}, },
}, },
}} }}
@@ -620,8 +621,22 @@ function Sidebar() {
</MenuItem> </MenuItem>
)} )}
{collapsed && <Divider />} {collapsed && <Divider />}
<MenuItem onClick={() => dispatch(setMode("light"))}>Light</MenuItem> <MenuItem
<MenuItem onClick={() => dispatch(setMode("dark"))}>Dark</MenuItem> onClick={() => {
dispatch(setMode("light"));
closePopup();
}}
>
Light
</MenuItem>
<MenuItem
onClick={() => {
dispatch(setMode("dark"));
closePopup();
}}
>
Dark
</MenuItem>
<Divider /> <Divider />
<MenuItem <MenuItem
onClick={logout} onClick={logout}
+2 -11
View File
@@ -93,17 +93,8 @@ const ActionsMenu = ({ monitor, isAdmin }) => {
slotProps={{ slotProps={{
paper: { paper: {
sx: { sx: {
"& ul": { "& ul": { p: theme.spacing(2.5) },
p: theme.spacing(2.5), "& li": { m: 0 },
minWidth: "100px",
},
"& li": {
color: theme.palette.text.secondary,
fontSize: 13,
px: theme.spacing(4),
py: theme.spacing(2.5),
borderRadius: theme.shape.borderRadius,
},
"& li:last-of-type": { "& li:last-of-type": {
color: theme.palette.error.text, color: theme.palette.error.text,
}, },
+8 -7
View File
@@ -38,22 +38,22 @@ const darkTheme = createTheme({
success: { success: {
text: "#079455", text: "#079455",
main: "#45bb7a", main: "#45bb7a",
light: "#93d5aa", light: "#1e1e1e",
bg: "#27272a", bg: "#27272a",
}, },
error: { error: {
text: "#f04438", text: "#f04438",
main: "#d32f2f", main: "#d32f2f",
light: "#f04438", light: "#1e1e1e",
bg: "#27272a", bg: "#27272a",
border: "#f04438", border: "#f04438",
}, },
warning: { warning: {
text: "#DC6803", text: "#e88c30",
main: "#e88c30", main: "#FF9F00",
light: "#fffcf5", light: "#27272a",
bg: "#ffecbc", bg: "#1E1E1E",
border: "#fec84b", border: "#e88c30",
}, },
unresolved: { main: "#4e5ba6", light: "#e2eaf7", bg: "#f2f4f7" }, unresolved: { main: "#4e5ba6", light: "#e2eaf7", bg: "#f2f4f7" },
divider: border.light, divider: border.light,
@@ -102,6 +102,7 @@ const darkTheme = createTheme({
borderRadius: 4, borderRadius: 4,
boxShadow: shadow, boxShadow: shadow,
backgroundColor: background.main, backgroundColor: background.main,
backgroundImage: "none",
}, },
}, },
}, },