mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
refactor: remove console logs and enhance tooltip information in CreateSecretForm
This commit is contained in:
@@ -344,11 +344,6 @@ export const InfisicalSecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
||||
}
|
||||
);
|
||||
|
||||
console.log("canReadSecretValue", canReadSecretValue);
|
||||
console.log("propEnvironment", propEnvironment);
|
||||
console.log("propSecretPath", propSecretPath);
|
||||
console.log("segment", segment);
|
||||
|
||||
if (!canReadSecretValue) {
|
||||
createNotification({
|
||||
text: "You do not have permission to access this secret",
|
||||
@@ -405,11 +400,6 @@ export const InfisicalSecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
||||
}
|
||||
);
|
||||
|
||||
console.log("canReadSecretValue", canReadSecretValue);
|
||||
console.log("environmentSlug", environmentSlug);
|
||||
console.log("secretPath", secretPath);
|
||||
console.log("secretName", secretName);
|
||||
|
||||
if (!canReadSecretValue) {
|
||||
createNotification({
|
||||
text: "You do not have permission to access this secret",
|
||||
@@ -432,7 +422,7 @@ export const InfisicalSecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
||||
})
|
||||
});
|
||||
},
|
||||
[navigate, projectId]
|
||||
[navigate, projectId, permission, propEnvironment, propSecretPath]
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@@ -153,12 +153,18 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
||||
}
|
||||
};
|
||||
|
||||
const handleBlur = () => {
|
||||
setIsCmdOrCtrlPressed(false);
|
||||
};
|
||||
|
||||
window.addEventListener("keydown", handleKeyDown);
|
||||
window.addEventListener("keyup", handleKeyUp);
|
||||
window.addEventListener("blur", handleBlur);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("keydown", handleKeyDown);
|
||||
window.removeEventListener("keyup", handleKeyUp);
|
||||
window.removeEventListener("blur", handleBlur);
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user