mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Merge pull request #4768 from Infisical/fix/upgrade-plan-modal-text
[ENG-3801] fix: updates plan modal text
This commit is contained in:
@@ -71,7 +71,7 @@ export const PkiSyncSelect = ({ onSelect }: Props) => {
|
|||||||
enterprise && !subscription.enterpriseCertificateSyncs
|
enterprise && !subscription.enterpriseCertificateSyncs
|
||||||
? handlePopUpOpen("upgradePlan", {
|
? handlePopUpOpen("upgradePlan", {
|
||||||
isEnterpriseFeature: true,
|
isEnterpriseFeature: true,
|
||||||
text: "You can use every Certificate Sync if you switch to Infisical's Enterprise plan."
|
text: "All Certificate Syncs can be unlocked if you switch to Infisical Enterprise plan."
|
||||||
})
|
})
|
||||||
: onSelect(destination)
|
: onSelect(destination)
|
||||||
}
|
}
|
||||||
@@ -152,7 +152,7 @@ export const PkiSyncSelect = ({ onSelect }: Props) => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
text="You can use every Certificate Sync if you switch to Infisical's Enterprise plan."
|
text={popUp.upgradePlan.data?.text}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ export const SecretSyncSelect = ({ onSelect }: Props) => {
|
|||||||
onClick={() =>
|
onClick={() =>
|
||||||
enterprise && !subscription.enterpriseSecretSyncs
|
enterprise && !subscription.enterpriseSecretSyncs
|
||||||
? handlePopUpOpen("upgradePlan", {
|
? handlePopUpOpen("upgradePlan", {
|
||||||
isEnterpriseFeature: true
|
isEnterpriseFeature: true,
|
||||||
|
text: "All Secret Syncs can be unlocked if you switch to Infisical Enterprise plan."
|
||||||
})
|
})
|
||||||
: onSelect(destination)
|
: onSelect(destination)
|
||||||
}
|
}
|
||||||
@@ -149,7 +150,7 @@ export const SecretSyncSelect = ({ onSelect }: Props) => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use every Secret Sync if you switch to Infisical's Enterprise plan."
|
text={popUp.upgradePlan.data?.text}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ export const PamLayout = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (subscription && !subscription.pam) {
|
if (subscription && !subscription.pam) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description: "You can use PAM if you switch to Infisical's Enterprise plan.",
|
description:
|
||||||
|
"Your current plan does not provide access to Infisical PAM. To unlock this feature, please upgrade to Infisical Enterprise plan.",
|
||||||
isEnterpriseFeature: true
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ export const ProjectSelect = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You have exceeded the number of projects allowed on the free plan."
|
text="You’ve reached the maximum number of projects available on the Free plan. Upgrade to the Infisical Pro plan to create more projects."
|
||||||
/>
|
/>
|
||||||
<NewProjectModal
|
<NewProjectModal
|
||||||
isOpen={popUp.addNewWs.isOpen}
|
isOpen={popUp.addNewWs.isOpen}
|
||||||
|
|||||||
@@ -432,7 +432,7 @@ export const ServerAdminsTable = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={`${popUp?.upgradePlan?.data?.message} is only available on Infisical's Pro plan and above.`}
|
text="Your current plan does not allow removing server admins. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
/>
|
/>
|
||||||
<DeleteActionModal
|
<DeleteActionModal
|
||||||
isOpen={popUp.removeUsers.isOpen}
|
isOpen={popUp.removeUsers.isOpen}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const EncryptionPageForm = () => {
|
|||||||
if (!subscription.hsm) {
|
if (!subscription.hsm) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
isEnterpriseFeature: true,
|
isEnterpriseFeature: true,
|
||||||
description: "Hardware Security Module's (HSM's), are only available on Enterprise plans."
|
text: "Your current plan does not include access to Hardware Security Module (HSM). To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@ export const EncryptionPageForm = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={popUp.upgradePlan?.data?.text}
|
||||||
isEnterpriseFeature={popUp.upgradePlan?.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan?.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -58,9 +58,6 @@ import {
|
|||||||
import { User } from "@app/hooks/api/users/types";
|
import { User } from "@app/hooks/api/users/types";
|
||||||
import { UsePopUpState } from "@app/hooks/usePopUp";
|
import { UsePopUpState } from "@app/hooks/usePopUp";
|
||||||
|
|
||||||
const addServerAdminUpgradePlanMessage = "Granting another user Server Admin permissions";
|
|
||||||
const removeServerAdminUpgradePlanMessage = "Removing Server Admin permissions from user";
|
|
||||||
|
|
||||||
const UserPanelTable = ({
|
const UserPanelTable = ({
|
||||||
handlePopUpOpen,
|
handlePopUpOpen,
|
||||||
users,
|
users,
|
||||||
@@ -84,7 +81,7 @@ const UserPanelTable = ({
|
|||||||
data?: {
|
data?: {
|
||||||
username: string;
|
username: string;
|
||||||
id: string;
|
id: string;
|
||||||
message?: string;
|
text?: string;
|
||||||
}
|
}
|
||||||
) => void;
|
) => void;
|
||||||
isPending: boolean;
|
isPending: boolean;
|
||||||
@@ -260,7 +257,7 @@ const UserPanelTable = ({
|
|||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
username,
|
username,
|
||||||
id,
|
id,
|
||||||
message: addServerAdminUpgradePlanMessage
|
text: "Your current plan does not allow setting additional server admins. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -288,7 +285,7 @@ const UserPanelTable = ({
|
|||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
username,
|
username,
|
||||||
id,
|
id,
|
||||||
message: removeServerAdminUpgradePlanMessage
|
text: "Your current plan does not allow removing server admins. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -530,7 +527,7 @@ export const UserIdentitiesTable = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={`${popUp?.upgradePlan?.data?.message} is only available on Infisical's Pro plan and above.`}
|
text={popUp.upgradePlan.data?.text}
|
||||||
/>
|
/>
|
||||||
<DeleteActionModal
|
<DeleteActionModal
|
||||||
isOpen={popUp.removeUsers.isOpen}
|
isOpen={popUp.removeUsers.isOpen}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||||
import { Button, DeleteActionModal } from "@app/components/v2";
|
import { Button, DeleteActionModal } from "@app/components/v2";
|
||||||
@@ -24,8 +23,7 @@ export const CaSection = () => {
|
|||||||
"caCert",
|
"caCert",
|
||||||
"installCaCert",
|
"installCaCert",
|
||||||
"deleteCa",
|
"deleteCa",
|
||||||
"caStatus", // enable / disable
|
"caStatus" // enable / disable
|
||||||
"upgradePlan"
|
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
const onRemoveCaSubmit = async (caName: string) => {
|
const onRemoveCaSubmit = async (caName: string) => {
|
||||||
@@ -124,11 +122,6 @@ export const CaSection = () => {
|
|||||||
onUpdateCaStatus(popUp?.caStatus?.data as { caName: string; status: CaStatus })
|
onUpdateCaStatus(popUp?.caStatus?.data as { caName: string; status: CaStatus })
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<UpgradePlanModal
|
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,15 +34,12 @@ import { UsePopUpState } from "@app/hooks/usePopUp";
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (
|
handlePopUpOpen: (
|
||||||
popUpName: keyof UsePopUpState<
|
popUpName: keyof UsePopUpState<["installCaCert", "caCert", "ca", "deleteCa", "caStatus"]>,
|
||||||
["installCaCert", "caCert", "ca", "deleteCa", "caStatus", "upgradePlan"]
|
|
||||||
>,
|
|
||||||
data?: {
|
data?: {
|
||||||
caId?: string;
|
caId?: string;
|
||||||
caName?: string;
|
caName?: string;
|
||||||
dn?: string;
|
dn?: string;
|
||||||
status?: CaStatus;
|
status?: CaStatus;
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
) => void;
|
) => void;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||||
import { Button, DeleteActionModal } from "@app/components/v2";
|
import { Button, DeleteActionModal } from "@app/components/v2";
|
||||||
@@ -20,8 +19,7 @@ export const ExternalCaSection = () => {
|
|||||||
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
|
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
|
||||||
"ca",
|
"ca",
|
||||||
"deleteCa",
|
"deleteCa",
|
||||||
"caStatus", // enable / disable
|
"caStatus" // enable / disable
|
||||||
"upgradePlan"
|
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
const onRemoveCaSubmit = async (caName: string, type: CaType) => {
|
const onRemoveCaSubmit = async (caName: string, type: CaType) => {
|
||||||
@@ -131,11 +129,6 @@ export const ExternalCaSection = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<UpgradePlanModal
|
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -33,12 +33,11 @@ import { UsePopUpState } from "@app/hooks/usePopUp";
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (
|
handlePopUpOpen: (
|
||||||
popUpName: keyof UsePopUpState<["ca", "deleteCa", "caStatus", "upgradePlan"]>,
|
popUpName: keyof UsePopUpState<["ca", "deleteCa", "caStatus"]>,
|
||||||
data?: {
|
data?: {
|
||||||
name?: string;
|
name?: string;
|
||||||
type?: CaType;
|
type?: CaType;
|
||||||
status?: CaStatus;
|
status?: CaStatus;
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
) => void;
|
) => void;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export const CertificateTemplatesSection = ({ caId }: Props) => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
text="Managing template enrollment options for EST is only available on Infisical's Enterprise plan."
|
text="Your current plan does not include access to managing template enrollment options for EST. To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ export const PkiTemplateListPage = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.estUpgradePlan.isOpen}
|
isOpen={popUp.estUpgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("estUpgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("estUpgradePlan", isOpen)}
|
||||||
text="You can only configure template enrollment methods if you switch to Infisical's Enterprise plan."
|
text="Your current plan does not include access to configuring template enrollment methods. To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
isEnterpriseFeature={popUp.estUpgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.estUpgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -344,7 +344,7 @@ export const KmipClientTable = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="KMIP requires an enterprise plan."
|
text="Your current plan does not include access to KMIP. To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -27,8 +27,7 @@ export const OrgGroupsSection = () => {
|
|||||||
const handleAddGroupModal = () => {
|
const handleAddGroupModal = () => {
|
||||||
if (!subscription?.groups) {
|
if (!subscription?.groups) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "Your current plan does not allow adding groups. To unlock this feature, please upgrade to Infisical Enterprise plan.",
|
||||||
"You can manage users more efficiently with groups if you upgrade your Infisical plan to an Enterprise license.",
|
|
||||||
isEnterpriseFeature: true
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -98,7 +97,7 @@ export const OrgGroupsSection = () => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={popUp.upgradePlan?.data?.text}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -55,7 +55,10 @@ const schema = z
|
|||||||
export type FormData = z.infer<typeof schema>;
|
export type FormData = z.infer<typeof schema>;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (popUpName: keyof UsePopUpState<["upgradePlan"]>) => void;
|
handlePopUpOpen: (
|
||||||
|
popUpName: keyof UsePopUpState<["upgradePlan"]>,
|
||||||
|
data?: { featureName?: string }
|
||||||
|
) => void;
|
||||||
handlePopUpToggle: (
|
handlePopUpToggle: (
|
||||||
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
||||||
state?: boolean
|
state?: boolean
|
||||||
@@ -277,7 +280,9 @@ export const IdentityAliCloudAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
placeholder="123.456.789.0"
|
placeholder="123.456.789.0"
|
||||||
/>
|
/>
|
||||||
@@ -292,7 +297,9 @@ export const IdentityAliCloudAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
colorSchema="danger"
|
colorSchema="danger"
|
||||||
@@ -315,7 +322,9 @@ export const IdentityAliCloudAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ export const IdentityAuthMethodModalContent = ({
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp?.upgradePlan?.isOpen}
|
isOpen={popUp?.upgradePlan?.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={`You can use ${popUp.upgradePlan.data?.featureName ?? "IP allowlisting"} if you switch to Infisical's ${popUp.upgradePlan.data?.isEnterpriseFeature ? "Enterprise" : "Pro"} plan.`}
|
text={`Your current plan does not include access to ${popUp.upgradePlan.data?.featureName}. To unlock this feature, please upgrade to Infisical ${popUp.upgradePlan.data?.isEnterpriseFeature ? "Enterprise" : "Pro"} plan.`}
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -57,7 +57,10 @@ const schema = z
|
|||||||
export type FormData = z.infer<typeof schema>;
|
export type FormData = z.infer<typeof schema>;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (popUpName: keyof UsePopUpState<["upgradePlan"]>) => void;
|
handlePopUpOpen: (
|
||||||
|
popUpName: keyof UsePopUpState<["upgradePlan"]>,
|
||||||
|
data?: { featureName?: string }
|
||||||
|
) => void;
|
||||||
handlePopUpToggle: (
|
handlePopUpToggle: (
|
||||||
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
||||||
state?: boolean
|
state?: boolean
|
||||||
@@ -315,7 +318,9 @@ export const IdentityAwsAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
placeholder="123.456.789.0"
|
placeholder="123.456.789.0"
|
||||||
/>
|
/>
|
||||||
@@ -330,7 +335,9 @@ export const IdentityAwsAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
colorSchema="danger"
|
colorSchema="danger"
|
||||||
@@ -353,7 +360,9 @@ export const IdentityAwsAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
@@ -52,7 +52,10 @@ const schema = z
|
|||||||
export type FormData = z.infer<typeof schema>;
|
export type FormData = z.infer<typeof schema>;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (popUpName: keyof UsePopUpState<["upgradePlan"]>) => void;
|
handlePopUpOpen: (
|
||||||
|
popUpName: keyof UsePopUpState<["upgradePlan"]>,
|
||||||
|
data?: { featureName?: string }
|
||||||
|
) => void;
|
||||||
handlePopUpToggle: (
|
handlePopUpToggle: (
|
||||||
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
||||||
state?: boolean
|
state?: boolean
|
||||||
@@ -311,7 +314,9 @@ export const IdentityAzureAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
placeholder="123.456.789.0"
|
placeholder="123.456.789.0"
|
||||||
/>
|
/>
|
||||||
@@ -326,7 +331,9 @@ export const IdentityAzureAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
colorSchema="danger"
|
colorSchema="danger"
|
||||||
@@ -349,7 +356,9 @@ export const IdentityAzureAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
@@ -55,7 +55,10 @@ const schema = z
|
|||||||
export type FormData = z.infer<typeof schema>;
|
export type FormData = z.infer<typeof schema>;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (popUpName: keyof UsePopUpState<["upgradePlan"]>) => void;
|
handlePopUpOpen: (
|
||||||
|
popUpName: keyof UsePopUpState<["upgradePlan"]>,
|
||||||
|
data?: { featureName?: string }
|
||||||
|
) => void;
|
||||||
handlePopUpToggle: (
|
handlePopUpToggle: (
|
||||||
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
||||||
state?: boolean
|
state?: boolean
|
||||||
@@ -350,7 +353,9 @@ export const IdentityGcpAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
placeholder="123.456.789.0"
|
placeholder="123.456.789.0"
|
||||||
/>
|
/>
|
||||||
@@ -365,7 +370,9 @@ export const IdentityGcpAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
colorSchema="danger"
|
colorSchema="danger"
|
||||||
@@ -388,7 +395,9 @@ export const IdentityGcpAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
@@ -88,7 +88,10 @@ const schema = z.discriminatedUnion("configurationType", [
|
|||||||
export type FormData = z.infer<typeof schema>;
|
export type FormData = z.infer<typeof schema>;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (popUpName: keyof UsePopUpState<["upgradePlan"]>) => void;
|
handlePopUpOpen: (
|
||||||
|
popUpName: keyof UsePopUpState<["upgradePlan"]>,
|
||||||
|
data?: { featureName?: string }
|
||||||
|
) => void;
|
||||||
handlePopUpToggle: (
|
handlePopUpToggle: (
|
||||||
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
||||||
state?: boolean
|
state?: boolean
|
||||||
@@ -619,7 +622,9 @@ export const IdentityJwtAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
placeholder="123.456.789.0"
|
placeholder="123.456.789.0"
|
||||||
/>
|
/>
|
||||||
@@ -634,7 +639,9 @@ export const IdentityJwtAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
colorSchema="danger"
|
colorSchema="danger"
|
||||||
@@ -657,7 +664,9 @@ export const IdentityJwtAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
@@ -96,7 +96,10 @@ const schema = z
|
|||||||
export type FormData = z.infer<typeof schema>;
|
export type FormData = z.infer<typeof schema>;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (popUpName: keyof UsePopUpState<["upgradePlan"]>) => void;
|
handlePopUpOpen: (
|
||||||
|
popUpName: keyof UsePopUpState<["upgradePlan"]>,
|
||||||
|
data?: { featureName?: string }
|
||||||
|
) => void;
|
||||||
handlePopUpToggle: (
|
handlePopUpToggle: (
|
||||||
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
||||||
state?: boolean
|
state?: boolean
|
||||||
@@ -707,7 +710,9 @@ export const IdentityKubernetesAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
placeholder="123.456.789.0"
|
placeholder="123.456.789.0"
|
||||||
/>
|
/>
|
||||||
@@ -722,7 +727,9 @@ export const IdentityKubernetesAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
colorSchema="danger"
|
colorSchema="danger"
|
||||||
@@ -745,7 +752,9 @@ export const IdentityKubernetesAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
@@ -837,7 +837,9 @@ export const IdentityLdapAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
placeholder="123.456.789.0"
|
placeholder="123.456.789.0"
|
||||||
/>
|
/>
|
||||||
@@ -852,7 +854,9 @@ export const IdentityLdapAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
colorSchema="danger"
|
colorSchema="danger"
|
||||||
@@ -875,7 +879,9 @@ export const IdentityLdapAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
@@ -63,7 +63,10 @@ const schema = z
|
|||||||
export type FormData = z.infer<typeof schema>;
|
export type FormData = z.infer<typeof schema>;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (popUpName: keyof UsePopUpState<["upgradePlan"]>) => void;
|
handlePopUpOpen: (
|
||||||
|
popUpName: keyof UsePopUpState<["upgradePlan"]>,
|
||||||
|
data?: { featureName?: string }
|
||||||
|
) => void;
|
||||||
handlePopUpToggle: (
|
handlePopUpToggle: (
|
||||||
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
||||||
state?: boolean
|
state?: boolean
|
||||||
@@ -297,7 +300,9 @@ export const IdentityOciAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
placeholder="123.456.789.0"
|
placeholder="123.456.789.0"
|
||||||
/>
|
/>
|
||||||
@@ -312,7 +317,9 @@ export const IdentityOciAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
colorSchema="danger"
|
colorSchema="danger"
|
||||||
@@ -335,7 +342,9 @@ export const IdentityOciAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
@@ -75,7 +75,10 @@ const schema = z.object({
|
|||||||
export type FormData = z.infer<typeof schema>;
|
export type FormData = z.infer<typeof schema>;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (popUpName: keyof UsePopUpState<["upgradePlan"]>) => void;
|
handlePopUpOpen: (
|
||||||
|
popUpName: keyof UsePopUpState<["upgradePlan"]>,
|
||||||
|
data?: { featureName?: string }
|
||||||
|
) => void;
|
||||||
handlePopUpToggle: (
|
handlePopUpToggle: (
|
||||||
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
||||||
state?: boolean
|
state?: boolean
|
||||||
@@ -606,7 +609,9 @@ export const IdentityOidcAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
placeholder="123.456.789.0"
|
placeholder="123.456.789.0"
|
||||||
/>
|
/>
|
||||||
@@ -621,7 +626,9 @@ export const IdentityOidcAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
colorSchema="danger"
|
colorSchema="danger"
|
||||||
@@ -644,7 +651,9 @@ export const IdentityOidcAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
@@ -145,8 +145,7 @@ export const IdentitySection = withPermission(
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!isMoreIdentitiesAllowed && !isEnterprise) {
|
if (!isMoreIdentitiesAllowed && !isEnterprise) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "You have reached the maximum number of identities allowed on your current plan. Upgrade to Infisical Pro plan to add more identities."
|
||||||
"You can add more identities if you upgrade your Infisical Pro plan."
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -181,8 +180,7 @@ export const IdentitySection = withPermission(
|
|||||||
if (subscription && !subscription.machineIdentityAuthTemplates) {
|
if (subscription && !subscription.machineIdentityAuthTemplates) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
isEnterpriseFeature: true,
|
isEnterpriseFeature: true,
|
||||||
description:
|
text: "Your current plan does not include access to creating Identity Auth Templates. To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
"You can use Identity Auth Templates if you switch to Infisical's Enterprise plan."
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -253,7 +251,7 @@ export const IdentitySection = withPermission(
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={popUp.upgradePlan.data?.description}
|
text={popUp.upgradePlan.data?.text}
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -50,7 +50,10 @@ const schema = z.object({
|
|||||||
export type FormData = z.infer<typeof schema>;
|
export type FormData = z.infer<typeof schema>;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (popUpName: keyof UsePopUpState<["upgradePlan"]>) => void;
|
handlePopUpOpen: (
|
||||||
|
popUpName: keyof UsePopUpState<["upgradePlan"]>,
|
||||||
|
data?: { featureName?: string }
|
||||||
|
) => void;
|
||||||
handlePopUpToggle: (
|
handlePopUpToggle: (
|
||||||
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
||||||
state?: boolean
|
state?: boolean
|
||||||
@@ -286,7 +289,9 @@ export const IdentityTlsCertAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
placeholder="123.456.789.0"
|
placeholder="123.456.789.0"
|
||||||
/>
|
/>
|
||||||
@@ -301,7 +306,9 @@ export const IdentityTlsCertAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
colorSchema="danger"
|
colorSchema="danger"
|
||||||
@@ -324,7 +331,9 @@ export const IdentityTlsCertAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
@@ -49,7 +49,10 @@ const schema = z
|
|||||||
export type FormData = z.infer<typeof schema>;
|
export type FormData = z.infer<typeof schema>;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (popUpName: keyof UsePopUpState<["upgradePlan"]>) => void;
|
handlePopUpOpen: (
|
||||||
|
popUpName: keyof UsePopUpState<["upgradePlan"]>,
|
||||||
|
data?: { featureName?: string }
|
||||||
|
) => void;
|
||||||
handlePopUpToggle: (
|
handlePopUpToggle: (
|
||||||
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
||||||
state?: boolean
|
state?: boolean
|
||||||
@@ -248,7 +251,9 @@ export const IdentityTokenAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
placeholder="123.456.789.0"
|
placeholder="123.456.789.0"
|
||||||
/>
|
/>
|
||||||
@@ -263,7 +268,9 @@ export const IdentityTokenAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
colorSchema="danger"
|
colorSchema="danger"
|
||||||
@@ -286,7 +293,9 @@ export const IdentityTokenAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
@@ -87,7 +87,10 @@ const schema = z
|
|||||||
export type FormData = z.infer<typeof schema>;
|
export type FormData = z.infer<typeof schema>;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (popUpName: keyof UsePopUpState<["upgradePlan"]>) => void;
|
handlePopUpOpen: (
|
||||||
|
popUpName: keyof UsePopUpState<["upgradePlan"]>,
|
||||||
|
data?: { featureName?: string }
|
||||||
|
) => void;
|
||||||
handlePopUpToggle: (
|
handlePopUpToggle: (
|
||||||
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
||||||
state?: boolean
|
state?: boolean
|
||||||
@@ -409,7 +412,9 @@ export const IdentityUniversalAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
placeholder="123.456.789.0"
|
placeholder="123.456.789.0"
|
||||||
/>
|
/>
|
||||||
@@ -424,7 +429,9 @@ export const IdentityUniversalAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
colorSchema="danger"
|
colorSchema="danger"
|
||||||
@@ -447,7 +454,9 @@ export const IdentityUniversalAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
size="xs"
|
size="xs"
|
||||||
@@ -477,7 +486,9 @@ export const IdentityUniversalAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
placeholder="123.456.789.0"
|
placeholder="123.456.789.0"
|
||||||
/>
|
/>
|
||||||
@@ -492,7 +503,9 @@ export const IdentityUniversalAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
colorSchema="danger"
|
colorSchema="danger"
|
||||||
@@ -515,7 +528,9 @@ export const IdentityUniversalAuthForm = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
featureName: "IP allowlisting"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export const OrgMembersSection = () => {
|
|||||||
|
|
||||||
if (!isMoreIdentitiesAllowed && !isEnterprise) {
|
if (!isMoreIdentitiesAllowed && !isEnterprise) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description: "You can add more members if you switch to Infisical's Pro plan."
|
text: "You have reached the maximum number of members allowed on your current plan. Upgrade to Infisical Pro plan to add more members."
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -323,7 +323,7 @@ export const OrgMembersSection = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={popUp.upgradePlan?.data?.text}
|
||||||
/>
|
/>
|
||||||
<EmailServiceSetupModal
|
<EmailServiceSetupModal
|
||||||
isOpen={popUp.setUpEmail?.isOpen}
|
isOpen={popUp.setUpEmail?.isOpen}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ type Props = {
|
|||||||
data?: {
|
data?: {
|
||||||
orgMembershipId?: string;
|
orgMembershipId?: string;
|
||||||
username?: string;
|
username?: string;
|
||||||
description?: string;
|
text?: string;
|
||||||
selectedOrgMemberships?: OrgUser[];
|
selectedOrgMemberships?: OrgUser[];
|
||||||
}
|
}
|
||||||
) => void;
|
) => void;
|
||||||
@@ -133,8 +133,7 @@ export const OrgMembersTable = ({
|
|||||||
|
|
||||||
if (isCustomRole && subscription && !subscription?.rbac) {
|
if (isCustomRole && subscription && !subscription?.rbac) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "Your current plan does not include access to assigning custom roles to members. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
"You can assign custom roles to members if you switch to Infisical's Pro plan."
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,8 +104,7 @@ export const OrgRoleTable = () => {
|
|||||||
|
|
||||||
if (isCustomRole && subscription && !subscription?.rbac) {
|
if (isCustomRole && subscription && !subscription?.rbac) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "Your current plan does not include access to set a custom default organization role. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
"You can set the default org role to a custom role if you switch to Infisical's Pro plan."
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -471,7 +470,7 @@ export const OrgRoleTable = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={popUp.upgradePlan?.data?.text}
|
||||||
/>
|
/>
|
||||||
<DuplicateOrgRoleModal
|
<DuplicateOrgRoleModal
|
||||||
isOpen={popUp.duplicateRole.isOpen}
|
isOpen={popUp.duplicateRole.isOpen}
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ export const AppConnectionsSelect = ({ onSelect, projectType }: Props) => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use every App Connection if you switch to Infisical's Enterprise plan."
|
text="All App Connections can be unlocked if you switch to Infisical Enterprise plan."
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ const LogsSectionComponent = ({
|
|||||||
onOpenChange={(isOpen) => {
|
onOpenChange={(isOpen) => {
|
||||||
handlePopUpToggle("upgradePlan", isOpen);
|
handlePopUpToggle("upgradePlan", isOpen);
|
||||||
}}
|
}}
|
||||||
text="You can use audit logs if you switch to Infisical's Pro plan."
|
text="Your current plan does not include access to audit logs. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -167,7 +167,7 @@ const LogsSectionComponent = ({
|
|||||||
onOpenChange={(isOpen) => {
|
onOpenChange={(isOpen) => {
|
||||||
handlePopUpToggle("upgradePlan", isOpen);
|
handlePopUpToggle("upgradePlan", isOpen);
|
||||||
}}
|
}}
|
||||||
text="You can use audit logs if you switch to Infisical's Pro plan."
|
text="Your current plan does not include access to audit logs. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|||||||
import { Link, useNavigate, useParams } from "@tanstack/react-router";
|
import { Link, useNavigate, useParams } from "@tanstack/react-router";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
import { OrgPermissionCan } from "@app/components/permissions";
|
import { OrgPermissionCan } from "@app/components/permissions";
|
||||||
import {
|
import {
|
||||||
@@ -51,8 +50,7 @@ const Page = () => {
|
|||||||
|
|
||||||
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
|
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
|
||||||
"groupCreateUpdate",
|
"groupCreateUpdate",
|
||||||
"deleteGroup",
|
"deleteGroup"
|
||||||
"upgradePlan"
|
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
const onDeleteGroupSubmit = async ({ name, id }: { name: string; id: string }) => {
|
const onDeleteGroupSubmit = async ({ name, id }: { name: string; id: string }) => {
|
||||||
@@ -184,11 +182,6 @@ const Page = () => {
|
|||||||
onDeleteGroupSubmit(popUp?.deleteGroup?.data as { name: string; id: string })
|
onDeleteGroupSubmit(popUp?.deleteGroup?.data as { name: string; id: string })
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<UpgradePlanModal
|
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ const Page = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={`Your current plan does not include access to ${popUp.upgradePlan.data?.featureName}. To unlock this feature, please upgrade to Infisical ${popUp.upgradePlan.data?.isEnterpriseFeature ? "Enterprise" : "Pro"} plan.`}
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
<DeleteActionModal
|
<DeleteActionModal
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ export const Content = ({
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={`Your current plan does not include access to ${popUp.upgradePlan.data?.featureName}. To unlock this feature, please upgrade to Infisical ${popUp.upgradePlan.data?.isEnterpriseFeature ? "Enterprise" : "Pro"} plan.`}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ export const ProjectsPage = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You have exceeded the number of projects allowed on the free plan. You can upgrade to Infisical's Pro plan to add more projects."
|
text="You have reached the maximum number of projects allowed on your current plan. Upgrade to Infisical Pro plan to add more projects."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export const AuditLogStreamsTab = withPermission(
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can add audit log streams if you switch to Infisical's Enterprise plan."
|
text="Your current plan does not include access to audit log streams. To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ export const LogStreamProviderSelect = ({ onSelect }: Props) => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="This audit log stream provider requires an enterprise license."
|
text="Your current plan does not include access to this audit log stream provider. To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ const OrgConfigSection = ({
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="KMIP requires an enterprise plan."
|
text="Your current plan does not include access to KMIP. To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ export const OrgEncryptionTab = withPermission(
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can configure external KMS if you switch to Infisical's Enterprise plan."
|
text="Your current plan does not include access to external KMS. To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
<AddExternalKmsForm
|
<AddExternalKmsForm
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ export const OrgGithubSyncSection = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use GitHub Organization Plan if you switch to Infisical's Enterprise plan."
|
text="Your current plan does not include access to GitHub Organization Sync. To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export const OrgScimSection = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use SCIM Provisioning if you switch to Infisical's Enterprise plan."
|
text="Your current plan does not include access to SCIM Provisioning. To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export const OrgGenericAuthSection = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can enforce user MFA if you switch to Infisical's Pro plan."
|
text="Your current plan does not include access to enforce user MFA. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ export const OrgGeneralAuthSection = ({
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can enforce SAML SSO if you switch to Infisical's Pro plan."
|
text="Your current plan does not include access to enforce SAML SSO. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ export const OrgLDAPSection = (): JSX.Element => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use LDAP authentication if you switch to Infisical's Enterprise plan."
|
text="Your current plan does not include access to LDAP authentication. To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ export const OrgOIDCSection = (): JSX.Element => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use OIDC SSO if you switch to Infisical's Pro plan."
|
text="Your current plan does not include access to OIDC SSO. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ export const OrgSSOSection = (): JSX.Element => {
|
|||||||
const { mutateAsync } = useUpdateSSOConfig();
|
const { mutateAsync } = useUpdateSSOConfig();
|
||||||
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
|
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
|
||||||
"upgradePlan",
|
"upgradePlan",
|
||||||
// "upgradeEnterprisePlan",
|
|
||||||
"addSSO"
|
"addSSO"
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
@@ -39,7 +38,7 @@ export const OrgSSOSection = (): JSX.Element => {
|
|||||||
|
|
||||||
if (!subscription?.samlSSO) {
|
if (!subscription?.samlSSO) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description: "You can use SAML SSO if you switch to Infisical's Pro plan."
|
text: "Your current plan does not include access to SAML SSO. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -69,8 +68,7 @@ export const OrgSSOSection = (): JSX.Element => {
|
|||||||
if (!subscription?.samlSSO || !subscription?.groups) {
|
if (!subscription?.samlSSO || !subscription?.groups) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
isEnterpriseFeature: true,
|
isEnterpriseFeature: true,
|
||||||
description:
|
text: "Your current plan does not include access to SAML group mapping. To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
"You can use SAML group mapping if you switch to Infisical's Enterprise plan."
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -112,7 +110,7 @@ export const OrgSSOSection = (): JSX.Element => {
|
|||||||
handlePopUpOpen("addSSO");
|
handlePopUpOpen("addSSO");
|
||||||
} else {
|
} else {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description: "You can use SAML SSO if you switch to Infisical's Pro plan."
|
text: "Your current plan does not include access to SAML SSO. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -242,7 +240,7 @@ export const OrgSSOSection = (): JSX.Element => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={popUp.upgradePlan.data?.description}
|
text={popUp.upgradePlan.data?.text}
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export const OrgSsoTab = withPermission(
|
|||||||
colorSchema="secondary"
|
colorSchema="secondary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!subscription?.samlSSO) {
|
if (!subscription?.samlSSO) {
|
||||||
handlePopUpOpen("upgradePlan", { feature: "SAML SSO" });
|
handlePopUpOpen("upgradePlan", { featureName: "SAML SSO" });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ export const OrgSsoTab = withPermission(
|
|||||||
colorSchema="secondary"
|
colorSchema="secondary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!subscription?.oidcSSO) {
|
if (!subscription?.oidcSSO) {
|
||||||
handlePopUpOpen("upgradePlan", { feature: "OIDC SSO" });
|
handlePopUpOpen("upgradePlan", { featureName: "OIDC SSO" });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ export const OrgSsoTab = withPermission(
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!subscription?.ldap) {
|
if (!subscription?.ldap) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
feature: "LDAP",
|
featureName: "LDAP",
|
||||||
isEnterpriseFeature: true
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -208,16 +208,8 @@ export const OrgSsoTab = withPermission(
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={`You can use ${
|
text={`Your current plan does not include access to ${popUp.upgradePlan.data?.featureName}. To unlock this feature, please upgrade to Infisical ${popUp.upgradePlan.data?.isEnterpriseFeature ? "Enterprise" : "Pro"} plan.`}
|
||||||
(popUp.upgradePlan.data as { feature: string })?.feature
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
} if you switch to Infisical's ${
|
|
||||||
(popUp.upgradePlan.data as { isEnterpriseFeature: boolean })?.isEnterpriseFeature
|
|
||||||
? "Enterprise"
|
|
||||||
: "Pro"
|
|
||||||
} plan.`}
|
|
||||||
isEnterpriseFeature={
|
|
||||||
(popUp.upgradePlan.data as { isEnterpriseFeature: boolean })?.isEnterpriseFeature
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export const ProjectTemplatesSection = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can create project templates if you switch to Infisical's Enterprise plan."
|
text="Your current plan does not include access to project templates. To unlock this feature, please upgrade to Infisical Enterprise plan."
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ const Page = withPermission(
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={popUp.upgradePlan?.data?.text}
|
||||||
/>
|
/>
|
||||||
<UserOrgMembershipModal
|
<UserOrgMembershipModal
|
||||||
popUp={popUp}
|
popUp={popUp}
|
||||||
|
|||||||
@@ -148,8 +148,7 @@ export const UserOrgMembershipModal = ({ popUp, handlePopUpOpen, handlePopUpTogg
|
|||||||
|
|
||||||
if (isCustomRole && subscription && !subscription?.rbac) {
|
if (isCustomRole && subscription && !subscription?.rbac) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "Your current plan does not include access to assig custom roles to members. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
"You can assign custom roles to members if you switch to Infisical's Pro plan."
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const ResourceTypeSelect = ({ onSelect }: Props) => {
|
|||||||
const handleResourceSelect = (resource: PamResourceType) => {
|
const handleResourceSelect = (resource: PamResourceType) => {
|
||||||
if (!subscription.pam) {
|
if (!subscription.pam) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description: "PAM (Privileged Access Management) requires an enterprise plan.",
|
text: "Your current plan does not include access to Infisical PAM. To unlock this feature, please upgrade to Infisical Enterprise plan.",
|
||||||
isEnterpriseFeature: true
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -68,8 +68,7 @@ export const ResourceTypeSelect = ({ onSelect }: Props) => {
|
|||||||
resource === PamResourceType.Kubernetes
|
resource === PamResourceType.Kubernetes
|
||||||
) {
|
) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "Your current plan does not include access to this resource type. To unlock this feature, please upgrade to Infisical Enterprise plan.",
|
||||||
"This resource type requires a special license add-on to be enabled in your enterprise plan.",
|
|
||||||
isEnterpriseFeature: true
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -180,7 +179,7 @@ export const ResourceTypeSelect = ({ onSelect }: Props) => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={popUp.upgradePlan.data?.description}
|
text={popUp.upgradePlan.data?.text}
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ export const GroupsSection = () => {
|
|||||||
const handleAddGroupModal = () => {
|
const handleAddGroupModal = () => {
|
||||||
if (!subscription?.groups) {
|
if (!subscription?.groups) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "Managing groups can be unlocked if you upgrade to Infisical Enterprise plan.",
|
||||||
"You can manage users more efficiently with groups if you switch to Infisical's Enterprise plan.",
|
|
||||||
isEnterpriseFeature: true
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -104,10 +103,8 @@ export const GroupsSection = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={popUp.upgradePlan?.data?.text}
|
||||||
isEnterpriseFeature={
|
isEnterpriseFeature={popUp.upgradePlan?.data?.isEnterpriseFeature}
|
||||||
(popUp.upgradePlan?.data as { isEnterpriseFeature: boolean })?.isEnterpriseFeature
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||||
import { Button, DeleteActionModal } from "@app/components/v2";
|
import { Button, DeleteActionModal } from "@app/components/v2";
|
||||||
@@ -26,8 +25,7 @@ export const MembersSection = () => {
|
|||||||
|
|
||||||
const { handlePopUpToggle, popUp, handlePopUpOpen, handlePopUpClose } = usePopUp([
|
const { handlePopUpToggle, popUp, handlePopUpOpen, handlePopUpClose } = usePopUp([
|
||||||
"addMember",
|
"addMember",
|
||||||
"removeMember",
|
"removeMember"
|
||||||
"upgradePlan"
|
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
const handleRemoveUser = async () => {
|
const handleRemoveUser = async () => {
|
||||||
@@ -85,11 +83,6 @@ export const MembersSection = () => {
|
|||||||
onChange={(isOpen) => handlePopUpToggle("removeMember", isOpen)}
|
onChange={(isOpen) => handlePopUpToggle("removeMember", isOpen)}
|
||||||
onDeleteApproved={handleRemoveUser}
|
onDeleteApproved={handleRemoveUser}
|
||||||
/>
|
/>
|
||||||
<UpgradePlanModal
|
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -60,10 +60,7 @@ import { UsePopUpState } from "@app/hooks/usePopUp";
|
|||||||
const MAX_ROLES_TO_BE_SHOWN_IN_TABLE = 2;
|
const MAX_ROLES_TO_BE_SHOWN_IN_TABLE = 2;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (
|
handlePopUpOpen: (popUpName: keyof UsePopUpState<["removeMember"]>, data?: object) => void;
|
||||||
popUpName: keyof UsePopUpState<["removeMember", "upgradePlan"]>,
|
|
||||||
data?: object
|
|
||||||
) => void;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MembersOrderBy {
|
enum MembersOrderBy {
|
||||||
|
|||||||
@@ -190,8 +190,7 @@ export const Page = () => {
|
|||||||
isMembershipDetailsLoading={isMembershipDetailsLoading}
|
isMembershipDetailsLoading={isMembershipDetailsLoading}
|
||||||
onOpenUpgradeModal={() =>
|
onOpenUpgradeModal={() =>
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "Assigning custom roles to members can be unlocked if you upgrade to Infisical Pro plan."
|
||||||
"You can assign custom roles to members if you switch to Infisical's Pro plan."
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@@ -215,7 +214,7 @@ export const Page = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={popUp.upgradePlan?.data?.text}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -42,8 +42,7 @@ export const AuditLogsRetentionSection = () => {
|
|||||||
try {
|
try {
|
||||||
if (!subscription?.auditLogs) {
|
if (!subscription?.auditLogs) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "Configuring audit logs retention can be unlocked if you upgrade to Infisical Pro plan."
|
||||||
"You can only configure audit logs retention if you switch to Infisical's Pro plan."
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -51,8 +50,7 @@ export const AuditLogsRetentionSection = () => {
|
|||||||
|
|
||||||
if (subscription && auditLogsRetentionDays > subscription?.auditLogsRetentionDays) {
|
if (subscription && auditLogsRetentionDays > subscription?.auditLogsRetentionDays) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "Updating audit logs retention period to a higher value can be unlocked if you upgrade to Infisical Pro plan."
|
||||||
"To update your audit logs retention period to a higher value, switch to Infisical's Pro plan."
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -123,7 +121,7 @@ export const AuditLogsRetentionSection = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={popUp.upgradePlan?.data?.text}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export const IPAllowlistSection = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use IP allowlisting if you switch to Infisical's Pro plan."
|
text="Your current plan does not include access to IP allowlisting. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ export const IPAllowlistTable = ({ popUp, handlePopUpOpen, handlePopUpToggle }:
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use IP allowlisting if you switch to Infisical's Pro plan."
|
text="Your current plan does not include access to IP allowlisting. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1180,8 +1180,7 @@ export const OverviewPage = () => {
|
|||||||
}
|
}
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
isEnterpriseFeature: true,
|
isEnterpriseFeature: true,
|
||||||
description:
|
text: "Adding dynamic secrets can be unlocked if you upgrade to Infisical Enterprise plan."
|
||||||
"You can add dynamic secrets if you switch to Infisical's Enterprise plan."
|
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
isDisabled={userAvailableDynamicSecretEnvs.length === 0}
|
isDisabled={userAvailableDynamicSecretEnvs.length === 0}
|
||||||
@@ -1206,8 +1205,7 @@ export const OverviewPage = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "Adding secret rotations can be unlocked if you upgrade to Infisical Pro plan."
|
||||||
"You can add secret rotations if you switch to Infisical's Pro plan."
|
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
isDisabled={userAvailableSecretRotationEnvs.length === 0}
|
isDisabled={userAvailableSecretRotationEnvs.length === 0}
|
||||||
@@ -1693,7 +1691,7 @@ export const OverviewPage = () => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
text={popUp.upgradePlan.data?.description}
|
text={popUp.upgradePlan.data?.text}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<CreateSecretRotationV2Modal
|
<CreateSecretRotationV2Modal
|
||||||
|
|||||||
@@ -312,8 +312,7 @@ export const AccessApprovalRequest = ({
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (subscription && !subscription?.secretApproval) {
|
if (subscription && !subscription?.secretApproval) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "Access requests feature can be unlocked if you upgrade to Infisical Pro plan."
|
||||||
"You can use request access feature if you switch to Infisical's Pro plan."
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -573,7 +572,7 @@ export const AccessApprovalRequest = ({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
text={popUp.upgradePlan.data?.description}
|
text={popUp.upgradePlan.data?.text}
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={() => handlePopUpClose("upgradePlan")}
|
onOpenChange={() => handlePopUpClose("upgradePlan")}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -491,7 +491,7 @@ export const ApprovalPolicyList = ({ projectId }: IProps) => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can add secret approval policy if you switch to Infisical's Pro plan."
|
text="Adding secret approval policies can be unlocked if you upgrade to Infisical Pro plan."
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -912,7 +912,7 @@ export const ActionBar = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
feature: "PIT Recovery"
|
featureName: "PIT Recovery"
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faCodeCommit} />}
|
leftIcon={<FontAwesomeIcon icon={faCodeCommit} />}
|
||||||
@@ -1028,7 +1028,7 @@ export const ActionBar = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
feature: "Dynamic Secrets",
|
featureName: "Dynamic Secrets",
|
||||||
isEnterpriseFeature: true
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
@@ -1058,7 +1058,7 @@ export const ActionBar = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
feature: "Secret Rotation"
|
featureName: "Secret Rotation"
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
@@ -1235,7 +1235,7 @@ export const ActionBar = ({
|
|||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
onUpgradePlan={() =>
|
onUpgradePlan={() =>
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
feature: "Secret Imports"
|
featureName: "Secret Imports"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
isOpen={popUp.addSecretImport.isOpen}
|
isOpen={popUp.addSecretImport.isOpen}
|
||||||
@@ -1300,7 +1300,7 @@ export const ActionBar = ({
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
text={`You can use ${popUp.upgradePlan.data?.feature} if you switch to Infisical's ${popUp.upgradePlan.data?.isEnterpriseFeature ? "Enterprise" : "Pro"} plan.`}
|
text={`Your current plan does not include access to ${popUp.upgradePlan.data?.featureName}. To unlock this feature, please upgrade to Infisical ${popUp.upgradePlan.data?.isEnterpriseFeature ? "Enterprise" : "Pro"} plan.`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Modal
|
<Modal
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ export const EnvironmentTabs = ({ secretPath }: Props) => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can add custom environments if you switch to Infisical's Pro plan."
|
text="Your current plan does not include access to adding custom environments. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||||
/>
|
/>
|
||||||
<AddEnvironmentModal
|
<AddEnvironmentModal
|
||||||
isOpen={popUp.createEnvironment.isOpen}
|
isOpen={popUp.createEnvironment.isOpen}
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ export const SecretDetailSidebar = ({
|
|||||||
onOpenChange={(isUpgradeModalOpen) =>
|
onOpenChange={(isUpgradeModalOpen) =>
|
||||||
handlePopUpToggle("secretAccessUpgradePlan", isUpgradeModalOpen)
|
handlePopUpToggle("secretAccessUpgradePlan", isUpgradeModalOpen)
|
||||||
}
|
}
|
||||||
text="You can access secret access analysis if you switch to Infisical's Pro plan."
|
text="Secret access analysis feature can be unlocked if you upgrade to Infisical Pro plan."
|
||||||
/>
|
/>
|
||||||
<Modal
|
<Modal
|
||||||
isOpen={popUp.secretReferenceTree.isOpen}
|
isOpen={popUp.secretReferenceTree.isOpen}
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ const Page = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can add secret rotation if you switch to Infisical's Pro plan."
|
text="Adding secret rotations can be unlocked if you upgrade to Infisical Pro plan."
|
||||||
/>
|
/>
|
||||||
<Modal
|
<Modal
|
||||||
isOpen={popUp.secretRotationV2.isOpen}
|
isOpen={popUp.secretRotationV2.isOpen}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ export const EnvironmentSection = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can add custom environments if you switch to Infisical's Pro plan."
|
text="You have reached the maximum number of environments allowed on the free plan. Upgrade to Infisical Pro plan to add more environments."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export const SecretScanningDataSourcesSection = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can create Data Sources by upgrading to Infisical's Enterprise plan."
|
text="Creating data sources can be unlocked if you upgrade to Infisical Enterprise plan."
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ export const SshCaSection = () => {
|
|||||||
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
|
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
|
||||||
"sshCa",
|
"sshCa",
|
||||||
"deleteSshCa",
|
"deleteSshCa",
|
||||||
"sshCaStatus", // enable / disable
|
"sshCaStatus" // enable / disable
|
||||||
"upgradePlan"
|
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
const onRemoveSshCaSubmit = async (caId: string) => {
|
const onRemoveSshCaSubmit = async (caId: string) => {
|
||||||
@@ -110,11 +109,6 @@ export const SshCaSection = () => {
|
|||||||
onUpdateSshCaStatus(popUp?.sshCaStatus?.data as { caId: string; status: SshCaStatus })
|
onUpdateSshCaStatus(popUp?.sshCaStatus?.data as { caId: string; status: SshCaStatus })
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{/* <UpgradePlanModal
|
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
|
||||||
/> */}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,8 +29,7 @@ export const SshHostGroupHostsSection = ({ sshHostGroupId }: Props) => {
|
|||||||
const handleAddSshHostModal = () => {
|
const handleAddSshHostModal = () => {
|
||||||
if (!subscription?.sshHostGroups) {
|
if (!subscription?.sshHostGroups) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "Managing SSH host groups can be unlocked if you upgrade to Infisical Enterprise plan.",
|
||||||
"You can manage hosts more efficiently with SSH host groups if you upgrade your Infisical plan to an Enterprise license.",
|
|
||||||
isEnterpriseFeature: true
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -107,10 +106,8 @@ export const SshHostGroupHostsSection = ({ sshHostGroupId }: Props) => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={popUp.upgradePlan?.data?.text}
|
||||||
isEnterpriseFeature={
|
isEnterpriseFeature={popUp.upgradePlan?.data?.isEnterpriseFeature}
|
||||||
(popUp.upgradePlan?.data as { isEnterpriseFeature: boolean })?.isEnterpriseFeature
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -25,8 +25,7 @@ export const SshHostGroupsSection = () => {
|
|||||||
const handleAddSshHostGroupModal = () => {
|
const handleAddSshHostGroupModal = () => {
|
||||||
if (!subscription?.sshHostGroups) {
|
if (!subscription?.sshHostGroups) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
text: "Managing SSH host groups can be unlocked if you upgrade to Infisical Enterprise plan.",
|
||||||
"You can manage hosts more efficiently with SSH host groups if you upgrade your Infisical plan to an Enterprise license.",
|
|
||||||
isEnterpriseFeature: true
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -106,10 +105,8 @@ export const SshHostGroupsSection = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={popUp.upgradePlan?.data?.text}
|
||||||
isEnterpriseFeature={
|
isEnterpriseFeature={popUp.upgradePlan?.data?.isEnterpriseFeature}
|
||||||
(popUp.upgradePlan?.data as { isEnterpriseFeature: boolean })?.isEnterpriseFeature
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user