mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-06 10:46:38 +00:00
move billing and and licenses up in sidebar
This commit is contained in:
@@ -1230,7 +1230,7 @@
|
|||||||
"refreshError": "Failed to refresh data",
|
"refreshError": "Failed to refresh data",
|
||||||
"verified": "Verified",
|
"verified": "Verified",
|
||||||
"pending": "Pending",
|
"pending": "Pending",
|
||||||
"sidebarBilling": "Payment & Billing",
|
"sidebarBilling": "Billing",
|
||||||
"billing": "Billing",
|
"billing": "Billing",
|
||||||
"orgBillingDescription": "Manage your billing information and subscriptions",
|
"orgBillingDescription": "Manage your billing information and subscriptions",
|
||||||
"github": "GitHub",
|
"github": "GitHub",
|
||||||
@@ -1765,7 +1765,7 @@
|
|||||||
"licenseTableValidUntil": "Valid Until",
|
"licenseTableValidUntil": "Valid Until",
|
||||||
"saasLicenseKeysSettingsTitle": "Enterprise Licenses",
|
"saasLicenseKeysSettingsTitle": "Enterprise Licenses",
|
||||||
"saasLicenseKeysSettingsDescription": "Generate and manage Enterprise license keys for self-hosted Pangolin instances",
|
"saasLicenseKeysSettingsDescription": "Generate and manage Enterprise license keys for self-hosted Pangolin instances",
|
||||||
"sidebarEnterpriseLicenses": "Enterprise Licenses",
|
"sidebarEnterpriseLicenses": "Licenses",
|
||||||
"generateLicenseKey": "Generate License Key",
|
"generateLicenseKey": "Generate License Key",
|
||||||
"generateLicenseKeyForm": {
|
"generateLicenseKeyForm": {
|
||||||
"validation": {
|
"validation": {
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ import {
|
|||||||
Globe, // Added from 'dev' branch
|
Globe, // Added from 'dev' branch
|
||||||
MonitorUp, // Added from 'dev' branch
|
MonitorUp, // Added from 'dev' branch
|
||||||
Server,
|
Server,
|
||||||
Zap
|
Zap,
|
||||||
|
CreditCard
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
|
|
||||||
export type SidebarNavSection = {
|
export type SidebarNavSection = {
|
||||||
@@ -119,6 +120,24 @@ export const orgNavSections = (
|
|||||||
href: "/{orgId}/settings/api-keys",
|
href: "/{orgId}/settings/api-keys",
|
||||||
icon: <KeyRound className="h-4 w-4" />
|
icon: <KeyRound className="h-4 w-4" />
|
||||||
},
|
},
|
||||||
|
...(build == "saas"
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
title: "sidebarBilling",
|
||||||
|
href: "/{orgId}/settings/billing",
|
||||||
|
icon: <CreditCard className="h-4 w-4" />
|
||||||
|
}
|
||||||
|
]
|
||||||
|
: []),
|
||||||
|
...(build == "saas"
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
title: "sidebarEnterpriseLicenses",
|
||||||
|
href: "/{orgId}/settings/license",
|
||||||
|
icon: <TicketCheck className="h-4 w-4" />
|
||||||
|
}
|
||||||
|
]
|
||||||
|
: []),
|
||||||
{
|
{
|
||||||
title: "sidebarSettings",
|
title: "sidebarSettings",
|
||||||
href: "/{orgId}/settings/general",
|
href: "/{orgId}/settings/general",
|
||||||
|
|||||||
@@ -105,6 +105,9 @@ export default function GenerateLicenseKeysTable({
|
|||||||
<ArrowUpDown className="ml-2 h-4 w-4" />
|
<ArrowUpDown className="ml-2 h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
cell: ({ row }) => {
|
||||||
|
return row.original.instanceName || "-";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -130,64 +130,6 @@ export function LayoutSidebar({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="p-4 space-y-4 shrink-0">
|
<div className="p-4 space-y-4 shrink-0">
|
||||||
{build === "saas" && (
|
|
||||||
<div className="mb-3 pt-4">
|
|
||||||
<div className="space-y-1">
|
|
||||||
<Link
|
|
||||||
href={`/${orgId}/settings/billing`}
|
|
||||||
className={cn(
|
|
||||||
"flex items-center rounded transition-colors text-muted-foreground hover:text-foreground text-sm w-full hover:bg-secondary/50 dark:hover:bg-secondary/20 rounded-md",
|
|
||||||
isSidebarCollapsed
|
|
||||||
? "px-2 py-2 justify-center"
|
|
||||||
: "px-3 py-1.5"
|
|
||||||
)}
|
|
||||||
title={
|
|
||||||
isSidebarCollapsed
|
|
||||||
? t("sidebarBilling")
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
className={cn(
|
|
||||||
"flex-shrink-0",
|
|
||||||
!isSidebarCollapsed && "mr-2"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<CreditCard className="h-4 w-4" />
|
|
||||||
</span>
|
|
||||||
{!isSidebarCollapsed && (
|
|
||||||
<span>{t("sidebarBilling")}</span>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link
|
|
||||||
href={`/${orgId}/settings/license`}
|
|
||||||
className={cn(
|
|
||||||
"flex items-center rounded transition-colors text-muted-foreground hover:text-foreground text-sm w-full hover:bg-secondary/50 dark:hover:bg-secondary/20 rounded-md",
|
|
||||||
isSidebarCollapsed
|
|
||||||
? "px-2 py-2 justify-center"
|
|
||||||
: "px-3 py-1.5"
|
|
||||||
)}
|
|
||||||
title={
|
|
||||||
isSidebarCollapsed
|
|
||||||
? t("sidebarEnterpriseLicenses")
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
className={cn(
|
|
||||||
"flex-shrink-0",
|
|
||||||
!isSidebarCollapsed && "mr-2"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<TicketCheck className="h-4 w-4" />
|
|
||||||
</span>
|
|
||||||
{!isSidebarCollapsed && (
|
|
||||||
<span>{t("sidebarEnterpriseLicenses")}</span>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{build === "enterprise" && (
|
{build === "enterprise" && (
|
||||||
<div className="mb-3">
|
<div className="mb-3">
|
||||||
<SidebarLicenseButton
|
<SidebarLicenseButton
|
||||||
|
|||||||
Reference in New Issue
Block a user