From 4b4e0e20d4d75e8296a824810e3957560f241e2f Mon Sep 17 00:00:00 2001 From: sabaimran Date: Mon, 9 Dec 2024 14:45:26 -0800 Subject: [PATCH] Make the version number a badge, rather than an independent item in the nav dropdown --- .../web/app/components/navMenu/navMenu.tsx | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/interface/web/app/components/navMenu/navMenu.tsx b/src/interface/web/app/components/navMenu/navMenu.tsx index f9af7ff1..01215863 100644 --- a/src/interface/web/app/components/navMenu/navMenu.tsx +++ b/src/interface/web/app/components/navMenu/navMenu.tsx @@ -37,6 +37,15 @@ function SubscriptionBadge({ is_active }: { is_active: boolean }) { ); } +function VersionBadge({ version }: { version: string }) { + return ( +
+
+

{version}

+
+ ); +} + export default function NavMenu() { const userData = useAuthenticatedData(); const [darkMode, setDarkMode] = useState(false); @@ -99,6 +108,9 @@ export default function NavMenu() {

{userData?.email}

+ {userData?.khoj_version && ( + + )}
@@ -170,9 +182,7 @@ export default function NavMenu() { >
-

- {userData ? userData.khoj_version : "Releases"} -

+

Releases

@@ -220,6 +230,9 @@ export default function NavMenu() {

{userData?.email}

+ {userData?.khoj_version && ( + + )}
@@ -295,9 +308,7 @@ export default function NavMenu() { >
-

- {userData ? userData.khoj_version : "Releases"} -

+

Releases