Merge pull request #2376 from Infisical/daniel/info-notif-for-secret-changes

fix(ui): show info notification when secret change is pending review
This commit is contained in:
Daniel Hougaard
2024-09-04 20:09:58 +04:00
committed by GitHub
2 changed files with 4 additions and 3 deletions
@@ -61,8 +61,9 @@ export const CreateSecretForm = ({
}); });
closePopUp(PopUpNames.CreateSecretForm); closePopUp(PopUpNames.CreateSecretForm);
reset(); reset();
createNotification({ createNotification({
type: "success", type: isProtectedBranch ? "info" : "success",
text: isProtectedBranch text: isProtectedBranch
? "Requested changes have been sent for review" ? "Requested changes have been sent for review"
: "Successfully created secret" : "Successfully created secret"
@@ -270,7 +270,7 @@ export const SecretListView = ({
queryClient.invalidateQueries(secretApprovalRequestKeys.count({ workspaceId })); queryClient.invalidateQueries(secretApprovalRequestKeys.count({ workspaceId }));
handlePopUpClose("secretDetail"); handlePopUpClose("secretDetail");
createNotification({ createNotification({
type: "success", type: isProtectedBranch ? "info" : "success",
text: isProtectedBranch text: isProtectedBranch
? "Requested changes have been sent for review" ? "Requested changes have been sent for review"
: "Successfully saved secrets" : "Successfully saved secrets"
@@ -304,7 +304,7 @@ export const SecretListView = ({
handlePopUpClose("deleteSecret"); handlePopUpClose("deleteSecret");
handlePopUpClose("secretDetail"); handlePopUpClose("secretDetail");
createNotification({ createNotification({
type: "success", type: isProtectedBranch ? "info" : "success",
text: isProtectedBranch text: isProtectedBranch
? "Requested changes have been sent for review" ? "Requested changes have been sent for review"
: "Successfully deleted secret" : "Successfully deleted secret"