diff --git a/backend/src/ee/services/EELicenseService.ts b/backend/src/ee/services/EELicenseService.ts index d6fce3c7f..9e3416583 100644 --- a/backend/src/ee/services/EELicenseService.ts +++ b/backend/src/ee/services/EELicenseService.ts @@ -55,7 +55,7 @@ class EELicenseService { environmentLimit: null, environmentsUsed: 0, secretVersioning: true, - pitRecovery: true, + pitRecovery: false, rbac: true, customRateLimits: true, customAlerts: true, diff --git a/frontend/src/components/v2/UpgradePlanModal/UpgradePlanModal.tsx b/frontend/src/components/v2/UpgradePlanModal/UpgradePlanModal.tsx index 7b9777783..968f131bc 100644 --- a/frontend/src/components/v2/UpgradePlanModal/UpgradePlanModal.tsx +++ b/frontend/src/components/v2/UpgradePlanModal/UpgradePlanModal.tsx @@ -1,5 +1,7 @@ import Link from "next/link"; +import { useSubscription } from "@app/context"; + import { Button } from "../Button"; import { Modal, ModalClose, ModalContent } from "../Modal"; @@ -9,28 +11,35 @@ type Props = { text: string; }; -export const UpgradePlanModal = ({ text, isOpen, onOpenChange }: Props): JSX.Element => ( - - - - , - - - - ]} - > -

{text}

-

- Upgrade and get access to this, as well as to other powerful enhancements. -

-
-
-); +export const UpgradePlanModal = ({ text, isOpen, onOpenChange }: Props): JSX.Element => { + const { subscription } = useSubscription(); + const link = (subscription && subscription.slug !== null) + ? `/settings/billing/${localStorage.getItem("projectData.id") as string}` + : "https://infisical.com/scheduledemo"; + + return ( + + + + , + + + + ]} + > +

{text}

+

+ Upgrade and get access to this, as well as to other powerful enhancements. +

+
+
+ ) +} \ No newline at end of file diff --git a/frontend/src/pages/activity/[id].tsx b/frontend/src/pages/activity/[id].tsx index 7fad29421..1f7b7b75a 100644 --- a/frontend/src/pages/activity/[id].tsx +++ b/frontend/src/pages/activity/[id].tsx @@ -184,11 +184,13 @@ export default function Activity() { /> - handlePopUpClose("upgradePlan")} - text="You can see more logs if you switch to Infisical's Business/Professional Plan." - /> + {subscription && ( + handlePopUpClose("upgradePlan")} + text={subscription.slug === null ? "You can see more logs under an Enterprise license" : "You can see more logs if you switch to Infisical's Business/Professional Plan."} + /> + )} ); } diff --git a/frontend/src/views/DashboardPage/DashboardPage.tsx b/frontend/src/views/DashboardPage/DashboardPage.tsx index a3e3028e4..539d9fea7 100644 --- a/frontend/src/views/DashboardPage/DashboardPage.tsx +++ b/frontend/src/views/DashboardPage/DashboardPage.tsx @@ -32,10 +32,11 @@ import { PopoverTrigger, TableContainer, Tag, - Tooltip + Tooltip, + UpgradePlanModal } from "@app/components/v2"; import { leaveConfirmDefaultMessage } from "@app/const"; -import { useWorkspace } from "@app/context"; +import { useSubscription,useWorkspace } from "@app/context"; import { useLeaveConfirm, usePopUp, useToggle } from "@app/hooks"; import { useBatchSecretsOp, @@ -97,6 +98,7 @@ const USER_ACTION_PUSH = "first_time_secrets_pushed"; * They will get it back */ export const DashboardPage = ({ envFromTop }: { envFromTop: string }) => { + const { subscription } = useSubscription(); const { t } = useTranslation(); const router = useRouter(); const { createNotification } = useNotificationContext(); @@ -110,7 +112,8 @@ export const DashboardPage = ({ envFromTop }: { envFromTop: string }) => { "uploadedSecOpts", "compareSecrets", "folderForm", - "deleteFolder" + "deleteFolder", + "upgradePlan" ] as const); const [isSecretValueHidden, setIsSecretValueHidden] = useToggle(true); const [searchFilter, setSearchFilter] = useState(""); @@ -624,7 +627,14 @@ export const DashboardPage = ({ envFromTop }: { envFromTop: string }) => {
); }; diff --git a/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx b/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx index d51d31f39..70722315f 100644 --- a/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx +++ b/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx @@ -31,8 +31,6 @@ import { } from "./components"; export const OrgSettingsPage = () => { - const host = window.location.origin; - const { t } = useTranslation(); const { currentOrg } = useOrganization(); const { currentWorkspace } = useWorkspace();