Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

improvement: fix tooltip display when pending changes

Scott Wilsonc4e7ee85853e
diff --git a/frontend/src/components/secrets/SecretReferenceDetails/ResolvedSecretValuePopover.tsx b/frontend/src/components/secrets/SecretReferenceDetails/ResolvedSecretValuePopover.tsx
index ed1596093e..12f594b59b 100644
--- a/frontend/src/components/secrets/SecretReferenceDetails/ResolvedSecretValuePopover.tsx
+++ b/frontend/src/components/secrets/SecretReferenceDetails/ResolvedSecretValuePopover.tsx
@@ -1,5 +1,6 @@
import { AxiosError } from "axios";
import { ClipboardCheckIcon, CopyIcon, LinkIcon } from "lucide-react";
+import { twMerge } from "tailwind-merge";
import {
IconButton,
@@ -121,10 +122,16 @@ export const ResolvedSecretValuePopover = ({
<IconButton
variant="ghost-muted"
size="xs"
- className="absolute -top-1 -left-1"
+ className={twMerge(
+ "absolute -top-1 -left-1",
+ isDisabled && "cursor-not-allowed opacity-50"
+ )}
aria-label="View resolved secret value"
- isDisabled={isDisabled}
- onClick={(e) => e.stopPropagation()}
+ aria-disabled={isDisabled}
+ onClick={(e) => {
+ e.stopPropagation();
+ if (isDisabled) e.preventDefault();
+ }}
onMouseDown={(e) => e.preventDefault()}
>
<LinkIcon />