From 86f941d606e618ff94151e5dcb00587d8de3242f Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Mon, 6 Jul 2026 15:49:55 -0600 Subject: [PATCH] feat(sidebar): add enterprise badge for valid license in sidebar - Integrated a new Badge component to display an "Enterprise" label when a valid license is detected. - Enhanced the sidebar layout to accommodate the new badge alongside the organization name, improving user visibility of license status. --- apps/dokploy/components/layouts/side.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/dokploy/components/layouts/side.tsx b/apps/dokploy/components/layouts/side.tsx index 30739e3fb..6763898e8 100644 --- a/apps/dokploy/components/layouts/side.tsx +++ b/apps/dokploy/components/layouts/side.tsx @@ -41,6 +41,7 @@ import Link from "next/link"; import { usePathname } from "next/navigation"; import { useEffect, useState } from "react"; import { toast } from "sonner"; +import { Badge } from "@/components/ui/badge"; import { Breadcrumb, BreadcrumbItem, @@ -564,6 +565,8 @@ function SidebarLogo() { const { isMobile } = useSidebar(); const isCollapsed = state === "collapsed" && !isMobile; const { data: activeOrganization } = api.organization.active.useQuery(); + const { data: haveValidLicense } = + api.licenseKey.haveValidLicenseKey.useQuery(); const { data: invitations, refetch: refetchInvitations } = api.user.getInvitations.useQuery(); @@ -629,9 +632,14 @@ function SidebarLogo() { isCollapsed && "hidden", )} > -

- {activeOrganization?.name ?? "Select Organization"} -

+
+

+ {activeOrganization?.name ?? "Select Organization"} +

+ {haveValidLicense && ( + Enterprise + )} +