mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-21 03:50:10 +00:00
fix: upgrade plan modal text
This commit is contained in:
+3
-6
@@ -32,8 +32,7 @@ export const GroupsSection = () => {
|
||||
const handleAddGroupModal = () => {
|
||||
if (!subscription?.groups) {
|
||||
handlePopUpOpen("upgradePlan", {
|
||||
description:
|
||||
"You can manage users more efficiently with groups if you switch to Infisical's Enterprise plan.",
|
||||
text: "Your current plan does not provide access to managing groups. To unlock this feature, please upgrade to Infisical Enterprise plan.",
|
||||
isEnterpriseFeature: true
|
||||
});
|
||||
} else {
|
||||
@@ -100,10 +99,8 @@ export const GroupsSection = () => {
|
||||
<UpgradePlanModal
|
||||
isOpen={popUp.upgradePlan.isOpen}
|
||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
||||
isEnterpriseFeature={
|
||||
(popUp.upgradePlan?.data as { isEnterpriseFeature: boolean })?.isEnterpriseFeature
|
||||
}
|
||||
text={popUp.upgradePlan?.data?.text}
|
||||
isEnterpriseFeature={popUp.upgradePlan?.data?.isEnterpriseFeature}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
+1
-8
@@ -1,7 +1,6 @@
|
||||
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
|
||||
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
||||
import { createNotification } from "@app/components/notifications";
|
||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||
import { Button, DeleteActionModal } from "@app/components/v2";
|
||||
@@ -25,8 +24,7 @@ export const MembersSection = () => {
|
||||
|
||||
const { handlePopUpToggle, popUp, handlePopUpOpen, handlePopUpClose } = usePopUp([
|
||||
"addMember",
|
||||
"removeMember",
|
||||
"upgradePlan"
|
||||
"removeMember"
|
||||
] as const);
|
||||
|
||||
const handleRemoveUser = async () => {
|
||||
@@ -81,11 +79,6 @@ export const MembersSection = () => {
|
||||
onChange={(isOpen) => handlePopUpToggle("removeMember", isOpen)}
|
||||
onDeleteApproved={handleRemoveUser}
|
||||
/>
|
||||
<UpgradePlanModal
|
||||
isOpen={popUp.upgradePlan.isOpen}
|
||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
+1
-4
@@ -60,10 +60,7 @@ import { UsePopUpState } from "@app/hooks/usePopUp";
|
||||
const MAX_ROLES_TO_BE_SHOWN_IN_TABLE = 2;
|
||||
|
||||
type Props = {
|
||||
handlePopUpOpen: (
|
||||
popUpName: keyof UsePopUpState<["removeMember", "upgradePlan"]>,
|
||||
data?: object
|
||||
) => void;
|
||||
handlePopUpOpen: (popUpName: keyof UsePopUpState<["removeMember"]>, data?: object) => void;
|
||||
};
|
||||
|
||||
enum MembersOrderBy {
|
||||
|
||||
@@ -190,8 +190,7 @@ export const Page = () => {
|
||||
isMembershipDetailsLoading={isMembershipDetailsLoading}
|
||||
onOpenUpgradeModal={() =>
|
||||
handlePopUpOpen("upgradePlan", {
|
||||
description:
|
||||
"You can assign custom roles to members if you switch to Infisical's Pro plan."
|
||||
text: "Your current plan does not provide access to assigning custom roles to members. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||
})
|
||||
}
|
||||
/>
|
||||
@@ -215,7 +214,7 @@ export const Page = () => {
|
||||
<UpgradePlanModal
|
||||
isOpen={popUp.upgradePlan.isOpen}
|
||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
||||
text={popUp.upgradePlan?.data?.text}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
|
||||
+3
-5
@@ -42,8 +42,7 @@ export const AuditLogsRetentionSection = () => {
|
||||
try {
|
||||
if (!subscription?.auditLogs) {
|
||||
handlePopUpOpen("upgradePlan", {
|
||||
description:
|
||||
"You can only configure audit logs retention if you switch to Infisical's Pro plan."
|
||||
text: "Your current plan does not provide access to configuring audit logs retention. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||
});
|
||||
|
||||
return;
|
||||
@@ -51,8 +50,7 @@ export const AuditLogsRetentionSection = () => {
|
||||
|
||||
if (subscription && auditLogsRetentionDays > subscription?.auditLogsRetentionDays) {
|
||||
handlePopUpOpen("upgradePlan", {
|
||||
description:
|
||||
"To update your audit logs retention period to a higher value, switch to Infisical's Pro plan."
|
||||
text: "Your current plan does not provide access to updating audit logs retention period to a higher value. To unlock this feature, please upgrade to Infisical Pro plan."
|
||||
});
|
||||
|
||||
return;
|
||||
@@ -123,7 +121,7 @@ export const AuditLogsRetentionSection = () => {
|
||||
<UpgradePlanModal
|
||||
isOpen={popUp.upgradePlan.isOpen}
|
||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
||||
text={popUp.upgradePlan?.data?.text}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user