From 05040f21a224f017b8bd5c235177a78265597423 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 20 Feb 2025 11:47:30 -0800 Subject: [PATCH 1/4] add style prop to Dot --- src/Components/Dot/index.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Components/Dot/index.jsx b/src/Components/Dot/index.jsx index 0fd51730f..0676d0a6f 100644 --- a/src/Components/Dot/index.jsx +++ b/src/Components/Dot/index.jsx @@ -1,6 +1,6 @@ import PropTypes from "prop-types"; -const Dot = ({ color = "gray", size = "4px" }) => { +const Dot = ({ color = "gray", size = "4px", style }) => { return ( { borderRadius: "50%", backgroundColor: color, opacity: 0.8, + ...style, }} /> ); From 15be7d723c9c1c8075e27a4b4bb54256de8f817d Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 20 Feb 2025 11:48:09 -0800 Subject: [PATCH 2/4] add chatbot colors --- src/Utils/Theme/constants.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Utils/Theme/constants.js b/src/Utils/Theme/constants.js index 3ad938db9..c81a07f99 100644 --- a/src/Utils/Theme/constants.js +++ b/src/Utils/Theme/constants.js @@ -276,19 +276,30 @@ const newSemanticColors = { light: newColors.red700, dark: newColors.red700, }, - primaryText: { + textPrimary: { light: "#34D399", dark: "#34D399", }, - primaryTextBackground: { + textPrimaryBackground: { light: "#094434", dark: "#094434", }, - secondaryText: { + textSecondary: { light: "#22946C", dark: "#22946C", }, }, + + chatbot: { + background: { + light: "#112B2B", + dark: "#112B2B", + }, + textAccent: { + light: "#C084FC", + dark: "#C084FC", + }, + }, }; export { typographyLevels, semanticColors as colors, newSemanticColors }; From 8ccbbfe74554ee5f9e106037d1fb36a11857b0b7 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 20 Feb 2025 11:48:46 -0800 Subject: [PATCH 3/4] add chatbot --- .../Details/Components/StatusHeader/index.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Pages/DistributedUptime/Details/Components/StatusHeader/index.jsx b/src/Pages/DistributedUptime/Details/Components/StatusHeader/index.jsx index 332ae812e..c5a861fca 100644 --- a/src/Pages/DistributedUptime/Details/Components/StatusHeader/index.jsx +++ b/src/Pages/DistributedUptime/Details/Components/StatusHeader/index.jsx @@ -3,6 +3,7 @@ import { ColContainer } from "../../../../../Components/StandardContainer"; import { Stack, Typography } from "@mui/material"; import PulseDot from "../../../../../Components/Animated/PulseDot"; import LastUpdate from "../LastUpdate"; +import ChatBot from "../Chatbot"; // Utils import { useTheme } from "@emotion/react"; @@ -44,7 +45,7 @@ const StatusHeader = ({ monitor, connectionStatus }) => { > {MSG_MAP[connectionStatus]} @@ -53,16 +54,16 @@ const StatusHeader = ({ monitor, connectionStatus }) => { borderRadius={theme.spacing(8)} padding={theme.spacing(4)} backgroundColor={ - theme.palette.distributedStatusHeader.primaryTextBackground + theme.palette.distributedStatusHeader.textPrimaryBackground } - color={theme.palette.distributedStatusHeader.primaryText} + color={theme.palette.distributedStatusHeader.textPrimary} > Uptime: {(monitor.totalUptime * 100).toFixed(2)}% Last updated{" "} { + ); }; From 73723da1d1309705c9f6f4b30add95dcdeb248d0 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 20 Feb 2025 11:48:53 -0800 Subject: [PATCH 4/4] add chatbot component --- .../Details/Components/Chatbot/index.jsx | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/Pages/DistributedUptime/Details/Components/Chatbot/index.jsx diff --git a/src/Pages/DistributedUptime/Details/Components/Chatbot/index.jsx b/src/Pages/DistributedUptime/Details/Components/Chatbot/index.jsx new file mode 100644 index 000000000..00af46f6b --- /dev/null +++ b/src/Pages/DistributedUptime/Details/Components/Chatbot/index.jsx @@ -0,0 +1,48 @@ +// Components +import { Stack, Typography } from "@mui/material"; +import { ColContainer } from "../../../../../Components/StandardContainer"; +import SmartToyIcon from "@mui/icons-material/SmartToy"; +import Dot from "../../../../../Components/Dot"; +// Utils +import { useTheme } from "@emotion/react"; + +const MESSAGES = [ + "I've checked the network status, and we're seeing excellent performance across all regions.", + "The network is stable and functioning optimally. All connections are active and stable.", + "I've reviewed the network status, and everything looks great. No issues detected.", + "The network is up and running smoothly. All connections are active and stable.", + "I've checked the network status, and everything is looking good. No issues detected.", +]; + +const ChatBot = ({ sx }) => { + const theme = useTheme(); + return ( + + + + Status Bot + + + Now + + + {MESSAGES[Math.floor(Math.random() * MESSAGES.length)]} + + ); +}; + +export default ChatBot;