diff --git a/src/app/navigation.tsx b/src/app/navigation.tsx index 8c4684a6..ea33b294 100644 --- a/src/app/navigation.tsx +++ b/src/app/navigation.tsx @@ -6,7 +6,8 @@ import { Link as LinkIcon, Waypoints, Combine, - Fingerprint + Fingerprint, + KeyRound } from "lucide-react"; export const orgLangingNavItems: SidebarNavItem[] = [ @@ -63,6 +64,12 @@ export const orgNavItems: SidebarNavItem[] = [ href: "/{orgId}/settings/share-links", icon: }, + { + title: "API Keys", + href: "/{orgId}/settings/api-keys", + icon: , + showEnterprise: true + }, { title: "Settings", href: "/{orgId}/settings/general", @@ -76,6 +83,12 @@ export const adminNavItems: SidebarNavItem[] = [ href: "/admin/users", icon: }, + { + title: "API Keys", + href: "/{orgId}/settings/api-keys", + icon: , + showEnterprise: true + }, { title: "Identity Providers", href: "/admin/idp", diff --git a/src/app/setup/page.tsx b/src/app/setup/page.tsx index 1e416d26..5420748c 100644 --- a/src/app/setup/page.tsx +++ b/src/app/setup/page.tsx @@ -61,6 +61,9 @@ export default function StepperForm() { const router = useRouter(); const checkOrgIdAvailability = useCallback(async (value: string) => { + if (loading) { + return; + } try { const res = await api.get(`/org/checkId`, { params: { diff --git a/src/components/SidebarNav.tsx b/src/components/SidebarNav.tsx index 6a7aec25..31dd2ce2 100644 --- a/src/components/SidebarNav.tsx +++ b/src/components/SidebarNav.tsx @@ -6,6 +6,7 @@ import { useParams, usePathname } from "next/navigation"; import { cn } from "@app/lib/cn"; import { ChevronDown, ChevronRight } from "lucide-react"; import { useUserContext } from "@app/hooks/useUserContext"; +import { Badge } from "@app/components/ui/badge"; export interface SidebarNavItem { href: string; @@ -13,6 +14,7 @@ export interface SidebarNavItem { icon?: React.ReactNode; children?: SidebarNavItem[]; autoExpand?: boolean; + showEnterprise?: boolean; } export interface SidebarNavProps extends React.HTMLAttributes { @@ -95,7 +97,9 @@ export function SidebarNav({ const isActive = pathname.startsWith(hydratedHref); const hasChildren = item.children && item.children.length > 0; const isExpanded = expandedItems.has(hydratedHref); - const indent = level * 16; // Base indent for each level + const indent = level * 28; // Base indent for each level + const isEnterprise = item.showEnterprise; + const isDisabled = disabled || isEnterprise; return (
@@ -110,34 +114,41 @@ export function SidebarNav({ )} > { - if (disabled) { + if (isDisabled) { e.preventDefault(); } else if (onItemClick) { onItemClick(); } }} - tabIndex={disabled ? -1 : undefined} - aria-disabled={disabled} + tabIndex={isDisabled ? -1 : undefined} + aria-disabled={isDisabled} > - {item.icon && ( - {item.icon} +
+ {item.icon && ( + {item.icon} + )} + {item.title} +
+ {isEnterprise && ( + + Enterprise + )} - {item.title} {hasChildren && (