From 82cbb902027fd69c87704af8df3a07ff6d8615e5 Mon Sep 17 00:00:00 2001 From: Daniel Cojocea Date: Fri, 30 Aug 2024 14:11:48 -0400 Subject: [PATCH 1/3] Added dark mode fallback placeholder skeleton --- Client/src/Components/Fallback/index.jsx | 11 ++++-- Client/src/Components/Inputs/Select/index.jsx | 1 + Client/src/Pages/Monitors/Configure/index.jsx | 8 +---- .../assets/Images/create-placeholder-dark.svg | 36 +++++++++++++++++++ 4 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 Client/src/assets/Images/create-placeholder-dark.svg diff --git a/Client/src/Components/Fallback/index.jsx b/Client/src/Components/Fallback/index.jsx index 22ac837b0..26d818bdf 100644 --- a/Client/src/Components/Fallback/index.jsx +++ b/Client/src/Components/Fallback/index.jsx @@ -2,10 +2,12 @@ import PropTypes from "prop-types"; import { useTheme } from "@emotion/react"; import { Box, Stack, Typography } from "@mui/material"; import Skeleton from "../../assets/Images/create-placeholder.svg?react"; +import SkeletonDark from "../../assets/Images/create-placeholder-dark.svg?react"; import Background from "../../assets/Images/background-grid.svg?react"; import Button from "../Button"; import Check from "../Check/Check"; import { useNavigate } from "react-router-dom"; +import { useSelector } from "react-redux"; import "./index.css"; /** @@ -22,6 +24,7 @@ import "./index.css"; const Fallback = ({ title, checks, link = "/", isAdmin }) => { const theme = useTheme(); const navigate = useNavigate(); + const mode = useSelector((state) => state.ui.mode); return ( { alignItems="center" gap={theme.spacing(20)} > - + {mode === "light" ? ( + + ) : ( + + )} { A {title} is used to: diff --git a/Client/src/Components/Inputs/Select/index.jsx b/Client/src/Components/Inputs/Select/index.jsx index b7146f27a..e30b5d951 100644 --- a/Client/src/Components/Inputs/Select/index.jsx +++ b/Client/src/Components/Inputs/Select/index.jsx @@ -67,6 +67,7 @@ const Select = ({ component="h3" color={theme.palette.text.secondary} fontWeight={500} + fontSize={13} > {label} diff --git a/Client/src/Pages/Monitors/Configure/index.jsx b/Client/src/Pages/Monitors/Configure/index.jsx index 9a90c5512..61d7d155c 100644 --- a/Client/src/Pages/Monitors/Configure/index.jsx +++ b/Client/src/Pages/Monitors/Configure/index.jsx @@ -252,16 +252,11 @@ const Configure = () => { isLoading={isLoading} level="tertiary" label={monitor?.isActive ? "Pause" : "Resume"} - animate="rotate180" img={} sx={{ backgroundColor: theme.palette.background.main, - pl: theme.spacing(4), - pr: theme.spacing(6), + px: theme.spacing(6), mr: theme.spacing(6), - "& svg": { - mr: theme.spacing(2), - }, }} onClick={handlePause} /> @@ -270,7 +265,6 @@ const Configure = () => { level="error" label="Remove" sx={{ - boxShadow: "none", px: theme.spacing(8), }} onClick={() => setIsOpen(true)} diff --git a/Client/src/assets/Images/create-placeholder-dark.svg b/Client/src/assets/Images/create-placeholder-dark.svg new file mode 100644 index 000000000..670da4776 --- /dev/null +++ b/Client/src/assets/Images/create-placeholder-dark.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From ae1c1b2cb4eb726839682b60e6a33947c19a8853 Mon Sep 17 00:00:00 2001 From: Daniel Cojocea Date: Fri, 30 Aug 2024 14:25:03 -0400 Subject: [PATCH 2/3] Dimmed down grid line color --- Client/src/Pages/Monitors/Home/StatusBox.jsx | 26 +++++++++++--------- Client/src/Utils/Theme/darkTheme.js | 1 + Client/src/Utils/Theme/lightTheme.js | 1 + 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Client/src/Pages/Monitors/Home/StatusBox.jsx b/Client/src/Pages/Monitors/Home/StatusBox.jsx index a7c56d75a..08b2e88d9 100644 --- a/Client/src/Pages/Monitors/Home/StatusBox.jsx +++ b/Client/src/Pages/Monitors/Home/StatusBox.jsx @@ -2,7 +2,7 @@ import PropTypes from "prop-types"; import { useTheme } from "@emotion/react"; import { Box, Stack, Typography } from "@mui/material"; import Arrow from "../../../assets/icons/top-right-arrow.svg?react"; -import background from "../../../assets/Images/background-grid.svg"; +import Background from "../../../assets/Images/background-grid.svg?react"; import ClockSnooze from "../../../assets/icons/clock-snooze.svg?react"; const StatusBox = ({ title, value }) => { @@ -55,19 +55,21 @@ const StatusBox = ({ title, value }) => { "&:hover": { backgroundColor: theme.palette.background.accent, }, - "&:after": { - position: "absolute", - content: `""`, - backgroundImage: `url(${background})`, - width: "400px", - height: "200px", - top: "-10%", - left: "5%", - zIndex: 10000, - pointerEvents: "none", - }, }} > + + + Date: Fri, 30 Aug 2024 14:34:49 -0400 Subject: [PATCH 3/3] Updated placeholder color values --- Client/src/assets/Images/create-placeholder-dark.svg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Client/src/assets/Images/create-placeholder-dark.svg b/Client/src/assets/Images/create-placeholder-dark.svg index 670da4776..2dd68750b 100644 --- a/Client/src/assets/Images/create-placeholder-dark.svg +++ b/Client/src/assets/Images/create-placeholder-dark.svg @@ -2,8 +2,8 @@ - - + + @@ -12,7 +12,7 @@ - +