From 30b7856c44b3f3572408738f04745f8dfc8e33e5 Mon Sep 17 00:00:00 2001 From: Daniel Cojocea Date: Thu, 1 Aug 2024 20:12:30 -0400 Subject: [PATCH] Updated default font and some small styling changes --- Client/src/Components/Avatar/index.jsx | 3 ++- Client/src/Components/BasicTable/index.css | 8 +++++-- Client/src/Components/Button/index.jsx | 3 ++- .../Charts/Servers/ServerStatus.jsx | 11 +-------- Client/src/Components/Inputs/Field/index.css | 1 + Client/src/Components/Inputs/Select/index.css | 3 +++ Client/src/Pages/Account/index.css | 5 ++-- Client/src/Pages/Account/index.jsx | 9 +++---- Client/src/Pages/Auth/Login.jsx | 8 +++---- Client/src/Pages/Auth/index.css | 2 +- Client/src/Pages/Monitors/Details/index.jsx | 12 ++++++++-- Client/src/Pages/PageSpeed/index.css | 4 ++++ Client/src/Pages/PageSpeed/index.jsx | 24 +++++++++++++++---- Client/src/Utils/Theme.js | 9 +++---- Client/src/index.css | 2 ++ 15 files changed, 64 insertions(+), 40 deletions(-) diff --git a/Client/src/Components/Avatar/index.jsx b/Client/src/Components/Avatar/index.jsx index ebb669cf6..4f4351508 100644 --- a/Client/src/Components/Avatar/index.jsx +++ b/Client/src/Components/Avatar/index.jsx @@ -35,7 +35,8 @@ const Avatar = ({ src, small, sx }) => { src ? src : user?.avatarImage ? image : "/static/images/avatar/2.jpg" } sx={{ - fontSize: small ? "13px" : "20px", + fontSize: small ? "13px" : "22px", + fontWeight: 400, display: "inline-flex", "&::before": { content: `""`, diff --git a/Client/src/Components/BasicTable/index.css b/Client/src/Components/BasicTable/index.css index 5e2a7424e..83eedb322 100644 --- a/Client/src/Components/BasicTable/index.css +++ b/Client/src/Components/BasicTable/index.css @@ -85,7 +85,11 @@ .MuiPaper-root + .MuiPagination-root ul { justify-content: center; } -.MuiPaper-root + .MuiPagination-root ul li button { +.MuiPaper-root + + .MuiPagination-root + ul + li:not(:first-child):not(:last-child) + button { font-size: var(--env-var-font-size-medium); color: var(--env-var-color-5); font-weight: 500; @@ -123,6 +127,6 @@ .MuiPaper-root + .MuiPagination-root .MuiPaginationItem-root.Mui-selected { background-color: var(--env-var-color-15); } -.MuiPaper-root + .MuiPagination-root div.MuiPaginationItem-root{ +.MuiPaper-root + .MuiPagination-root div.MuiPaginationItem-root { user-select: none; } diff --git a/Client/src/Components/Button/index.jsx b/Client/src/Components/Button/index.jsx index 9078e2497..bba101dc1 100644 --- a/Client/src/Components/Button/index.jsx +++ b/Client/src/Components/Button/index.jsx @@ -72,7 +72,8 @@ const Button = ({ onClick={onClick} disableRipple sx={{ - lineHeight: 1, + lineHeight: 1.5, + fontWeight: 400, boxShadow: "none", textTransform: "none", "&:focus": { diff --git a/Client/src/Components/Charts/Servers/ServerStatus.jsx b/Client/src/Components/Charts/Servers/ServerStatus.jsx index 632971ab1..c06d0436b 100644 --- a/Client/src/Components/Charts/Servers/ServerStatus.jsx +++ b/Client/src/Components/Charts/Servers/ServerStatus.jsx @@ -1,7 +1,6 @@ import React from "react"; import "./serverStatus.css"; import PropTypes from "prop-types"; -import { useTheme } from "@mui/material"; /** * @component @@ -12,16 +11,8 @@ import { useTheme } from "@mui/material"; * @returns {JSX.Element} - Renders the server status component */ const ServerStatus = ({ title, value, state }) => { - const theme = useTheme(); - - const fontLookup = { - default: theme.font.default.font, - }; - - const fontFamily = fontLookup["default"]; - return ( -
+
{title}
{value}
diff --git a/Client/src/Components/Inputs/Field/index.css b/Client/src/Components/Inputs/Field/index.css index c08c8876e..3e2435694 100644 --- a/Client/src/Components/Inputs/Field/index.css +++ b/Client/src/Components/Inputs/Field/index.css @@ -24,6 +24,7 @@ .field h3.MuiTypography-root span.field-optional { opacity: 0.6; margin-left: 4px; + font-weight: 400; } .field h5.MuiTypography-root { position: relative; diff --git a/Client/src/Components/Inputs/Select/index.css b/Client/src/Components/Inputs/Select/index.css index 1e8e4e354..1952feb43 100644 --- a/Client/src/Components/Inputs/Select/index.css +++ b/Client/src/Components/Inputs/Select/index.css @@ -15,6 +15,9 @@ font-size: var(--env-var-font-size-medium); color: var(--env-var-color-5); } +.select-wrapper h3.MuiTypography-root{ + font-weight: 500; +} .MuiInputBase-root:has(> .MuiSelect-select) fieldset { border-color: var(--env-var-color-29); } diff --git a/Client/src/Pages/Account/index.css b/Client/src/Pages/Account/index.css index 29d41aeff..c05cc01e7 100644 --- a/Client/src/Pages/Account/index.css +++ b/Client/src/Pages/Account/index.css @@ -31,7 +31,7 @@ .account .MuiButtonGroup-root button { border-color: var(--env-var-color-16); } -.account button{ +.account button:not(.MuiIconButton-root) { height: 34px; } .account [class$="-form"] { @@ -70,7 +70,6 @@ align-items: center; } - /* for testing, will remove later */ @media only screen and (max-width: 1600px) { .edit-profile-form__wrapper .MuiStack-root:not(.row-stack), @@ -106,4 +105,4 @@ } .edit-team-form .MuiTableBody-root .MuiTableCell-root { padding: var(--env-var-spacing-1-plus) var(--env-var-spacing-2) !important; -} \ No newline at end of file +} diff --git a/Client/src/Pages/Account/index.jsx b/Client/src/Pages/Account/index.jsx index 05a5d1761..db08ec3a2 100644 --- a/Client/src/Pages/Account/index.jsx +++ b/Client/src/Pages/Account/index.jsx @@ -51,15 +51,12 @@ const Account = ({ open = "profile" }) => { minWidth: "fit-content", minHeight: 0, paddingLeft: "0", - paddingY: "10px", - marginRight: "20px", + paddingY: theme.gap.small, + fontWeight: 400, + marginRight: theme.gap.ml, "&:focus": { outline: "none", }, - "& .MuiTouchRipple-root": { - pointerEvents: "none", - display: "none", - }, }} /> ))} diff --git a/Client/src/Pages/Auth/Login.jsx b/Client/src/Pages/Auth/Login.jsx index b40ad966c..d40cb078b 100644 --- a/Client/src/Pages/Auth/Login.jsx +++ b/Client/src/Pages/Auth/Login.jsx @@ -158,9 +158,9 @@ const Login = () => { } label="Remember me" /> - navigate("/forgot-password")}> + navigate("/forgot-password")}> Forgot password - + @@ -179,13 +179,13 @@ const Login = () => { Don't have an account? - { navigate("/register"); }} > Sign up - + diff --git a/Client/src/Pages/Auth/index.css b/Client/src/Pages/Auth/index.css index c9fa48fe5..4f2767f54 100644 --- a/Client/src/Pages/Auth/index.css +++ b/Client/src/Pages/Auth/index.css @@ -103,7 +103,7 @@ /* ///// */ .login-page .MuiStack-root:not(:has(> .MuiButtonBase-root)) - span:not(.MuiTypography-root):not(.field-required) { + > span:not(.field-required):not(.input-error) { color: var(--env-var-color-3); cursor: pointer; font-weight: 600; diff --git a/Client/src/Pages/Monitors/Details/index.jsx b/Client/src/Pages/Monitors/Details/index.jsx index d5d8cb0c1..852f602e7 100644 --- a/Client/src/Pages/Monitors/Details/index.jsx +++ b/Client/src/Pages/Monitors/Details/index.jsx @@ -22,7 +22,9 @@ import "./index.css"; const StatBox = ({ title, value }) => { return ( - {title} + + {title} + {value} ); @@ -64,7 +66,13 @@ const DetailsPage = () => { data: [ { id: idx, - data: , + data: ( + + ), }, { id: idx + 1, data: new Date(check.createdAt).toLocaleString() }, { id: idx + 2, data: check.statusCode }, diff --git a/Client/src/Pages/PageSpeed/index.css b/Client/src/Pages/PageSpeed/index.css index 5d21076a2..9435fdb4d 100644 --- a/Client/src/Pages/PageSpeed/index.css +++ b/Client/src/Pages/PageSpeed/index.css @@ -31,3 +31,7 @@ font-size: var(--env-var-font-size-small); border-color: var(--env-var-color-29); } +.page-speed button { + height: 34px; + align-self: flex-end; +} diff --git a/Client/src/Pages/PageSpeed/index.jsx b/Client/src/Pages/PageSpeed/index.jsx index a15dedd66..ac188b103 100644 --- a/Client/src/Pages/PageSpeed/index.jsx +++ b/Client/src/Pages/PageSpeed/index.jsx @@ -8,6 +8,8 @@ import { getPageSpeedByUserId } from "../../Features/PageSpeedMonitor/pageSpeedM import PageSpeedIcon from "../../assets/icons/page-speed.svg?react"; import Fallback from "../../Components/Fallback"; import "./index.css"; +import Button from "../../Components/Button"; +import { useNavigate } from "react-router"; const Card = ({ data }) => { const theme = useTheme(); @@ -63,6 +65,7 @@ const Card = ({ data }) => { const PageSpeed = () => { const theme = useTheme(); const dispatch = useDispatch(); + const navigate = useNavigate(); const { authToken } = useSelector((state) => state.auth); const { monitors } = useSelector((state) => state.pageSpeedMonitors); @@ -74,10 +77,23 @@ const PageSpeed = () => { {monitors ? ( - All page speed monitors - - Click on one of the monitors to get more site speed information. - + + + All page speed monitors + + Click on one of the monitors to get more site speed information. + + +