diff --git a/.env b/.env
index 23f68d3..182127c 100644
--- a/.env
+++ b/.env
@@ -5,4 +5,19 @@ VITE_APP_API_DEV_URL=https://bxt-dev.api.adaptiveagriculture.ca/v1
#Auth0
VITE_AUTH0_CLIENT_DOMAIN=brandxtech.auth0.com
VITE_AUTH0_AUDIENCE=api.brandxtech.ca
-VITE_AUTH0_DEV_CLIENT_ID=dzJTpqIeMA4Rwk4xujtwPbAO3TY32bM1
\ No newline at end of file
+VITE_AUTH0_DEV_CLIENT_ID=dzJTpqIeMA4Rwk4xujtwPbAO3TY32bM1
+VITE_AUTH0_STAGING_CLIENT_ID=3ib460VvLwdeyse5iUSQfxkVdQaUmphP
+
+# 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
+
+#Branding (Default theme)
+VITE_APP_WEBSITE_TITLE="Adaptive Dashboard"
+VITE_APP_PRIMARY_COLOUR=blue
+VITE_APP_SECONDARY_COLOUR=blueGrey
+VITE_APP_SIGNATURE_COLOUR="#323232"
\ No newline at end of file
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 61461f8..dd34bc9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -97,7 +97,7 @@ deploy:production:
- ssh -o StrictHostKeyChecking=no ${DEPLOY_TARGET}
script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- - docker stack deploy --with-registry-auth -c docker-compose.yml webui
+ - docker stack deploy --with-registry-auth -c docker-compose.prod.yml webui
when: manual
allow_failure: false
@@ -107,8 +107,8 @@ dependencies:staging:
only:
refs:
- staging_environment
- before_script:
- - npm -g config set user root
+ # before_script:
+ # - npm -g config set user root
script:
- npm ci
cache:
@@ -122,17 +122,17 @@ dependencies:staging:
paths:
- node_modules/
-test:staging:
- image: node:$NODE_VERSION
- stage: setup
- dependencies:
- - dependencies:staging
- only:
- - staging_environment
- before_script:
- - npm run lint
- script:
- - CI=true npm run test
+# test:staging:
+# image: node:$NODE_VERSION
+# stage: setup
+# dependencies:
+# - dependencies:staging
+# only:
+# - staging_environment
+# before_script:
+# - npm run lint
+# script:
+# - CI=true npm run test
setup:staging:
image: node:$NODE_VERSION
@@ -205,7 +205,7 @@ staging:deploy:
before_script: &staging_tunnel
- "apk --update add openssh-client"
- "eval $(ssh-agent -s)"
- - "echo \"$STAGING_SSH_PRIV_KEY\" | tr -d '\r' | ssh-add - > /dev/null"
+ - "echo \"$STAGING_SSH_PRIV_KEY\" | tr -d '\r' | ssh-add - "
# - "ssh -Mo StrictHostKeyChecking=no -S deploy-ctrl-socket -fnNTL /var/run/docker.sock:/var/run/docker.sock ${DEPLOY_TARGET}"
# - "ssh -S deploy-ctrl-socket -O check ${DEPLOY_TARGET}"
- mkdir -p ~/.ssh
diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml
new file mode 100644
index 0000000..afc477b
--- /dev/null
+++ b/docker-compose.prod.yml
@@ -0,0 +1,33 @@
+version: "3.6"
+
+services:
+ webui:
+ image: ${DEPLOY_IMAGE}
+ networks:
+ - backend
+ stop_signal: SIGQUIT
+ deploy:
+ update_config:
+ order: start-first
+ healthcheck:
+ test: ["CMD", "curl", "localhost:8080/health"]
+ interval: 1m
+ timeout: 10s
+ retries: 3
+ start_period: 30s
+ labels:
+ com.datadoghq.ad.logs: '[{"source": "nginx", "service": "webui"}]'
+ traefik.docker.network: "backend"
+ traefik.enable: "true"
+ traefik.http.routers.webui.rule: "Host(`dashboard.adaptiveagriculture.ca`)"
+ traefik.frontend.redirect.regex: "^https?://dashboard.adaptiveagriculture.ca/(.*)"
+ traefik.frontend.redirect.replacement: "https://dashboard.adaptiveagriculture.ca/$${1}"
+ traefik.backend: "www"
+ traefik.http.services.webui.loadbalancer.server.port: "80"
+ traefik.protocol: "http"
+ dns:
+ - 69.27.101.6
+
+networks:
+ backend:
+ external: true
diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml
new file mode 100644
index 0000000..71a2cbe
--- /dev/null
+++ b/docker-compose.staging.yml
@@ -0,0 +1,33 @@
+version: "3.6"
+
+services:
+ webui:
+ image: ${DEPLOY_IMAGE}
+ networks:
+ - backend
+ stop_signal: SIGQUIT
+ deploy:
+ update_config:
+ order: start-first
+ healthcheck:
+ test: ["CMD", "curl", "localhost:8080/health"]
+ interval: 1m
+ timeout: 10s
+ retries: 3
+ start_period: 30s
+ labels:
+ com.datadoghq.ad.logs: '[{"source": "nginx", "service": "webui"}]'
+ traefik.docker.network: "backend"
+ traefik.enable: "true"
+ traefik.http.routers.webui.rule: "Host(`staging.brandxtech.ca`)"
+ traefik.frontend.redirect.regex: "^https?://staging.brandxtech.ca/(.*)"
+ traefik.frontend.redirect.replacement: "https://staging.brandxtech.ca/$${1}"
+ traefik.backend: "www"
+ traefik.http.services.webui.loadbalancer.server.port: "80"
+ traefik.protocol: "http"
+ dns:
+ - 69.27.101.6
+
+networks:
+ backend:
+ external: true
diff --git a/package.json b/package.json
index 0f1adf1..d465087 100644
--- a/package.json
+++ b/package.json
@@ -6,13 +6,13 @@
"scripts": {
"start": "vite",
"start-local": "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_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-staging": "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",
+ "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-staging": "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 .",
"preview": "vite preview",
- "build:staging": "NODE_OPTIONS=--max_old_space_size=4096 VITE_APP_GOOGLE_API_KEY=${GOOGLE_API_KEY} VITE_APP_STRIPE_PUBLIC_KEY=${STRIPE_PUBLIC_KEY_STAGING} VITE_APP_MAPBOX_ACCESS_TOKEN=${MAPBOX_ACCESS_TOKEN} VITE_APP_CNHI_CLIENT_ID=${CNHI_CLIENT_ID} VITE_APP_CNHI_AUTHORIZE_URL=${CNHI_AUTHORIZE_URL} VITE_APP_CNHI_REDIRECT_URI=${CNHI_REDIRECT_URI} VITE_APP_CNHI_SCOPES=${CNHI_SCOPES} VITE_APP_CNHI_CONNECTION=${CNHI_CONNECTION} VITE_APP_CNHI_AUDIENCE=${CNHI_AUDIENCE} VITE_APP_IMAGE4IO_USERNAME=${IMAGE4IO_USERNAME} VITE_APP_IMAGE4IO_PASSWORD=${IMAGE4IO_PASSWORD} VITE_APP_JD_CLIENT_ID=${JD_CLIENT_ID} VITE_APP_JD_AUTHORIZE_URL=${JD_AUTHORIZE_URL} VITE_APP_JD_REDIRECT_URI=${JD_REDIRECT_URI} VITE_APP_JD_SCOPES=${JD_SCOPES} VITE_APP_JD_STATE=${JD_STATE} vite build",
- "build:development": "VITE_AUTH0_AUDIENCE=bxt-dev.api.adaptiveagriculture.ca VITE_APP_API_URL=https://bxt-dev.api.adaptiveagriculture.ca/v1 NODE_OPTIONS=--max_old_space_size=4096 VITE_APP_GOOGLE_API_KEY=${GOOGLE_API_KEY} VITE_APP_STRIPE_PUBLIC_KEY=${STRIPE_PUBLIC_KEY_DEVELOPMENT} VITE_APP_MAPBOX_ACCESS_TOKEN=${MAPBOX_ACCESS_TOKEN} VITE_APP_CNHI_CLIENT_ID=${CNHI_CLIENT_ID} VITE_APP_CNHI_AUTHORIZE_URL=${CNHI_AUTHORIZE_URL} VITE_APP_CNHI_REDIRECT_URI=${CNHI_REDIRECT_URI} VITE_APP_CNHI_SCOPES=${CNHI_SCOPES} VITE_APP_CNHI_CONNECTION=${CNHI_CONNECTION} VITE_APP_CNHI_AUDIENCE=${CNHI_AUDIENCE} VITE_APP_IMAGE4IO_USERNAME=${IMAGE4IO_USERNAME} VITE_APP_IMAGE4IO_PASSWORD=${IMAGE4IO_PASSWORD} VITE_APP_JD_CLIENT_ID=${JD_CLIENT_ID} VITE_APP_JD_AUTHORIZE_URL=${JD_AUTHORIZE_URL} VITE_APP_JD_REDIRECT_URI=${JD_REDIRECT_URI} VITE_APP_JD_SCOPES=${JD_SCOPES} VITE_APP_JD_STATE=${JD_STATE} vite build",
+ "build:staging": "VITE_AUTH0_CLIENT_DOMAIN=adaptivestaging.us.auth0.com VITE_AUTH0_AUDIENCE=stagingapi.brandxtech.ca VITE_AUTH0_CLIENT_ID=3ib460VvLwdeyse5iUSQfxkVdQaUmphP VITE_APP_API_URL=https://stagingapi.brandxtech.ca/v1 VITE_APP_WS_URL=wss://stagingapi.brandxtech.ca/v1/live NODE_OPTIONS=--max_old_space_size=4096 VITE_APP_GOOGLE_API_KEY=${GOOGLE_API_KEY} VITE_APP_STRIPE_PUBLIC_KEY=${STRIPE_PUBLIC_KEY_STAGING} VITE_APP_MAPBOX_ACCESS_TOKEN=${MAPBOX_ACCESS_TOKEN} VITE_APP_CNHI_CLIENT_ID=${CNHI_CLIENT_ID} VITE_APP_CNHI_AUTHORIZE_URL=${CNHI_AUTHORIZE_URL} VITE_APP_CNHI_REDIRECT_URI=${CNHI_REDIRECT_URI} VITE_APP_CNHI_SCOPES=${CNHI_SCOPES} VITE_APP_CNHI_CONNECTION=${CNHI_CONNECTION} VITE_APP_CNHI_AUDIENCE=${CNHI_AUDIENCE} VITE_APP_IMAGE4IO_USERNAME=${IMAGE4IO_USERNAME} VITE_APP_IMAGE4IO_PASSWORD=${IMAGE4IO_PASSWORD} VITE_APP_JD_CLIENT_ID=${JD_CLIENT_ID} VITE_APP_JD_AUTHORIZE_URL=${JD_AUTHORIZE_URL} VITE_APP_JD_REDIRECT_URI=${JD_REDIRECT_URI} VITE_APP_JD_SCOPES=${JD_SCOPES} VITE_APP_JD_STATE=${JD_STATE} vite build",
+ "build:development": "VITE_AUTH0_CLIENT_ID=dzJTpqIeMA4Rwk4xujtwPbAO3TY32bM1 VITE_AUTH0_AUDIENCE=bxt-dev.api.adaptiveagriculture.ca VITE_APP_API_URL=https://bxt-dev.api.adaptiveagriculture.ca/v1 NODE_OPTIONS=--max_old_space_size=4096 VITE_APP_GOOGLE_API_KEY=${GOOGLE_API_KEY} VITE_APP_STRIPE_PUBLIC_KEY=${STRIPE_PUBLIC_KEY_DEVELOPMENT} VITE_APP_MAPBOX_ACCESS_TOKEN=${MAPBOX_ACCESS_TOKEN} VITE_APP_CNHI_CLIENT_ID=${CNHI_CLIENT_ID} VITE_APP_CNHI_AUTHORIZE_URL=${CNHI_AUTHORIZE_URL} VITE_APP_CNHI_REDIRECT_URI=${CNHI_REDIRECT_URI} VITE_APP_CNHI_SCOPES=${CNHI_SCOPES} VITE_APP_CNHI_CONNECTION=${CNHI_CONNECTION} VITE_APP_CNHI_AUDIENCE=${CNHI_AUDIENCE} VITE_APP_IMAGE4IO_USERNAME=${IMAGE4IO_USERNAME} VITE_APP_IMAGE4IO_PASSWORD=${IMAGE4IO_PASSWORD} VITE_APP_JD_CLIENT_ID=${JD_CLIENT_ID} VITE_APP_JD_AUTHORIZE_URL=${JD_AUTHORIZE_URL} VITE_APP_JD_REDIRECT_URI=${JD_REDIRECT_URI} VITE_APP_JD_SCOPES=${JD_SCOPES} VITE_APP_JD_STATE=${JD_STATE} vite build",
"build:production": "NODE_OPTIONS=--max_old_space_size=4096 VITE_APP_GOOGLE_API_KEY=${GOOGLE_API_KEY} VITE_APP_STRIPE_PUBLIC_KEY=${STRIPE_PUBLIC_KEY_PRODUCTION} VITE_APP_MAPBOX_ACCESS_TOKEN=${MAPBOX_ACCESS_TOKEN} VITE_APP_CNHI_CLIENT_ID=${CNHI_CLIENT_ID} VITE_APP_CNHI_AUTHORIZE_URL=${CNHI_AUTHORIZE_URL} VITE_APP_CNHI_REDIRECT_URI=${CNHI_REDIRECT_URI} VITE_APP_CNHI_SCOPES=${CNHI_SCOPES} VITE_APP_CNHI_CONNECTION=${CNHI_CONNECTION} VITE_APP_CNHI_AUDIENCE=${CNHI_AUDIENCE} VITE_APP_IMAGE4IO_USERNAME=${IMAGE4IO_USERNAME} VITE_APP_IMAGE4IO_PASSWORD=${IMAGE4IO_PASSWORD} VITE_APP_JD_CLIENT_ID=${JD_CLIENT_ID} VITE_APP_JD_AUTHORIZE_URL=${JD_AUTHORIZE_URL} VITE_APP_JD_REDIRECT_URI=${JD_REDIRECT_URI} VITE_APP_JD_SCOPES=${JD_SCOPES} VITE_APP_JD_STATE=${JD_STATE} vite build",
"build:offline": "npx env-cmd offline,whitelabel npm run build",
"test": "vitest"
diff --git a/public/AdaptiveDashboard/android-chrome-192x192.png b/public/AdaptiveDashboard/android-chrome-192x192.png
new file mode 100644
index 0000000..cbd70d4
Binary files /dev/null and b/public/AdaptiveDashboard/android-chrome-192x192.png differ
diff --git a/public/AdaptiveDashboard/android-chrome-512x512.png b/public/AdaptiveDashboard/android-chrome-512x512.png
new file mode 100644
index 0000000..5d93e84
Binary files /dev/null and b/public/AdaptiveDashboard/android-chrome-512x512.png differ
diff --git a/public/AdaptiveDashboard/apple-touch-icon.png b/public/AdaptiveDashboard/apple-touch-icon.png
new file mode 100644
index 0000000..0914e18
Binary files /dev/null and b/public/AdaptiveDashboard/apple-touch-icon.png differ
diff --git a/public/AdaptiveDashboard/browserconfig.xml b/public/AdaptiveDashboard/browserconfig.xml
new file mode 100644
index 0000000..d416bc5
--- /dev/null
+++ b/public/AdaptiveDashboard/browserconfig.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+ #ffffff
+
+
+
diff --git a/public/AdaptiveDashboard/favicon-16x16.png b/public/AdaptiveDashboard/favicon-16x16.png
new file mode 100644
index 0000000..aa87654
Binary files /dev/null and b/public/AdaptiveDashboard/favicon-16x16.png differ
diff --git a/public/AdaptiveDashboard/favicon-32x32.png b/public/AdaptiveDashboard/favicon-32x32.png
new file mode 100644
index 0000000..a606ca0
Binary files /dev/null and b/public/AdaptiveDashboard/favicon-32x32.png differ
diff --git a/public/AdaptiveDashboard/favicon.ico b/public/AdaptiveDashboard/favicon.ico
new file mode 100644
index 0000000..54725be
Binary files /dev/null and b/public/AdaptiveDashboard/favicon.ico differ
diff --git a/public/AdaptiveDashboard/manifest.json b/public/AdaptiveDashboard/manifest.json
new file mode 100644
index 0000000..aad40f6
--- /dev/null
+++ b/public/AdaptiveDashboard/manifest.json
@@ -0,0 +1,26 @@
+{
+ "name": "Brand X Technologies",
+ "short_name": "BXT",
+ "icons": [
+ {
+ "src": "favicon.ico",
+ "sizes": "48x48",
+ "type": "image/x-icon"
+ },
+ {
+ "src": "android-chrome-192x192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ },
+ {
+ "src": "android-chrome-512x512.png",
+ "sizes": "512x512",
+ "type": "image/png"
+ }
+ ],
+ "start_url": "/",
+ "theme_color": "#272727",
+ "background_color": "#424242",
+ "display": "standalone",
+ "orientation": "any"
+}
diff --git a/public/AdaptiveDashboard/mstile-150x150.png b/public/AdaptiveDashboard/mstile-150x150.png
new file mode 100644
index 0000000..e91210a
Binary files /dev/null and b/public/AdaptiveDashboard/mstile-150x150.png differ
diff --git a/public/AdaptiveDashboard/safari-pinned-tab.svg b/public/AdaptiveDashboard/safari-pinned-tab.svg
new file mode 100644
index 0000000..5f44534
--- /dev/null
+++ b/public/AdaptiveDashboard/safari-pinned-tab.svg
@@ -0,0 +1,2198 @@
+
+
+
diff --git a/src/app/App.tsx b/src/app/App.tsx
index 27a160d..dbbcab1 100644
--- a/src/app/App.tsx
+++ b/src/app/App.tsx
@@ -5,13 +5,11 @@ import HTTPProvider from 'providers/http'
import { useState } from 'react'
import LoadingScreen from './LoadingScreen'
import UserWrapper from './UserWrapper'
-import { CssBaseline } from '@mui/material'
import { getWhitelabel } from 'services/whiteLabel'
import { AppThemeProvider } from 'theme/AppThemeProvider'
function App() {
const [token, setToken] = useState(undefined)
- // const [palette, setPalette] = useState(CreateTheme(getThemeType()));
const whiteLabel = getWhitelabel()
const manifestPath = "/" + whiteLabel.name.replace(/\s/g, "") + "/manifest.json"
@@ -42,12 +40,9 @@ function App() {
let domain: string | undefined = import.meta.env.VITE_AUTH0_CLIENT_DOMAIN;
let audience: string | undefined = import.meta.env.VITE_AUTH0_AUDIENCE;
- let client_id = import.meta.env.VITE_AUTH0_DEV_CLIENT_ID;
-
- console.log("Domain: " + domain)
- console.log("Audience: " + audience)
- console.log("Client ID: " + client_id)
- console.log("API URL: " + import.meta.env.VITE_APP_API_URL)
+ // let client_id = whiteLabel.auth0ClientId
+ let client_id = import.meta.env.VITE_AUTH0_CLIENT_ID;
+ // if (!client_id) client_id = import.meta.env.VITE_AUTH0_CLIENT_ID;
return (
diff --git a/src/app/Header.tsx b/src/app/Header.tsx
index e75048a..4bb8e1f 100644
--- a/src/app/Header.tsx
+++ b/src/app/Header.tsx
@@ -11,71 +11,73 @@ import SideNavigator from "navigation/SideNavigator";
import { useState } from "react";
import BottomNavigator from "navigation/BottomNavigator";
-const useStyles = makeStyles((theme: Theme) => ({
+const useStyles = makeStyles((theme: Theme) => {
+ return ({
appBar: {
- zIndex: theme.zIndex.drawer + 1,
- backgroundImage: "none", // This prevents de-saturation of header in dark mode
- backgroundColor: "#272727"
- },
- toolbar: {
- marginLeft: theme.spacing(0.5),
- [theme.breakpoints.up("md")]: {
- marginLeft: theme.spacing(1.5)
- }
- },
- buttonContainer: {
- marginRight: theme.spacing(0.5),
- [theme.breakpoints.up("md")]: {
- marginRight: theme.spacing(1.5)
- },
- color: getSignatureAccentColour() + " !important"
- },
- button: {
- color: getSignatureAccentColour() + " !important"
- },
- hide: {
- display: "none"
- },
- logoContainer: {
- display: "flex",
- alignItems: "center",
- height: "56px",
- justifyContent: "flex-start",
- [theme.breakpoints.up("md")]: {
- height: "64px"
- }
- },
- logoLink: {
- display: "flex",
- justifyContent: "center",
- alignItems: "center",
- borderRadius: "5px",
- backgroundColor: hasTransparentLogoBG()
- ? ""
- : theme.palette.mode === "light"
- ? "#fff"
- : "#0000"
- },
- HeaderLogo: {
- objectFit: "cover",
- height: "56px",
- width: "auto",
- padding: theme.spacing(1),
- [theme.breakpoints.up("md")]: {
- height: "64px"
- }
- },
- appBarRight: {
- display: "flex",
- flexDirection: "row",
- marginLeft: theme.spacing(2),
- marginRight: theme.spacing(1),
- [theme.breakpoints.up("md")]: {
- marginLeft: theme.spacing(3),
- marginRight: theme.spacing(2)
- }
- },
-}));
+ zIndex: theme.zIndex.drawer + 1,
+ backgroundImage: "none", // This prevents de-saturation of header in dark mode
+ backgroundColor: theme.palette.mode === "light" ? "#3b3b3b" : "#272727"
+ },
+ toolbar: {
+ marginLeft: theme.spacing(0.5),
+ [theme.breakpoints.up("md")]: {
+ marginLeft: theme.spacing(1.5)
+ }
+ },
+ buttonContainer: {
+ marginRight: theme.spacing(0.5),
+ [theme.breakpoints.up("md")]: {
+ marginRight: theme.spacing(1.5)
+ },
+ color: getSignatureAccentColour() + " !important"
+ },
+ button: {
+ color: getSignatureAccentColour() + " !important"
+ },
+ hide: {
+ display: "none"
+ },
+ logoContainer: {
+ display: "flex",
+ alignItems: "center",
+ height: "56px",
+ justifyContent: "flex-start",
+ [theme.breakpoints.up("md")]: {
+ height: "64px"
+ }
+ },
+ logoLink: {
+ display: "flex",
+ justifyContent: "center",
+ alignItems: "center",
+ borderRadius: "5px",
+ backgroundColor: hasTransparentLogoBG()
+ ? ""
+ : theme.palette.mode === "light"
+ ? "#fff"
+ : "#0000"
+ },
+ HeaderLogo: {
+ objectFit: "cover",
+ height: "56px",
+ width: "auto",
+ padding: theme.spacing(1),
+ [theme.breakpoints.up("md")]: {
+ height: "64px"
+ }
+ },
+ appBarRight: {
+ display: "flex",
+ flexDirection: "row",
+ marginLeft: theme.spacing(2),
+ marginRight: theme.spacing(1),
+ [theme.breakpoints.up("md")]: {
+ marginLeft: theme.spacing(3),
+ marginRight: theme.spacing(2)
+ }
+ }
+ })
+});
export default function Header() {
diff --git a/src/app/UserWrapper.tsx b/src/app/UserWrapper.tsx
index e273c58..660eb7c 100644
--- a/src/app/UserWrapper.tsx
+++ b/src/app/UserWrapper.tsx
@@ -22,16 +22,16 @@ const reducer = (state: GlobalState, action: GlobalStateAction): GlobalState =>
const useStyles = makeStyles((theme: Theme) => ({
appContent: {
- marginTop: 56,
- marginBottom: 56,
- marginLeft: "0px",
+ paddingTop: 56,
+ paddingBottom: 56,
+ paddingLeft: "0px",
[theme.breakpoints.up("sm")]: {
- marginTop: 64,
- marginBottom: 0
+ paddingTop: 64,
+ paddingBottom: 0,
},
[theme.breakpoints.up("md")]: {
- marginLeft: theme.spacing(9)
- }
+ paddingLeft: theme.spacing(9)
+ },
},
container: {
backgroundColor: theme.palette.background.default,
diff --git a/src/navigation/Router.tsx b/src/navigation/Router.tsx
index 68adfa7..c52d5b8 100644
--- a/src/navigation/Router.tsx
+++ b/src/navigation/Router.tsx
@@ -329,10 +329,6 @@ export default function Router() {
} />
} />
- {/*
-
- } />
- */}
} />
diff --git a/src/services/whiteLabel.ts b/src/services/whiteLabel.ts
index b26befe..eb5d7ff 100644
--- a/src/services/whiteLabel.ts
+++ b/src/services/whiteLabel.ts
@@ -70,12 +70,12 @@ interface WhiteLabel {
// };
const STAGING_WHITELABEL: WhiteLabel = {
- name: import.meta.env.REACT_APP_WEBSITE_TITLE,
- primaryColour: import.meta.env.REACT_APP_PRIMARY_COLOUR,
- secondaryColour: import.meta.env.REACT_APP_SECONDARY_COLOUR,
- signatureColour: import.meta.env.REACT_APP_SIGNATURE_COLOUR,
+ name: import.meta.env.VITE_APP_WEBSITE_TITLE,
+ primaryColour: import.meta.env.VITE_APP_PRIMARY_COLOUR,
+ secondaryColour: import.meta.env.VITE_APP_SECONDARY_COLOUR,
+ signatureColour: import.meta.env.VITE_APP_SIGNATURE_COLOUR,
signatureAccentColour: "#fff",
- auth0ClientId: import.meta.env.REACT_APP_AUTH0_STAGING_CLIENT_ID,
+ auth0ClientId: import.meta.env.VITE_AUTH0_STAGING_CLIENT_ID,
redirectOnLogout: false,
logoutRedirectTarget: "",
darkLogo: DefaultDarkLogo,
@@ -259,7 +259,7 @@ const whitelabels = new Map([
["brandxducks", BXT_WHITE_LABEL],
["brandxtech", BXT_WHITE_LABEL],
["aerogrowmanufacturing", AEROGROW_WHITE_LABEL],
- ["localhost", BXT_WHITE_LABEL],
+ ["localhost", STAGING_WHITELABEL],
["staging", STAGING_WHITELABEL],
["10.0", ADAPTIVE_CONSTRUCTION_WHITE_LABEL],
["mivent", MIVENT_WHITE_LABEL],
@@ -276,6 +276,9 @@ export function getWhitelabel(): WhiteLabel {
if (window.location.origin.includes("bxt-dev")) {
return BXT_WHITE_LABEL;
}
+ if (window.location.origin.includes("staging")) {
+ return STAGING_WHITELABEL;
+ }
const whiteLabelKeys = Array.from(whitelabels.keys());
for (var i = 0; i < whiteLabelKeys.length; i++) {
let key = whiteLabelKeys[i];