diff --git a/package.json b/package.json index 3f50bf1..179f3e8 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "start": "VITE_AUTH0_CLIENT_ID=5pUCkl2SfogkWmM244UDcLEUOp8EFdHd VITE_AUTH0_AUDIENCE=api.brandxtech.ca VITE_APP_API_URL=https://api.brandxtech.ca/v1 VITE_APP_WS_URL=ws://api.brandxtech.ca/v1/live vite", "start-local": "VITE_AUTH0_CLIENT_ID=dzJTpqIeMA4Rwk4xujtwPbAO3TY32bM1 VITE_AUTH0_AUDIENCE=bxt-dev.api.adaptiveagriculture.ca VITE_APP_API_URL=http://localhost:50052/v1 VITE_APP_WS_URL=ws://localhost:50052/v1/live VITE_APP_BILLING_URL=http://localhost:50053/v1 VITE_APP_RECLUSE_URL=http://localhost:50054/v1 VITE_APP_GITLAB_URL=http://localhost:50055/v1 vite", "start-dev": "VITE_AUTH0_CLIENT_ID=dzJTpqIeMA4Rwk4xujtwPbAO3TY32bM1 VITE_APP_API_URL=https://bxt-dev.api.adaptiveagriculture.ca/v1 VITE_AUTH0_CLIENT_DOMAIN=brandxtech.auth0.com VITE_AUTH0_AUDIENCE=bxt-dev.api.adaptiveagriculture.ca VITE_AUTH0_DEV_CLIENT_ID=dzJTpqIeMA4Rwk4xujtwPbAO3TY32bM1 vite", - "start-streamline": "VITE_AUTH0_CLIENT_ID=HwUV0hHNdVvU96zuMBTAU8i7nFdwwgIX VITE_APP_API_URL=https://bxt-dev.api.adaptiveagriculture.ca/v1 VITE_AUTH0_CLIENT_DOMAIN=brandxtech.auth0.com VITE_AUTH0_AUDIENCE=streamline.api.adaptiveagriculture.ca vite", + "start-streamline": "VITE_AUTH0_CLIENT_ID=HwUV0hHNdVvU96zuMBTAU8i7nFdwwgIX VITE_APP_API_URL=https://streamline.api.adaptiveagriculture.ca/v1 VITE_AUTH0_CLIENT_DOMAIN=brandxtech.auth0.com VITE_AUTH0_AUDIENCE=streamline.api.adaptiveagriculture.ca vite", "start-staging": "VITE_LOCAL_STAGING=true VITE_AUTH0_CLIENT_ID=3ib460VvLwdeyse5iUSQfxkVdQaUmphP VITE_AUTH0_AUDIENCE=stagingapi.brandxtech.ca VITE_AUTH0_CLIENT_DOMAIN=adaptivestaging.us.auth0.com VITE_APP_API_URL=https://stagingapi.brandxtech.ca/v1 VITE_APP_WS_URL=ws://stagingapi.brandxtech.ca/v1/live VITE_APP_AUTH0_CLIENT_DOMAIN=adaptivestaging.us.auth0.com VITE_APP_AUTH0_AUDIENCE=stagingapi.brandxtech.ca vite", "build": "tsc -b && vite build", "lint": "eslint .", diff --git a/public/Streamline/favicon-16x16.png b/public/Streamline/favicon-16x16.png new file mode 100644 index 0000000..aa87654 Binary files /dev/null and b/public/Streamline/favicon-16x16.png differ diff --git a/public/Streamline/favicon-32x32.png b/public/Streamline/favicon-32x32.png new file mode 100644 index 0000000..a606ca0 Binary files /dev/null and b/public/Streamline/favicon-32x32.png differ diff --git a/public/Streamline/favicon.ico b/public/Streamline/favicon.ico new file mode 100644 index 0000000..54725be Binary files /dev/null and b/public/Streamline/favicon.ico differ diff --git a/public/Streamline/manifest.json b/public/Streamline/manifest.json new file mode 100644 index 0000000..7f8d80f --- /dev/null +++ b/public/Streamline/manifest.json @@ -0,0 +1,37 @@ +{ + "name": "Streamline", + "short_name": "Streamline", + "icons": [ + { + "src": "favicon.ico", + "sizes": "48x48", + "type": "image/x-icon" + }, + { + "src": "android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "android-chrome-256x256.png", + "sizes": "256x256", + "type": "image/png" + }, + { + "src": "android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "maskable_icon.png", + "sizes": "196x196", + "type": "image/png", + "purpose": "any maskable" + } + ], + "start_url": "/", + "theme_color": "#272727", + "background_color": "#303030", + "display": "standalone", + "orientation": "any" +} diff --git a/public/Streamline/stream-logo.png b/public/Streamline/stream-logo.png new file mode 100644 index 0000000..c6d994b Binary files /dev/null and b/public/Streamline/stream-logo.png differ diff --git a/src/app/App.tsx b/src/app/App.tsx index 03a9c70..16bb781 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -12,7 +12,6 @@ function App() { const [token, setToken] = useState(undefined) const whiteLabel = getWhitelabel() - console.log("Whitelabel Name: "+whiteLabel.name) const manifestPath = "/" + whiteLabel.name.replace(/\s/g, "") + "/manifest.json" const manifestDocument = document.getElementById('manifest-link') as HTMLLinkElement fetch(manifestPath).then(response => { diff --git a/src/assets/whitelabels/Streamline/stream-logo.png b/src/assets/whitelabels/Streamline/stream-logo.png new file mode 100644 index 0000000..c6d994b Binary files /dev/null and b/src/assets/whitelabels/Streamline/stream-logo.png differ diff --git a/src/pages/Devices.tsx b/src/pages/Devices.tsx index 972f451..35f37c4 100644 --- a/src/pages/Devices.tsx +++ b/src/pages/Devices.tsx @@ -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 ( diff --git a/src/services/whiteLabel.ts b/src/services/whiteLabel.ts index 78ca2a4..4135166 100644 --- a/src/services/whiteLabel.ts +++ b/src/services/whiteLabel.ts @@ -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[] = [ @@ -113,7 +114,7 @@ const BXT_WHITE_LABEL: WhiteLabel = { const STREAMLINE_WHITE_LABEL: WhiteLabel = { name: "Streamline", - primaryColour: "grey", + primaryColour: "#FFFF", // primaryColour: "#0000FF", secondaryColour: "yellow", // secondaryColour: "#FFFF00", @@ -123,8 +124,8 @@ const STREAMLINE_WHITE_LABEL: WhiteLabel = { auth0ClientId: import.meta.env.VITE_AUTH0_STREAMLINE_CLIENT_ID, redirectOnLogout: false, logoutRedirectTarget: "", - darkLogo: BXTDarkLogo, - lightLogo: BXTLightLogo, + darkLogo: StreamlineLogo, + lightLogo: StreamlineLogo, transparentLogoBG: false, blacklist: [], hotjarID: import.meta.env.REACT_APP_HOTJAR_ID_BXT,