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, }} /> ); 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; 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{" "} { + ); }; 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 };