new colors scheme, centralize colors configs
This commit is contained in:
parent
c6fbb1d931
commit
24463d23ac
|
@ -50,7 +50,7 @@ const App = () => {
|
||||||
<img
|
<img
|
||||||
src={innovenergyLogo}
|
src={innovenergyLogo}
|
||||||
alt="innovenergy logo"
|
alt="innovenergy logo"
|
||||||
height="75" //style={color: #0960ac;background: #df7900;}
|
height="75"
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={9} container justifyContent="flex-end">
|
<Grid item xs={9} container justifyContent="flex-end">
|
||||||
|
|
|
@ -81,7 +81,7 @@ const Login = ({ setToken, setLanguage }: I_LoginProps) => {
|
||||||
Login
|
Login
|
||||||
</InnovenergyButton>
|
</InnovenergyButton>
|
||||||
</Grid>
|
</Grid>
|
||||||
{loading && <CircularProgress sx={{color: theme.palette.secondary.dark}} />}
|
{loading && <CircularProgress sx={{color: theme.palette.secondary.main}} />}
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -74,7 +74,7 @@ const ResetPassword = () => {
|
||||||
Submit
|
Submit
|
||||||
</InnovenergyButton>
|
</InnovenergyButton>
|
||||||
</Grid>
|
</Grid>
|
||||||
{loading && <CircularProgress sx={{color: theme.palette.secondary.dark}}/>}
|
{loading && <CircularProgress sx={{color: theme.palette.secondary.main}}/>}
|
||||||
</form>
|
</form>
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
|
|
|
@ -45,15 +45,15 @@ const Folder = () => {
|
||||||
py: 3,
|
py: 3,
|
||||||
bgcolor: colors.greyDark,
|
bgcolor: colors.greyDark,
|
||||||
px: 1,
|
px: 1,
|
||||||
borderBottom: 1,
|
borderBottom: 2,
|
||||||
borderRight: 1,
|
borderRight: 2,
|
||||||
borderLeft: 1,
|
borderLeft: 2,
|
||||||
bordertop: 0,
|
bordertop: 0,
|
||||||
borderTopLeftRadius: 0,
|
borderTopLeftRadius: 0,
|
||||||
WebkitBorderTopRightRadius: 0,
|
WebkitBorderTopRightRadius: 0,
|
||||||
borderBottomLeftRadius: 4,
|
borderBottomLeftRadius: 4,
|
||||||
borderBottomRightRadius: 4,
|
borderBottomRightRadius: 4,
|
||||||
borderColor: colors.greyLight,
|
borderColor: theme.palette.text.disabled,
|
||||||
marginTop: 0.05,
|
marginTop: 0.05,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -70,7 +70,7 @@ const Folder = () => {
|
||||||
<Box
|
<Box
|
||||||
sx={{ width: 1 / 2, justifyContent: "center", display: "flex", mt: 10 }}
|
sx={{ width: 1 / 2, justifyContent: "center", display: "flex", mt: 10 }}
|
||||||
>
|
>
|
||||||
<CircularProgress sx={{ m: 2 ,color: theme.palette.secondary.dark}} />
|
<CircularProgress sx={{ m: 2 ,color: theme.palette.secondary.main}} />
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
|
|
|
@ -80,7 +80,7 @@ const FolderForm = (props: I_CustomerFormProps) => {
|
||||||
handleChange={formik.handleChange}
|
handleChange={formik.handleChange}
|
||||||
/>
|
/>
|
||||||
<Grid container justifyContent="flex-end" sx={{ pt: 1 }}>
|
<Grid container justifyContent="flex-end" sx={{ pt: 1 }}>
|
||||||
{loading && <CircularProgress sx={{color: theme.palette.secondary.dark}} />}
|
{loading && <CircularProgress sx={{color: theme.palette.secondary.main}} />}
|
||||||
{!readOnly &&
|
{!readOnly &&
|
||||||
additionalButtons &&
|
additionalButtons &&
|
||||||
additionalButtons.map((button) => button)}
|
additionalButtons.map((button) => button)}
|
||||||
|
|
|
@ -8,8 +8,10 @@ import { useContext } from "react";
|
||||||
import { colors } from "../..";
|
import { colors } from "../..";
|
||||||
import InnovenergyTab from "../Layout/InnovenergyTab";
|
import InnovenergyTab from "../Layout/InnovenergyTab";
|
||||||
import InnovenergyTabs from "components/Layout/InnovenergyTabs";
|
import InnovenergyTabs from "components/Layout/InnovenergyTabs";
|
||||||
|
import { useTheme } from "@mui/material";
|
||||||
|
|
||||||
const GroupTabs = () => {
|
const GroupTabs = () => {
|
||||||
|
const theme = useTheme();
|
||||||
const routeMatch = useRouteMatch([
|
const routeMatch = useRouteMatch([
|
||||||
routes.installations + routes.tree + routes.folder + ":id",
|
routes.installations + routes.tree + routes.folder + ":id",
|
||||||
routes.installations + routes.tree + routes.manageAccess + ":id",
|
routes.installations + routes.tree + routes.manageAccess + ":id",
|
||||||
|
@ -26,8 +28,15 @@ const GroupTabs = () => {
|
||||||
<Box sx={{}}>
|
<Box sx={{}}>
|
||||||
<InnovenergyTabs id="group-tabs" value={routeMatch?.pattern?.path}>
|
<InnovenergyTabs id="group-tabs" value={routeMatch?.pattern?.path}>
|
||||||
{currentType === "Folder" ? (
|
{currentType === "Folder" ? (
|
||||||
|
|
||||||
<InnovenergyTab
|
<InnovenergyTab
|
||||||
|
sx={{
|
||||||
|
"&.Mui-selected": {
|
||||||
|
color: colors.black,
|
||||||
|
backgroundColor: theme.palette.primary.dark,
|
||||||
|
borderColor: theme.palette.text.disabled,
|
||||||
|
borderBottom: 0,
|
||||||
|
mb:-1/8,
|
||||||
|
}}}
|
||||||
id="styled-tab-folder"
|
id="styled-tab-folder"
|
||||||
label={intl.formatMessage({
|
label={intl.formatMessage({
|
||||||
id: "folder",
|
id: "folder",
|
||||||
|
@ -42,7 +51,14 @@ const GroupTabs = () => {
|
||||||
) : (
|
) : (
|
||||||
|
|
||||||
<InnovenergyTab
|
<InnovenergyTab
|
||||||
sx={{ bgcolor: "#90A7C5" }}
|
sx={{
|
||||||
|
"&.Mui-selected": {
|
||||||
|
color: colors.black,
|
||||||
|
backgroundColor: theme.palette.primary.dark,
|
||||||
|
borderColor: theme.palette.text.disabled,
|
||||||
|
borderBottom: 0,
|
||||||
|
mb:-1/8,
|
||||||
|
}}}
|
||||||
id="styled-tab-installation"
|
id="styled-tab-installation"
|
||||||
label={intl.formatMessage({
|
label={intl.formatMessage({
|
||||||
id: "installation",
|
id: "installation",
|
||||||
|
@ -60,7 +76,14 @@ const GroupTabs = () => {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<InnovenergyTab
|
<InnovenergyTab
|
||||||
sx={{ bgcolor: "#90A7C5" }}
|
sx={{
|
||||||
|
"&.Mui-selected": {
|
||||||
|
color: colors.black,
|
||||||
|
backgroundColor: theme.palette.primary.dark,
|
||||||
|
borderColor: theme.palette.text.disabled,
|
||||||
|
borderBottom: 0,
|
||||||
|
mb:-1/8,
|
||||||
|
}}}
|
||||||
id="styled-tab-manage-access"
|
id="styled-tab-manage-access"
|
||||||
label={intl.formatMessage({
|
label={intl.formatMessage({
|
||||||
id: "manageAccess",
|
id: "manageAccess",
|
||||||
|
|
|
@ -68,7 +68,7 @@ const GroupTree = () => {
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return (
|
return (
|
||||||
<Grid container justifyContent="center" width="100%">
|
<Grid container justifyContent="center" width="100%">
|
||||||
<CircularProgress sx={{color: theme.palette.secondary.dark}} />
|
<CircularProgress sx={{color: theme.palette.secondary.main}} />
|
||||||
</Grid>
|
</Grid>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ const Installation = (props: I_InstallationProps) => {
|
||||||
const [error, setError] = useState<AxiosError>();
|
const [error, setError] = useState<AxiosError>();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
axiosConfig
|
axiosConfig
|
||||||
|
@ -38,15 +39,14 @@ const Installation = (props: I_InstallationProps) => {
|
||||||
py: 3,
|
py: 3,
|
||||||
bgcolor: colors.greyDark,
|
bgcolor: colors.greyDark,
|
||||||
px: 1,
|
px: 1,
|
||||||
borderLeft: 1,
|
borderLeft: 2,
|
||||||
borderRight: 1,
|
borderRight: 2,
|
||||||
borderBottom: 1,
|
borderBottom: 2,
|
||||||
borderTopLeftRadius: 0,
|
borderTopLeftRadius: 0,
|
||||||
WebkitBorderTopRightRadius: 0,
|
WebkitBorderTopRightRadius: 0,
|
||||||
borderBottomLeftRadius: 4,
|
borderBottomLeftRadius: 4,
|
||||||
borderBottomRightRadius: 4,
|
borderBottomRightRadius: 4,
|
||||||
borderColor: colors.greyLight,
|
borderColor: theme.palette.text.disabled,
|
||||||
marginTop: 0.05,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<InstallationForm
|
<InstallationForm
|
||||||
|
@ -61,7 +61,7 @@ const Installation = (props: I_InstallationProps) => {
|
||||||
<Box
|
<Box
|
||||||
sx={{ width: 1 / 2, justifyContent: "center", display: "flex", mt: 10 }}
|
sx={{ width: 1 / 2, justifyContent: "center", display: "flex", mt: 10 }}
|
||||||
>
|
>
|
||||||
<CircularProgress sx={{ m: 2 ,color: theme.palette.secondary.dark}}/>
|
<CircularProgress sx={{ m: 2 ,color: theme.palette.secondary.main}}/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
|
|
|
@ -58,7 +58,7 @@ const InstallationList = (props: InstallationListProps) => {
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return (
|
return (
|
||||||
<Grid container justifyContent="center" width="100%">
|
<Grid container justifyContent="center" width="100%">
|
||||||
<CircularProgress sx={{ m: 6, color: theme.palette.secondary.dark }} />
|
<CircularProgress sx={{ m: 6, color: theme.palette.secondary.main }} />
|
||||||
</Grid>
|
</Grid>
|
||||||
);
|
);
|
||||||
} else if (data && data.length) {
|
} else if (data && data.length) {
|
||||||
|
@ -88,7 +88,7 @@ const InstallationList = (props: InstallationListProps) => {
|
||||||
to={
|
to={
|
||||||
getPathWithoutId(routeMatch?.pattern?.path) + installation.id
|
getPathWithoutId(routeMatch?.pattern?.path) + installation.id
|
||||||
}
|
}
|
||||||
style={{ textDecoration: "none", color: colors.black }}
|
style={{ textDecoration: "none", color: colors.blueBlack }}
|
||||||
>
|
>
|
||||||
<ListItemButton
|
<ListItemButton
|
||||||
id={"installation-list-button-" + installation.id}
|
id={"installation-list-button-" + installation.id}
|
||||||
|
|
|
@ -6,8 +6,12 @@ import useRouteMatch from "../../hooks/useRouteMatch";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
import InnovenergyTab from "../Layout/InnovenergyTab";
|
import InnovenergyTab from "../Layout/InnovenergyTab";
|
||||||
import InnovenergyTabs from "components/Layout/InnovenergyTabs";
|
import InnovenergyTabs from "components/Layout/InnovenergyTabs";
|
||||||
|
import { useTheme } from "@mui/material";
|
||||||
|
import { red } from "@mui/material/colors";
|
||||||
|
import { colors } from "index";
|
||||||
|
|
||||||
const InstallationTabs = () => {
|
const InstallationTabs = () => {
|
||||||
|
const theme = useTheme();
|
||||||
const routeMatch = useRouteMatch([
|
const routeMatch = useRouteMatch([
|
||||||
routes.installations + routes.list + routes.installation + ":id",
|
routes.installations + routes.list + routes.installation + ":id",
|
||||||
routes.installations + routes.list + routes.liveView + ":id",
|
routes.installations + routes.list + routes.liveView + ":id",
|
||||||
|
@ -19,14 +23,23 @@ const InstallationTabs = () => {
|
||||||
|
|
||||||
if (id) {
|
if (id) {
|
||||||
return (
|
return (
|
||||||
<Box sx={{ width: "100%" }}>
|
<Box sx={{ width: "100%", }}>
|
||||||
<Box sx={{}}>
|
<Box sx={{}}>
|
||||||
<InnovenergyTabs
|
<InnovenergyTabs
|
||||||
|
|
||||||
id="installation-tabs"
|
id="installation-tabs"
|
||||||
value={routeMatch?.pattern?.path ?? routes.installation + ":id"}
|
value={routeMatch?.pattern?.path ?? routes.installation + ":id"}
|
||||||
>
|
>
|
||||||
|
|
||||||
<InnovenergyTab
|
<InnovenergyTab
|
||||||
|
sx={{
|
||||||
|
"&.Mui-selected": {
|
||||||
|
color: colors.black,
|
||||||
|
backgroundColor: theme.palette.primary.dark,
|
||||||
|
borderColor: theme.palette.text.disabled,
|
||||||
|
borderBottom: 0,
|
||||||
|
mb:-1/8,
|
||||||
|
}}}
|
||||||
id={"installation-tab-installation"}
|
id={"installation-tab-installation"}
|
||||||
label={intl.formatMessage({
|
label={intl.formatMessage({
|
||||||
id: "installation",
|
id: "installation",
|
||||||
|
@ -38,7 +51,19 @@ const InstallationTabs = () => {
|
||||||
component={Link}
|
component={Link}
|
||||||
to={routes.installation + id}
|
to={routes.installation + id}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<InnovenergyTab
|
<InnovenergyTab
|
||||||
|
sx={{
|
||||||
|
"&.Mui-selected": {
|
||||||
|
color: colors.black,
|
||||||
|
backgroundColor: "white",
|
||||||
|
borderColor: theme.palette.text.disabled,
|
||||||
|
borderBottom: 0,
|
||||||
|
mb:-1/8,
|
||||||
|
}}}
|
||||||
id={"installation-tab-liveView"}
|
id={"installation-tab-liveView"}
|
||||||
label={intl.formatMessage({
|
label={intl.formatMessage({
|
||||||
id: "liveView",
|
id: "liveView",
|
||||||
|
@ -50,7 +75,22 @@ const InstallationTabs = () => {
|
||||||
component={Link}
|
component={Link}
|
||||||
to={routes.liveView + id}
|
to={routes.liveView + id}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<InnovenergyTab
|
<InnovenergyTab
|
||||||
|
sx={{
|
||||||
|
"&.Mui-selected": {
|
||||||
|
color: colors.black,
|
||||||
|
backgroundColor: theme.palette.primary.main,
|
||||||
|
borderColor: theme.palette.text.disabled,
|
||||||
|
borderBottom: 0,
|
||||||
|
mb:-1/8,
|
||||||
|
}}}
|
||||||
id={"installation-tab-log"}
|
id={"installation-tab-log"}
|
||||||
label={intl.formatMessage({
|
label={intl.formatMessage({
|
||||||
id: "log",
|
id: "log",
|
||||||
|
@ -60,6 +100,12 @@ const InstallationTabs = () => {
|
||||||
component={Link}
|
component={Link}
|
||||||
to={routes.log + id}
|
to={routes.log + id}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</InnovenergyTabs>
|
</InnovenergyTabs>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
@ -43,7 +43,7 @@ const DateRangePicker = (props: DateRangePickerProps) => {
|
||||||
value={dayjs(range[0])}
|
value={dayjs(range[0])}
|
||||||
sx={{
|
sx={{
|
||||||
".MuiInputLabel-root": {
|
".MuiInputLabel-root": {
|
||||||
color: colors.black,
|
color: colors.blueBlack,
|
||||||
},
|
},
|
||||||
|
|
||||||
".Mui-disabled": {
|
".Mui-disabled": {
|
||||||
|
@ -67,7 +67,7 @@ const DateRangePicker = (props: DateRangePickerProps) => {
|
||||||
value={dayjs(range[1])}
|
value={dayjs(range[1])}
|
||||||
sx={{
|
sx={{
|
||||||
".MuiInputLabel-root": {
|
".MuiInputLabel-root": {
|
||||||
color: colors.black,
|
color: colors.blueBlack,
|
||||||
},
|
},
|
||||||
|
|
||||||
".Mui-disabled": {
|
".Mui-disabled": {
|
||||||
|
|
|
@ -243,7 +243,7 @@ const ScalarGraph = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Alert sx={{ mt: 2, bgcolor: theme.palette.primary.dark, color: theme.palette.text.primary}}>
|
<Alert sx={{ mt: 2}} severity="info">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="makeASelection"
|
id="makeASelection"
|
||||||
defaultMessage="Please make a selection on the left"
|
defaultMessage="Please make a selection on the left"
|
||||||
|
|
|
@ -52,12 +52,11 @@ const TopologyView = () => {
|
||||||
paddingBottom: 3,
|
paddingBottom: 3,
|
||||||
bgcolor: "white",
|
bgcolor: "white",
|
||||||
px: 3 / 8,
|
px: 3 / 8,
|
||||||
border: 1,
|
border: 2,
|
||||||
borderTopLeftRadius: 0,
|
borderTop : 0,
|
||||||
WebkitBorderTopRightRadius: 0,
|
|
||||||
borderBottomLeftRadius: 4,
|
borderBottomLeftRadius: 4,
|
||||||
borderBottomRightRadius: 4,
|
borderBottomRightRadius: 4,
|
||||||
borderColor: colors.greyDark,
|
borderColor: theme.palette.text.disabled,
|
||||||
borderTopColor: "white",
|
borderTopColor: "white",
|
||||||
marginTop: 0.05,
|
marginTop: 0.05,
|
||||||
fontFamily: `"Ubuntu", sans-serif`,
|
fontFamily: `"Ubuntu", sans-serif`,
|
||||||
|
@ -225,7 +224,7 @@ const TopologyView = () => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Alert sx={{ mt: 1, bgcolor: theme.palette.primary.dark, color: theme.palette.text.primary }} severity="error" color="warning">
|
<Alert sx={{ mt: 1, }} severity="error">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="noData"
|
id="noData"
|
||||||
defaultMessage="Couldn't find any live data"
|
defaultMessage="Couldn't find any live data"
|
||||||
|
|
|
@ -44,7 +44,7 @@ const Detail = <T extends { id: number }>(props: I_DetailProps<T>) => {
|
||||||
<Box
|
<Box
|
||||||
sx={{ width: 1 / 2, justifyContent: "center", display: "flex", mt: 10 }}
|
sx={{ width: 1 / 2, justifyContent: "center", display: "flex", mt: 10 }}
|
||||||
>
|
>
|
||||||
<CircularProgress sx={{ m: 2, color: theme.palette.secondary.dark }} />
|
<CircularProgress sx={{ m: 2, color: theme.palette.secondary.main }} />
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
|
|
|
@ -19,7 +19,13 @@ const InnovenergyButton = (props: I_InnovenergyButtonProps) => {
|
||||||
variant="contained"
|
variant="contained"
|
||||||
type={props.type}
|
type={props.type}
|
||||||
onClick={props.onClick}
|
onClick={props.onClick}
|
||||||
sx={{...props.sx, bgcolor: theme.palette.secondary.main}}
|
sx={{...props.sx,
|
||||||
|
bgcolor: theme.palette.secondary.main,
|
||||||
|
":hover":{
|
||||||
|
bgcolor: theme.palette.secondary.dark,
|
||||||
|
}
|
||||||
|
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{props.children}
|
{props.children}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import { styled, SxProps, Tab, Tabs, Theme, useTheme } from "@mui/material";
|
import { styled, SxProps, Tab, Tabs, Theme, useTheme } from "@mui/material";
|
||||||
import { TabProps } from "@mui/material/Tab/Tab";
|
import { TabProps } from "@mui/material/Tab/Tab";
|
||||||
|
import { colors } from "index";
|
||||||
|
|
||||||
|
|
||||||
const InnovenergyTab = (props: any) => {
|
const InnovenergyTab = (props: any) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
@ -9,30 +11,26 @@ const InnovenergyTab = (props: any) => {
|
||||||
disableRipple
|
disableRipple
|
||||||
sx={{
|
sx={{
|
||||||
...props.sx,
|
...props.sx,
|
||||||
bottom: -1,
|
bottom: 0,
|
||||||
textTransform: "uppercase",
|
textTransform: "uppercase",
|
||||||
fontWeight: theme.typography.fontWeightRegular,
|
fontWeight: theme.typography.fontWeightRegular,
|
||||||
fontSize: theme.typography.pxToRem(14),
|
fontSize: theme.typography.pxToRem(14),
|
||||||
marginRight: theme.spacing(1),
|
marginRight: theme.spacing(1),
|
||||||
background: "0 0",
|
background: "0 0",
|
||||||
border: "1px solid transparent",
|
border: "2px solid transparent",
|
||||||
|
bgcolor: theme.palette.primary.light,
|
||||||
borderTopLeftRadius: "0.3rem",
|
borderTopLeftRadius: "0.3rem",
|
||||||
borderTopRightRadius: "0.3rem",
|
borderTopRightRadius: "0.3rem",
|
||||||
padding: ".5rem 1rem",
|
padding: ".5rem 1rem",
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
transition: `color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out`,
|
transition: `color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out`,
|
||||||
"&.Mui-selected": {
|
"&.Mui-selected": {
|
||||||
color: "#000000",
|
color: colors.black,
|
||||||
backgroundColor: "#CCD6E4",
|
borderColor: theme.palette.text.disabled,
|
||||||
borderColor: "#90A7c5 #90A7c5 #F2F4F8",
|
|
||||||
marginTop: "1px",
|
marginTop: "1px",
|
||||||
bottom: -1,
|
bottom: -1,
|
||||||
...(props.sx ? props.sx["&.Mui-selected"] : {}),
|
...(props.sx ? props.sx["&.Mui-selected"] : {}),
|
||||||
},
|
},
|
||||||
"&.Mui-focusVisible": {
|
|
||||||
backgroundColor: "rgba(100, 95, 228, 0.32)",
|
|
||||||
...(props.sx ? props.sx["&.Mui-focusVisible"] : {}),
|
|
||||||
},
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { SxProps, Tabs, Theme } from "@mui/material";
|
import { SxProps, Tabs, Theme, useTheme } from "@mui/material";
|
||||||
import { ReactNode } from "react";
|
import { ReactNode } from "react";
|
||||||
|
import { colors } from "index";
|
||||||
|
|
||||||
interface AntTabsProps {
|
interface AntTabsProps {
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -8,20 +9,23 @@ interface AntTabsProps {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const InnovenergyTabs = (props: AntTabsProps) => {
|
const InnovenergyTabs = (props: AntTabsProps) => {
|
||||||
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
<Tabs
|
<Tabs
|
||||||
{...props}
|
{...props}
|
||||||
sx={{
|
sx={{
|
||||||
...props.sx,
|
...props.sx,
|
||||||
borderBottom: "1px solid #90A7c5",
|
borderBottom: "2px solid",
|
||||||
|
borderColor: theme.palette.text.disabled,
|
||||||
overflow: "visible!important",
|
overflow: "visible!important",
|
||||||
"& div.MuiTabs-scroller": {
|
"& div.MuiTabs-scroller": {
|
||||||
overflow: "visible!important",
|
overflow: "visible!important",
|
||||||
},
|
},
|
||||||
"&.Mui-selected": {
|
"&.Mui-selected": {
|
||||||
color: "#000000",
|
color: colors.black,
|
||||||
backgroundColor: "red",
|
backgroundColor: " #90A7c5",
|
||||||
borderColor: `#90A7c5 #90A7c5 #fff`,
|
borderColor: `#90A7c5 #90A7c5 #fff`,
|
||||||
},
|
},
|
||||||
"& .MuiTabs-indicator": {
|
"& .MuiTabs-indicator": {
|
||||||
|
|
|
@ -4,8 +4,10 @@ import useRouteMatch from "../../hooks/useRouteMatch";
|
||||||
import routes from "../../routes.json";
|
import routes from "../../routes.json";
|
||||||
import InnovenergyTab from "./InnovenergyTab";
|
import InnovenergyTab from "./InnovenergyTab";
|
||||||
import InnovenergyTabs from "./InnovenergyTabs";
|
import InnovenergyTabs from "./InnovenergyTabs";
|
||||||
|
import { useTheme } from "@mui/material";
|
||||||
|
|
||||||
const NavigationButtons = () => {
|
const NavigationButtons = () => {
|
||||||
|
const theme = useTheme();
|
||||||
const routeMatch = useRouteMatch([
|
const routeMatch = useRouteMatch([
|
||||||
routes.installations + "*",
|
routes.installations + "*",
|
||||||
routes.users + "*",
|
routes.users + "*",
|
||||||
|
@ -19,6 +21,14 @@ const NavigationButtons = () => {
|
||||||
value={routeMatch?.pattern?.path}
|
value={routeMatch?.pattern?.path}
|
||||||
>
|
>
|
||||||
<InnovenergyTab
|
<InnovenergyTab
|
||||||
|
sx={{
|
||||||
|
bgcolor:theme.palette.primary.main,
|
||||||
|
"&.Mui-selected": {
|
||||||
|
backgroundColor: theme.palette.primary.main,
|
||||||
|
borderColor: theme.palette.text.disabled,
|
||||||
|
borderBottom: 0,
|
||||||
|
mb:-1/8,
|
||||||
|
}}}
|
||||||
id="navigation-tab-installations"
|
id="navigation-tab-installations"
|
||||||
value={routes.installations + "*"}
|
value={routes.installations + "*"}
|
||||||
component={Link}
|
component={Link}
|
||||||
|
@ -31,6 +41,14 @@ const NavigationButtons = () => {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<InnovenergyTab
|
<InnovenergyTab
|
||||||
|
sx={{
|
||||||
|
bgcolor:theme.palette.primary.main,
|
||||||
|
"&.Mui-selected": {
|
||||||
|
backgroundColor: theme.palette.primary.main,
|
||||||
|
borderColor: theme.palette.text.disabled,
|
||||||
|
borderBottom: 0,
|
||||||
|
mb:-1/8,
|
||||||
|
}}}
|
||||||
id="navigation-tab-users"
|
id="navigation-tab-users"
|
||||||
value={routes.users + "*"}
|
value={routes.users + "*"}
|
||||||
component={Link}
|
component={Link}
|
||||||
|
|
|
@ -3,13 +3,14 @@ import {
|
||||||
TextField,
|
TextField,
|
||||||
TextFieldProps,
|
TextFieldProps,
|
||||||
alpha,
|
alpha,
|
||||||
colors,
|
|
||||||
styled,
|
styled,
|
||||||
useTheme,
|
useTheme,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
import { colors } from "index";
|
||||||
import { FC, useState } from "react";
|
import { FC, useState } from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
|
|
||||||
|
|
||||||
interface SearchSidebarProps {
|
interface SearchSidebarProps {
|
||||||
listComponent: FC<{ searchQuery: string }>;
|
listComponent: FC<{ searchQuery: string }>;
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -74,7 +75,7 @@ const SearchSidebar = (props: SearchSidebarProps) => {
|
||||||
<SearchInputTextfield
|
<SearchInputTextfield
|
||||||
sx={{
|
sx={{
|
||||||
".MuiInputLabel-root" :{
|
".MuiInputLabel-root" :{
|
||||||
color: theme.palette.text.primary
|
color: "black"
|
||||||
}}}
|
}}}
|
||||||
id={id}
|
id={id}
|
||||||
variant="filled"
|
variant="filled"
|
||||||
|
|
|
@ -49,15 +49,15 @@ const Detail = (props: I_DetailProps) => {
|
||||||
py: 3,
|
py: 3,
|
||||||
bgcolor: colors.greyDark,
|
bgcolor: colors.greyDark,
|
||||||
px: 1,
|
px: 1,
|
||||||
borderBottom: 1,
|
borderBottom: 2,
|
||||||
borderRight: 1,
|
borderRight: 2,
|
||||||
borderLeft: 1,
|
borderLeft: 2,
|
||||||
bordertop: 0,
|
bordertop: 0,
|
||||||
borderTopLeftRadius: 0,
|
borderTopLeftRadius: 0,
|
||||||
WebkitBorderTopRightRadius: 0,
|
WebkitBorderTopRightRadius: 0,
|
||||||
borderBottomLeftRadius: 4,
|
borderBottomLeftRadius: 4,
|
||||||
borderBottomRightRadius: 4,
|
borderBottomRightRadius: 4,
|
||||||
borderColor: colors.greyLight,
|
borderColor: theme.palette.text.disabled,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<UserForm values={values} handleSubmit={handleUpdate} />
|
<UserForm values={values} handleSubmit={handleUpdate} />
|
||||||
|
@ -68,7 +68,7 @@ const Detail = (props: I_DetailProps) => {
|
||||||
<Box
|
<Box
|
||||||
sx={{ width: 1 / 2, justifyContent: "center", display: "flex", mt: 10 }}
|
sx={{ width: 1 / 2, justifyContent: "center", display: "flex", mt: 10 }}
|
||||||
>
|
>
|
||||||
<CircularProgress sx={{ m: 2 ,color: theme.palette.secondary.dark}} />
|
<CircularProgress sx={{ m: 2 ,color: theme.palette.secondary.main}} />
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
|
|
|
@ -89,7 +89,7 @@ const UserForm = (props: I_UserFormProps) => {
|
||||||
disabled={readOnly}
|
disabled={readOnly}
|
||||||
/>
|
/>
|
||||||
<Grid container justifyContent="flex-end" sx={{ pt: 1 }}>
|
<Grid container justifyContent="flex-end" sx={{ pt: 1 }}>
|
||||||
{loading && <CircularProgress sx={{color: theme.palette.secondary.dark}} />}
|
{loading && <CircularProgress sx={{color: theme.palette.secondary.main}} />}
|
||||||
{currentUser.hasWriteAccess && (
|
{currentUser.hasWriteAccess && (
|
||||||
<InnovenergyButton type="submit">
|
<InnovenergyButton type="submit">
|
||||||
<FormattedMessage id="submit" defaultMessage="Submit" />
|
<FormattedMessage id="submit" defaultMessage="Submit" />
|
||||||
|
|
|
@ -5,8 +5,12 @@ import useRouteMatch from "../../hooks/useRouteMatch";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
import InnovenergyTab from "../Layout/InnovenergyTab";
|
import InnovenergyTab from "../Layout/InnovenergyTab";
|
||||||
import InnovenergyTabs from "components/Layout/InnovenergyTabs";
|
import InnovenergyTabs from "components/Layout/InnovenergyTabs";
|
||||||
|
import { useTheme } from "@mui/material";
|
||||||
|
import { colors } from "index";
|
||||||
|
|
||||||
|
|
||||||
const UserTabs = () => {
|
const UserTabs = () => {
|
||||||
|
const theme = useTheme();
|
||||||
const routeMatch = useRouteMatch([routes.users + routes.user + ":id"]);
|
const routeMatch = useRouteMatch([routes.users + routes.user + ":id"]);
|
||||||
|
|
||||||
const id = routeMatch?.params?.id;
|
const id = routeMatch?.params?.id;
|
||||||
|
@ -23,6 +27,14 @@ const UserTabs = () => {
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<InnovenergyTab
|
<InnovenergyTab
|
||||||
|
sx={{
|
||||||
|
"&.Mui-selected": {
|
||||||
|
color: colors.black,
|
||||||
|
backgroundColor: theme.palette.primary.dark,
|
||||||
|
borderColor: theme.palette.text.disabled,
|
||||||
|
borderBottom: 0,
|
||||||
|
mb:-1/8,
|
||||||
|
}}}
|
||||||
id="users-tab-user"
|
id="users-tab-user"
|
||||||
label={intl.formatMessage({
|
label={intl.formatMessage({
|
||||||
id: "user",
|
id: "user",
|
||||||
|
@ -31,11 +43,7 @@ const UserTabs = () => {
|
||||||
value={routes.users + routes.user + ":id"}
|
value={routes.users + routes.user + ":id"}
|
||||||
component={Link}
|
component={Link}
|
||||||
to={routes.user + id}
|
to={routes.user + id}
|
||||||
sx={{
|
|
||||||
"&.Mui-selected": {
|
|
||||||
backgroundColor: "#CCD6E4",
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</InnovenergyTabs>
|
</InnovenergyTabs>
|
||||||
);
|
);
|
||||||
|
|
|
@ -12,7 +12,5 @@ code {
|
||||||
monospace;
|
monospace;
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
|
background-color: #f3f4f7;
|
||||||
background-color: #f3f4f8;
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -12,12 +12,20 @@ const root = ReactDOM.createRoot(
|
||||||
);
|
);
|
||||||
|
|
||||||
export const colors = {
|
export const colors = {
|
||||||
black: '#2b3e54',
|
black: "#000000",
|
||||||
fond: '#f3f4f7',
|
blueBlack: '#2b3e54',
|
||||||
|
borderColor: '#c0c6d0',
|
||||||
|
|
||||||
|
background: '#f3f4f7',
|
||||||
|
//change this color in index.css too
|
||||||
|
|
||||||
greyDark: '#d1d7de',
|
greyDark: '#d1d7de',
|
||||||
greyLight:'#e1e4e7',
|
greyLight:'#e1e4e7',
|
||||||
|
|
||||||
orangeSelected: '#ffd280',
|
orangeSelected: '#ffd280',
|
||||||
orangeHover: '#ffe4b3',
|
orangeHover: '#ffe4b3',
|
||||||
|
|
||||||
|
orangeDark:"#ffc04d",
|
||||||
}
|
}
|
||||||
|
|
||||||
const theme = createTheme({
|
const theme = createTheme({
|
||||||
|
@ -30,21 +38,22 @@ const theme = createTheme({
|
||||||
},
|
},
|
||||||
palette: {
|
palette: {
|
||||||
text: {
|
text: {
|
||||||
primary: colors.black,
|
primary: colors.blueBlack,
|
||||||
secondary: "#000000",
|
secondary: "#000000",
|
||||||
disabled: "#000000",
|
disabled: colors.borderColor,
|
||||||
},
|
},
|
||||||
primary: {
|
primary: {
|
||||||
main: colors.fond,
|
main: colors.background,
|
||||||
light: colors.greyLight,
|
light: colors.greyLight,
|
||||||
dark: colors.greyDark,
|
dark: colors.greyDark,
|
||||||
},
|
},
|
||||||
secondary: {
|
secondary: {
|
||||||
main: colors.orangeSelected,
|
main: colors.orangeSelected,
|
||||||
light: colors.orangeHover,
|
light: colors.orangeHover,
|
||||||
},
|
dark: colors.orangeDark,
|
||||||
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
typography: {
|
typography: {
|
||||||
fontFamily: `"Ubuntu", sans-serif`,
|
fontFamily: `"Ubuntu", sans-serif`,
|
||||||
fontWeightRegular: 300,
|
fontWeightRegular: 300,
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
import { styled, Tab, Tabs } from "@mui/material";
|
import { styled, Tab, Tabs } from "@mui/material";
|
||||||
|
import { colors } from "index";
|
||||||
|
|
||||||
|
|
||||||
export const StyledTab = styled((props: any) => (
|
export const StyledTab = styled((props: any) => (
|
||||||
<Tab disableRipple {...props} />
|
<Tab disableRipple {...props} />
|
||||||
|
@ -16,7 +18,7 @@ export const StyledTab = styled((props: any) => (
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
transition: `color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out`,
|
transition: `color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out`,
|
||||||
"&.Mui-selected": {
|
"&.Mui-selected": {
|
||||||
color: "#000000",
|
color: colors.black,
|
||||||
backgroundColor: "#F2F4F8",
|
backgroundColor: "#F2F4F8",
|
||||||
borderColor: "#90A7c5 #90A7c5 #F2F4F8",
|
borderColor: "#90A7c5 #90A7c5 #F2F4F8",
|
||||||
marginTop: "1px",
|
marginTop: "1px",
|
||||||
|
@ -42,7 +44,7 @@ export const StyledTabBlue = styled((props: any) => (
|
||||||
transition: `color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out`,
|
transition: `color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out`,
|
||||||
"&.Mui-selected": {
|
"&.Mui-selected": {
|
||||||
bottom: -1,
|
bottom: -1,
|
||||||
color: "#000000",
|
color: colors.black,
|
||||||
backgroundColor: "#CCD6E4",
|
backgroundColor: "#CCD6E4",
|
||||||
borderColor: "#90A7c5 #90A7c5 #CCD6E4",
|
borderColor: "#90A7c5 #90A7c5 #CCD6E4",
|
||||||
marginTop: "1px",
|
marginTop: "1px",
|
||||||
|
@ -67,7 +69,7 @@ export const StyledTabBig = styled((props: any) => (
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
transition: `color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out`,
|
transition: `color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out`,
|
||||||
"&.Mui-selected": {
|
"&.Mui-selected": {
|
||||||
color: "#000000",
|
color: colors.black,
|
||||||
backgroundColor: "#F2F4F8",
|
backgroundColor: "#F2F4F8",
|
||||||
borderColor: "#90A7c5 #90A7c5 #F2F4F8",
|
borderColor: "#90A7c5 #90A7c5 #F2F4F8",
|
||||||
marginTop: "1px",
|
marginTop: "1px",
|
||||||
|
@ -92,7 +94,7 @@ export const StyledTabWhite = styled((props: any) => (
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
transition: `color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out`,
|
transition: `color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out`,
|
||||||
"&.Mui-selected": {
|
"&.Mui-selected": {
|
||||||
color: "#000000",
|
color: colors.black,
|
||||||
backgroundColor: "White",
|
backgroundColor: "White",
|
||||||
borderColor: "#90A7c5 #90A7c5 White",
|
borderColor: "#90A7c5 #90A7c5 White",
|
||||||
marginTop: "1px",
|
marginTop: "1px",
|
||||||
|
@ -108,7 +110,7 @@ export const AntTabsBig = styled(Tabs)({
|
||||||
overflow: "visible!important",
|
overflow: "visible!important",
|
||||||
},
|
},
|
||||||
"&.Mui-selected": {
|
"&.Mui-selected": {
|
||||||
color: "#000000",
|
color: colors.black,
|
||||||
backgroundColor: "red",
|
backgroundColor: "red",
|
||||||
borderColor: `#90A7c5 #90A7c5 #fff`,
|
borderColor: `#90A7c5 #90A7c5 #fff`,
|
||||||
},
|
},
|
||||||
|
@ -129,7 +131,7 @@ export const AntTabs = styled(Tabs)({
|
||||||
overflow: "visible!important",
|
overflow: "visible!important",
|
||||||
},
|
},
|
||||||
"&.Mui-selected": {
|
"&.Mui-selected": {
|
||||||
color: "#000000",
|
color: colors.black,
|
||||||
backgroundColor: "red",
|
backgroundColor: "red",
|
||||||
borderColor: `#90A7c5 #90A7c5 #fff`,
|
borderColor: `#90A7c5 #90A7c5 #fff`,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue