From 276d1361ac0eccdf728fb6ac5e3763d3e87933c5 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Mon, 13 Oct 2025 18:07:00 -0700 Subject: [PATCH] move billing and and licenses up in sidebar --- messages/en-US.json | 4 +- src/app/navigation.tsx | 21 +++++++- src/components/GenerateLicenseKeysTable.tsx | 3 ++ src/components/LayoutSidebar.tsx | 58 --------------------- 4 files changed, 25 insertions(+), 61 deletions(-) diff --git a/messages/en-US.json b/messages/en-US.json index 83ad9a06..79939254 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -1230,7 +1230,7 @@ "refreshError": "Failed to refresh data", "verified": "Verified", "pending": "Pending", - "sidebarBilling": "Payment & Billing", + "sidebarBilling": "Billing", "billing": "Billing", "orgBillingDescription": "Manage your billing information and subscriptions", "github": "GitHub", @@ -1765,7 +1765,7 @@ "licenseTableValidUntil": "Valid Until", "saasLicenseKeysSettingsTitle": "Enterprise Licenses", "saasLicenseKeysSettingsDescription": "Generate and manage Enterprise license keys for self-hosted Pangolin instances", - "sidebarEnterpriseLicenses": "Enterprise Licenses", + "sidebarEnterpriseLicenses": "Licenses", "generateLicenseKey": "Generate License Key", "generateLicenseKeyForm": { "validation": { diff --git a/src/app/navigation.tsx b/src/app/navigation.tsx index a3311b68..2d6aaec8 100644 --- a/src/app/navigation.tsx +++ b/src/app/navigation.tsx @@ -15,7 +15,8 @@ import { Globe, // Added from 'dev' branch MonitorUp, // Added from 'dev' branch Server, - Zap + Zap, + CreditCard } from "lucide-react"; export type SidebarNavSection = { @@ -119,6 +120,24 @@ export const orgNavSections = ( href: "/{orgId}/settings/api-keys", icon: }, + ...(build == "saas" + ? [ + { + title: "sidebarBilling", + href: "/{orgId}/settings/billing", + icon: + } + ] + : []), + ...(build == "saas" + ? [ + { + title: "sidebarEnterpriseLicenses", + href: "/{orgId}/settings/license", + icon: + } + ] + : []), { title: "sidebarSettings", href: "/{orgId}/settings/general", diff --git a/src/components/GenerateLicenseKeysTable.tsx b/src/components/GenerateLicenseKeysTable.tsx index 275a4068..580fdba4 100644 --- a/src/components/GenerateLicenseKeysTable.tsx +++ b/src/components/GenerateLicenseKeysTable.tsx @@ -105,6 +105,9 @@ export default function GenerateLicenseKeysTable({ ); + }, + cell: ({ row }) => { + return row.original.instanceName || "-"; } }, { diff --git a/src/components/LayoutSidebar.tsx b/src/components/LayoutSidebar.tsx index 04cee5c8..a40c2017 100644 --- a/src/components/LayoutSidebar.tsx +++ b/src/components/LayoutSidebar.tsx @@ -130,64 +130,6 @@ export function LayoutSidebar({
- {build === "saas" && ( -
-
- - - - - {!isSidebarCollapsed && ( - {t("sidebarBilling")} - )} - - - - - - {!isSidebarCollapsed && ( - {t("sidebarEnterpriseLicenses")} - )} - -
-
- )} {build === "enterprise" && (