merged streamline stuff
This commit is contained in:
commit
7aca89d715
13 changed files with 219 additions and 12 deletions
BIN
src/assets/whitelabels/Streamline/stream-logo.png
Normal file
BIN
src/assets/whitelabels/Streamline/stream-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
|
|
@ -30,6 +30,7 @@ import {
|
|||
// isBXT,
|
||||
IsMiVent,
|
||||
IsOmniAir,
|
||||
IsStreamline,
|
||||
} from "services/whiteLabel";
|
||||
import MiningIcon from "products/ventilation/MiningIcon";
|
||||
import { useAuth0 } from "@auth0/auth0-react";
|
||||
|
|
@ -156,11 +157,12 @@ export default function SideNavigator(props: Props) {
|
|||
const authenticatedSideMenu = () => {
|
||||
const isMiVent = IsMiVent();
|
||||
const isAg = IsAdaptiveAgriculture()
|
||||
const isStreamline = IsStreamline()
|
||||
const isMiPCA = IsOmniAir()
|
||||
const isAdCon = IsAdCon()
|
||||
return (
|
||||
<List className={classes.list} component="nav">
|
||||
{(isAg || user.hasFeature("admin")) && (
|
||||
{(isAg || isStreamline || user.hasFeature("admin")) && (
|
||||
<Tooltip title="Visual Farm" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-visual-farm"
|
||||
|
|
@ -202,7 +204,7 @@ export default function SideNavigator(props: Props) {
|
|||
</ListItemButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
{(isAg || user.hasFeature("admin")) && (
|
||||
{(isAg || isStreamline || user.hasFeature("admin")) && (
|
||||
<Tooltip title="Contracts" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-contracts"
|
||||
|
|
@ -216,7 +218,7 @@ export default function SideNavigator(props: Props) {
|
|||
</ListItemButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
{(isAg || user.hasFeature("admin")) && (
|
||||
{(isAg || isStreamline || user.hasFeature("admin")) && (
|
||||
<Tooltip title="Bins" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-dashboard"
|
||||
|
|
@ -258,7 +260,7 @@ export default function SideNavigator(props: Props) {
|
|||
</ListItemButton>
|
||||
</Tooltip>
|
||||
}
|
||||
{(isAg || user.hasFeature("admin")) && (
|
||||
{(isAg || isStreamline || user.hasFeature("admin")) && (
|
||||
<Tooltip title="Transactions" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-transactions"
|
||||
|
|
@ -350,7 +352,7 @@ export default function SideNavigator(props: Props) {
|
|||
{open && <ListItemText primary="Users" />}
|
||||
</ListItemButton>
|
||||
</Tooltip>
|
||||
{(isAg || user.hasFeature("admin")) && (
|
||||
{(isAg || isStreamline || user.hasFeature("admin")) && (
|
||||
<Tooltip title="My Fields" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-field-list"
|
||||
|
|
@ -434,7 +436,7 @@ export default function SideNavigator(props: Props) {
|
|||
</ListItemButton>
|
||||
</Tooltip>
|
||||
}
|
||||
{isAg &&
|
||||
{isAg || isStreamline &&
|
||||
<Tooltip title="Marketplace" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-marketplace"
|
||||
|
|
|
|||
|
|
@ -102,6 +102,8 @@ export default function Devices() {
|
|||
const [limit, setLimit] = useState(10);
|
||||
const [page, setPage] = useState(0);
|
||||
|
||||
const [{ user }] = useGlobalState()
|
||||
|
||||
const [order, setOrder] = useState<"asc" | "desc">(() => {
|
||||
// Load from sessionStorage on initial render
|
||||
const savedOrder = sessionStorage.getItem('order');
|
||||
|
|
@ -585,6 +587,7 @@ export default function Devices() {
|
|||
}
|
||||
|
||||
const provisionButton= () => {
|
||||
if (!user.allowedTo("provision")) return null
|
||||
return (
|
||||
<Tooltip title="Provision Device">
|
||||
<IconButton onClick={openProvisionDialog} aria-label="Provision Device">
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import AeroGrowLightLogo from "../assets/whitelabels/AeroGrow/lightLogo.png";
|
|||
import MiVentLightLogo from "../assets/whitelabels/MiVent/lightLogo.png";
|
||||
// import OmniAirLogo from "../assets/whitelabels/OmniAir/OmniAirLogo.png";
|
||||
import MiPCALogo from "../assets/whitelabels/OmniAir/MiPCALogo.png";
|
||||
import StreamlineLogo from "../assets/whitelabels/Streamline/stream-logo.png"
|
||||
// import { green, yellow } from "@mui/material/colors";
|
||||
|
||||
const protips: string[] = [
|
||||
|
|
@ -111,6 +112,28 @@ const BXT_WHITE_LABEL: WhiteLabel = {
|
|||
homePage: "/devices"
|
||||
};
|
||||
|
||||
const STREAMLINE_WHITE_LABEL: WhiteLabel = {
|
||||
name: "Streamline",
|
||||
primaryColour: "#FFFF",
|
||||
// primaryColour: "#0000FF",
|
||||
secondaryColour: "yellow",
|
||||
// secondaryColour: "#FFFF00",
|
||||
// signatureColour: "#272727",
|
||||
signatureColour: "#005bb0",
|
||||
signatureAccentColour: "#fff",
|
||||
auth0ClientId: import.meta.env.VITE_AUTH0_STREAMLINE_CLIENT_ID,
|
||||
redirectOnLogout: false,
|
||||
logoutRedirectTarget: "",
|
||||
darkLogo: StreamlineLogo,
|
||||
lightLogo: StreamlineLogo,
|
||||
transparentLogoBG: false,
|
||||
blacklist: [],
|
||||
hotjarID: import.meta.env.REACT_APP_HOTJAR_ID_BXT,
|
||||
docs: "Platform",
|
||||
protips: protips,
|
||||
homePage: "/devices"
|
||||
};
|
||||
|
||||
export function isBXT(): boolean {
|
||||
return getName() === "Brand X Technologies";
|
||||
}
|
||||
|
|
@ -157,6 +180,14 @@ export function IsAdaptiveAgriculture(): boolean {
|
|||
);
|
||||
}
|
||||
|
||||
export function IsStreamline(): boolean {
|
||||
return (
|
||||
getName() === "Streamline"
|
||||
// window.location.origin.includes("staging") ||
|
||||
// window.location.origin.includes("localhost")
|
||||
);
|
||||
}
|
||||
|
||||
const AEROGROW_WHITE_LABEL: WhiteLabel = {
|
||||
name: "AeroGrow",
|
||||
primaryColour: "green",
|
||||
|
|
@ -254,6 +285,7 @@ export function IsOmniAir(): boolean {
|
|||
}
|
||||
|
||||
const whitelabels = new Map<string, WhiteLabel>([
|
||||
["streamline", STREAMLINE_WHITE_LABEL],
|
||||
["adaptiveag", ADAPTIVE_AGRICULTURE_WHITE_LABEL],
|
||||
["adaptiveagriculture", ADAPTIVE_AGRICULTURE_WHITE_LABEL],
|
||||
["brandxducks", BXT_WHITE_LABEL],
|
||||
|
|
@ -276,6 +308,9 @@ export function getWhitelabel(): WhiteLabel {
|
|||
if (window.location.origin.includes("bxt-dev")) {
|
||||
return BXT_WHITE_LABEL;
|
||||
}
|
||||
if (window.location.origin.includes("localhost")) {
|
||||
return STREAMLINE_WHITE_LABEL;
|
||||
}
|
||||
if (window.location.origin.includes("staging") || import.meta.env.VITE_LOCAL_STAGING=='true') {
|
||||
return STAGING_WHITELABEL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { createContext, useContext, useMemo, useState } from "react";
|
||||
import { ThemeProvider, createTheme, PaletteMode } from "@mui/material/styles";
|
||||
import { ThemeProvider, PaletteMode } from "@mui/material/styles";
|
||||
import useMediaQuery from "@mui/material/useMediaQuery";
|
||||
import { getTheme } from "./theme";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue