From fe205202737a9cc1079c42d8dd36f8ca873ffcea Mon Sep 17 00:00:00 2001 From: Milho001 <l.milhomemfrancochristino@uu.nl> Date: Wed, 30 Aug 2023 11:44:57 +0000 Subject: [PATCH] feat(version): add version number to user settings dropdown --- apps/web/.env | 1 + apps/web/.env.development | 2 +- apps/web/.env.production | 1 + apps/web/src/components/navbar/navbar.tsx | 8 ++++++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/web/.env b/apps/web/.env index 31d4bea3b..e024c90ec 100644 --- a/apps/web/.env +++ b/apps/web/.env @@ -1,2 +1,3 @@ VITE_BACKEND_URL=https://api.graphpolaris.com VITE_STAGING=local +VITE_GRAPHPOLARIS_VERSION=dev-build \ No newline at end of file diff --git a/apps/web/.env.development b/apps/web/.env.development index 3fc5fd002..d13895bd9 100644 --- a/apps/web/.env.development +++ b/apps/web/.env.development @@ -5,4 +5,4 @@ VITE_SKIP_LOGIN=true VITE_BACKEND_USER=:3000 VITE_BACKEND_QUERY=:3003 VITE_BACKEND_SCHEMA=:3002 - +VITE_GRAPHPOLARIS_VERSION=dev-build diff --git a/apps/web/.env.production b/apps/web/.env.production index af3e58d1c..4127ac68b 100644 --- a/apps/web/.env.production +++ b/apps/web/.env.production @@ -6,4 +6,5 @@ VITE_SKIP_LOGIN=false VITE_BACKEND_USER=/user VITE_BACKEND_QUERY=/query VITE_BACKEND_SCHEMA=/schema +GRAPHPOLARIS_VERSION=prod-build diff --git a/apps/web/src/components/navbar/navbar.tsx b/apps/web/src/components/navbar/navbar.tsx index 60db1b8f0..aca99f1ee 100644 --- a/apps/web/src/components/navbar/navbar.tsx +++ b/apps/web/src/components/navbar/navbar.tsx @@ -161,6 +161,10 @@ export const Navbar = (props: NavbarComponentProps) => { /> )} </li> + <div className="menu-title"> + <div className="absolute left-0 h-0.5 w-full bg-offwhite-300"></div> + <h3 className="text-xs mt-3">Version: {import.meta.env.VITE_GRAPHPOLARIS_VERSION}</h3> + </div> </> ) : ( <> @@ -179,6 +183,10 @@ export const Navbar = (props: NavbarComponentProps) => { {/* !TODO */} </button> </div> + <div className="menu-title"> + <div className="absolute left-0 h-0.5 w-full bg-offwhite-300"></div> + <h3 className="text-xs mt-3">Version: {import.meta.env.VITE_GRAPHPOLARIS_VERSION}</h3> + </div> </> )} </ul> -- GitLab