Merge branch 'develop' into fix/gap-select-components
This commit is contained in:
commit
f0d7e82e22
2 files changed
+30
-39
No files matched your search
@@ -17,7 +17,6 @@ const MAXIMUM_VALUE = 100;
|
|||||||
* @param {number} [props.progress=0] - Progress percentage (0-100)
|
* @param {number} [props.progress=0] - Progress percentage (0-100)
|
||||||
* @param {number} [props.radius=60] - Radius of the gauge circle
|
* @param {number} [props.radius=60] - Radius of the gauge circle
|
||||||
* @param {number} [props.strokeWidth=15] - Width of the gauge stroke
|
* @param {number} [props.strokeWidth=15] - Width of the gauge stroke
|
||||||
* @param {number} [props.threshold=50] - Threshold for color change
|
|
||||||
* @param {number} [props.precision=1] - Precision of the progress percentage
|
* @param {number} [props.precision=1] - Precision of the progress percentage
|
||||||
* @param {string} [props.unit="%"] - Unit of progress
|
* @param {string} [props.unit="%"] - Unit of progress
|
||||||
*
|
*
|
||||||
@@ -26,7 +25,6 @@ const MAXIMUM_VALUE = 100;
|
|||||||
* progress={75}
|
* progress={75}
|
||||||
* radius={50}
|
* radius={50}
|
||||||
* strokeWidth={10}
|
* strokeWidth={10}
|
||||||
* threshold={50}
|
|
||||||
* />
|
* />
|
||||||
*
|
*
|
||||||
* @returns {React.ReactElement} Rendered CustomGauge component
|
* @returns {React.ReactElement} Rendered CustomGauge component
|
||||||
@@ -36,7 +34,6 @@ const CustomGauge = ({
|
|||||||
progress = 0,
|
progress = 0,
|
||||||
radius = 70,
|
radius = 70,
|
||||||
strokeWidth = 15,
|
strokeWidth = 15,
|
||||||
threshold = 50,
|
|
||||||
precision = 1,
|
precision = 1,
|
||||||
unit = "%",
|
unit = "%",
|
||||||
}) => {
|
}) => {
|
||||||
@@ -64,10 +61,14 @@ const CustomGauge = ({
|
|||||||
|
|
||||||
const progressWithinRange = Math.max(MINIMUM_VALUE, Math.min(progress, MAXIMUM_VALUE));
|
const progressWithinRange = Math.max(MINIMUM_VALUE, Math.min(progress, MAXIMUM_VALUE));
|
||||||
|
|
||||||
const fillColor =
|
let fillColor;
|
||||||
progressWithinRange > threshold
|
if (progressWithinRange < 50) {
|
||||||
? theme.palette.error.lowContrast
|
fillColor = theme.palette.success.main;
|
||||||
: theme.palette.accent.main;
|
} else if (progressWithinRange < 80) {
|
||||||
|
fillColor = theme.palette.warning.lowContrast;
|
||||||
|
} else {
|
||||||
|
fillColor = theme.palette.error.lowContrast;
|
||||||
|
}
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return (
|
||||||
@@ -142,7 +143,6 @@ CustomGauge.propTypes = {
|
|||||||
progress: PropTypes.number,
|
progress: PropTypes.number,
|
||||||
radius: PropTypes.number,
|
radius: PropTypes.number,
|
||||||
strokeWidth: PropTypes.number,
|
strokeWidth: PropTypes.number,
|
||||||
threshold: PropTypes.number,
|
|
||||||
precision: PropTypes.number,
|
precision: PropTypes.number,
|
||||||
unit: PropTypes.string,
|
unit: PropTypes.string,
|
||||||
};
|
};
|
||||||
@@ -4,7 +4,6 @@ import Typography from "@mui/material/Typography";
|
|||||||
import Tooltip from "@mui/material/Tooltip";
|
import Tooltip from "@mui/material/Tooltip";
|
||||||
import IconButton from "@mui/material/IconButton";
|
import IconButton from "@mui/material/IconButton";
|
||||||
import Avatar from "../../Avatar";
|
import Avatar from "../../Avatar";
|
||||||
import ThemeSwitch from "../../ThemeSwitch";
|
|
||||||
import Menu from "@mui/material/Menu";
|
import Menu from "@mui/material/Menu";
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
import Divider from "@mui/material/Divider";
|
import Divider from "@mui/material/Divider";
|
||||||
@@ -152,38 +151,30 @@ const AuthFooter = ({ collapsed, accountMenuItems }) => {
|
|||||||
{getRoleDisplayText(authState.user, t)}
|
{getRoleDisplayText(authState.user, t)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack
|
<Tooltip
|
||||||
direction="row"
|
title={t("navControls")}
|
||||||
columnGap={theme.spacing(2)}
|
disableInteractive
|
||||||
>
|
>
|
||||||
<ThemeSwitch color={theme.palette.primary.contrastTextTertiary} />
|
<IconButton
|
||||||
<Tooltip
|
sx={{
|
||||||
title={t("navControls")}
|
ml: "50px",
|
||||||
disableInteractive
|
"&:focus": { outline: "none" },
|
||||||
>
|
alignSelf: "center",
|
||||||
<IconButton
|
|
||||||
sx={{
|
|
||||||
ml: "auto",
|
|
||||||
mr: "-8px",
|
|
||||||
"&:focus": { outline: "none" },
|
|
||||||
alignSelf: "center",
|
|
||||||
padding: "10px",
|
|
||||||
|
|
||||||
"& svg": {
|
"& svg": {
|
||||||
width: "22px",
|
width: "22px",
|
||||||
height: "22px",
|
height: "22px",
|
||||||
},
|
},
|
||||||
"& svg path": {
|
"& svg path": {
|
||||||
/* Vertical three dots */
|
/* Vertical three dots */
|
||||||
stroke: theme.palette.primary.contrastTextTertiary,
|
stroke: theme.palette.primary.contrastTextTertiary,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
onClick={(event) => openPopup(event)}
|
onClick={(event) => openPopup(event)}
|
||||||
>
|
>
|
||||||
<DotsVertical />
|
<DotsVertical />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Stack>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
<Menu
|
<Menu
|
||||||
className="sidebar-popup"
|
className="sidebar-popup"
|
||||||
|
|||||||
Reference in new issue
Block a user