diff --git a/src/app/[orgId]/settings/(private)/labels/page.tsx b/src/app/[orgId]/settings/(private)/labels/page.tsx index 806c60325..f2ef0aa44 100644 --- a/src/app/[orgId]/settings/(private)/labels/page.tsx +++ b/src/app/[orgId]/settings/(private)/labels/page.tsx @@ -3,7 +3,9 @@ import { authCookieHeader } from "@app/lib/api/cookies"; import { ListOrgLabelsResponse } from "@server/routers/labels/types"; import { AxiosResponse } from "axios"; import OrgLabelsTable from "@app/components/OrgLabelsTable"; +import { PaidFeaturesAlert } from "@app/components/PaidFeaturesAlert"; import SettingsSectionTitle from "@app/components/SettingsSectionTitle"; +import { tierMatrix } from "@server/lib/billing/tierMatrix"; import type { Metadata } from "next"; import { getTranslations } from "next-intl/server"; @@ -49,6 +51,8 @@ export default async function LabelsPage({ params, searchParams }: Props) { description={t("orgLabelsDescription")} /> + + - - - - {t( - "resourceGeneralDetailsSubsection" - )} - - - {t( - [ - "tcp", - "udp", - ].includes( - resource.mode - ) - ? "resourceGeneralDetailsSubsectionPortDescription" - : "resourceGeneralDetailsSubsectionDescription" - )} - - - - )} - {showResourcePolicy && - !["tcp", "udp"].includes( + { !["tcp", "udp"].includes( resource.mode ) && ( <> diff --git a/src/app/navigation.tsx b/src/app/navigation.tsx index 87cd3259f..43323ba2f 100644 --- a/src/app/navigation.tsx +++ b/src/app/navigation.tsx @@ -259,7 +259,7 @@ export const orgNavSections = ( href: "/{orgId}/settings/api-keys", icon: }, - ...(build !== "oss" + ...(!env?.flags.disableEnterpriseFeatures ? [ { title: "labels", diff --git a/src/components/OrgLabelsTable.tsx b/src/components/OrgLabelsTable.tsx index 0b022d2ec..3b2ea691b 100644 --- a/src/components/OrgLabelsTable.tsx +++ b/src/components/OrgLabelsTable.tsx @@ -12,14 +12,7 @@ import { useNavigationContext } from "@app/hooks/useNavigationContext"; import { toast } from "@app/hooks/useToast"; import { createApiClient, formatAxiosError } from "@app/lib/api"; import { type PaginationState } from "@tanstack/react-table"; -import { - ArrowDown01Icon, - ArrowUp10Icon, - ChevronsUpDownIcon, - MoreHorizontal, - PencilIcon, - PencilLineIcon -} from "lucide-react"; +import { ArrowRight, MoreHorizontal } from "lucide-react"; import { useTranslations } from "next-intl"; import { usePathname, useRouter } from "next/navigation"; import { useActionState, useMemo, useState, useTransition } from "react"; @@ -109,7 +102,7 @@ export default function OrgLabelsTable({ cell: ({ row }) => (
, cell: ({ row }) => ( - - - - - - { - setSelectedLabel(row.original); - setIsEditModalOpen(true); - }} - > - {t("edit")} - - { - setSelectedLabel(row.original); - setIsDeleteModalOpen(true); - }} - > - - {t("delete")} - - - - +
+ + + + + + { + setSelectedLabel(row.original); + setIsDeleteModalOpen(true); + }} + > + + {t("delete")} + + + + + +
) } ], diff --git a/src/components/resource-policy/EditPolicyForm.tsx b/src/components/resource-policy/EditPolicyForm.tsx index 7ad92360d..839fc1e69 100644 --- a/src/components/resource-policy/EditPolicyForm.tsx +++ b/src/components/resource-policy/EditPolicyForm.tsx @@ -73,7 +73,9 @@ export function EditPolicyForm({ } const policyTiers = tierMatrix[TierFeature.ResourcePolicies]; - const isDisabled = !isPaidUser(policyTiers); + const isInlinePolicy = hidePolicyNameForm && resourceId === undefined; + const showPaidAlert = !isInlinePolicy; + const isDisabled = showPaidAlert && !isPaidUser(policyTiers); const effectiveReadonly = readonly || isDisabled; const authSection = ( @@ -100,7 +102,7 @@ export function EditPolicyForm({ if (section === "general") { return ( <> - + {showPaidAlert && }
- + {showPaidAlert && }
- + {showPaidAlert && }
- + {showPaidAlert && }