Merge branch 'main' into fix/remove-duplicate-error-notifications

This commit is contained in:
Victor Santos
2025-11-03 18:41:54 -03:00
283 changed files with 6603 additions and 1582 deletions
@@ -33,8 +33,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: "Managing groups can be unlocked if you upgrade to Infisical Enterprise plan.",
isEnterpriseFeature: true
});
} else {
@@ -93,10 +92,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,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";
@@ -26,8 +25,7 @@ export const MembersSection = () => {
const { handlePopUpToggle, popUp, handlePopUpOpen, handlePopUpClose } = usePopUp([
"addMember",
"removeMember",
"upgradePlan"
"removeMember"
] as const);
const handleRemoveUser = async () => {
@@ -77,11 +75,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>
);
};
@@ -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 {
@@ -182,8 +182,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: "Assigning custom roles to members can be unlocked if you upgrade to Infisical Pro plan."
})
}
/>
@@ -207,7 +206,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}
/>
</>
) : (
@@ -41,8 +41,7 @@ export const AuditLogsRetentionSection = () => {
const handleAuditLogsRetentionSubmit = async ({ auditLogsRetentionDays }: TForm) => {
if (!subscription?.auditLogs) {
handlePopUpOpen("upgradePlan", {
description:
"You can only configure audit logs retention if you switch to Infisical's Pro plan."
text: "Configuring audit logs retention can be unlocked if you upgrade to Infisical Pro plan."
});
return;
@@ -50,8 +49,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: "Updating audit logs retention period to a higher value can be unlocked if you upgrade to Infisical Pro plan."
});
return;
@@ -116,7 +114,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}
/>
</>
);