fix: plan clarification in ui popup

This commit is contained in:
Piyush Gupta
2025-10-27 19:49:32 +05:30
parent 7a31ea6eda
commit 614a725e6f
44 changed files with 199 additions and 89 deletions
@@ -1173,7 +1173,9 @@ export const OverviewPage = () => {
return;
}
handlePopUpOpen("upgradePlan", {
isEnterpriseFeature: true
isEnterpriseFeature: true,
description:
"You can add dynamic secrets if you switch to Infisical's Enterprise plan."
});
}}
isDisabled={userAvailableDynamicSecretEnvs.length === 0}
@@ -1197,7 +1199,10 @@ export const OverviewPage = () => {
handlePopUpClose("misc");
return;
}
handlePopUpOpen("upgradePlan");
handlePopUpOpen("upgradePlan", {
description:
"You can add secret rotations if you switch to Infisical's Pro plan."
});
}}
isDisabled={userAvailableSecretRotationEnvs.length === 0}
variant="outline_bg"
@@ -1682,11 +1687,7 @@ export const OverviewPage = () => {
isOpen={popUp.upgradePlan.isOpen}
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
text={
subscription.slug === null
? "You can perform this action under an Enterprise license"
: "You can perform this action if you switch to Infisical's Enterprise plan"
}
text={popUp.upgradePlan.data?.description}
/>
)}
<CreateSecretRotationV2Modal
@@ -329,7 +329,10 @@ export const AccessApprovalRequest = ({
<Button
onClick={() => {
if (subscription && !subscription?.secretApproval) {
handlePopUpOpen("upgradePlan");
handlePopUpOpen("upgradePlan", {
description:
"You can use request access feature if you switch to Infisical's Pro plan."
});
return;
}
handlePopUpOpen("requestAccess");
@@ -593,7 +596,7 @@ export const AccessApprovalRequest = ({
)}
<UpgradePlanModal
text="You need to upgrade your plan to access this feature"
text={""}
isOpen={popUp.upgradePlan.isOpen}
onOpenChange={() => handlePopUpClose("upgradePlan")}
/>
@@ -505,7 +505,7 @@ export const ApprovalPolicyList = ({ projectId }: IProps) => {
<UpgradePlanModal
isOpen={popUp.upgradePlan.isOpen}
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
text="You can add secret approval policy if you switch to Infisical's Enterprise plan."
text="You can add secret approval policy if you switch to Infisical's Pro plan."
/>
</>
);
@@ -905,7 +905,9 @@ export const ActionBar = ({
return;
}
handlePopUpOpen("upgradePlan");
handlePopUpOpen("upgradePlan", {
feature: "PIT Recovery"
});
}}
leftIcon={<FontAwesomeIcon icon={faCodeCommit} />}
isLoading={isSnapshotCountLoading}
@@ -1020,6 +1022,7 @@ export const ActionBar = ({
return;
}
handlePopUpOpen("upgradePlan", {
feature: "Dynamic Secrets",
isEnterpriseFeature: true
});
}}
@@ -1048,7 +1051,9 @@ export const ActionBar = ({
handlePopUpClose("misc");
return;
}
handlePopUpOpen("upgradePlan");
handlePopUpOpen("upgradePlan", {
feature: "Secret Rotation"
});
}}
variant="outline_bg"
className="h-10 text-left"
@@ -1214,7 +1219,11 @@ export const ActionBar = ({
environment={environment}
secretPath={secretPath}
projectId={projectId}
onUpgradePlan={() => handlePopUpOpen("upgradePlan")}
onUpgradePlan={() =>
handlePopUpOpen("upgradePlan", {
feature: "Secret Imports"
})
}
isOpen={popUp.addSecretImport.isOpen}
onClose={() => handlePopUpClose("addSecretImport")}
onTogglePopUp={(isOpen) => handlePopUpToggle("addSecretImport", isOpen)}
@@ -1277,13 +1286,7 @@ export const ActionBar = ({
isOpen={popUp.upgradePlan.isOpen}
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
text={
subscription.slug === null
? "You can perform this action under an Enterprise license"
: `You can perform this action if you switch to Infisical's ${
popUp.upgradePlan.data?.isEnterpriseFeature ? "Enterprise" : "Pro"
} plan`
}
text={`You can use ${popUp.upgradePlan.data?.feature} if you switch to Infisical's ${popUp.upgradePlan.data?.isEnterpriseFeature ? "Enterprise" : "Pro"} plan.`}
/>
)}
<Modal
@@ -321,7 +321,7 @@ export const SecretDetailSidebar = ({
onOpenChange={(isUpgradeModalOpen) =>
handlePopUpToggle("secretAccessUpgradePlan", isUpgradeModalOpen)
}
text="Secret access analysis is only available on Infisical's Pro plan and above."
text="You can access secret access analysis if you switch to Infisical's Pro plan."
/>
<Modal
isOpen={popUp.secretReferenceTree.isOpen}