Skip to content

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

Merge branch 'main' into feature/secret-reference-shortcut

Victor Santos7c4e3bf69829
diff --cc frontend/src/components/v2/SecretInput/SecretInput.tsx
index 1745a84ec2,27f0617ed7..f1d86335a6
--- a/frontend/src/components/v2/SecretInput/SecretInput.tsx
+++ b/frontend/src/components/v2/SecretInput/SecretInput.tsx
@@@ -13,10 -13,7 +13,11 @@@ const syntaxHighlight =
isImport?: boolean,
isLoadingValue?: boolean,
isErrorLoadingValue?: boolean,
+ onHoverPart?: (part: string) => void,
+ hoveredPart?: string,
+ isCmdOrCtrlPressed?: boolean,
- onClickSegment?: (segment: string, allSegments: string[]) => void
++ onClickSegment?: (segment: string, allSegments: string[]) => void,
+ placeholder?: string
) => {
if (isLoadingValue) return HIDDEN_SECRET_VALUE;
if (isErrorLoadingValue)
@@@ -131,7 -81,7 +133,8 @@@ export const SecretInput = forwardRef<H
canEditButNotView,
isLoadingValue,
isErrorLoadingValue,
+ onClickSegment,
+ placeholder,
...props
},
ref
@@@ -174,21 -94,21 +177,27 @@@
style={{ maxHeight: `${21 * 7}px` }}
>
<div className="relative overflow-hidden">
- <pre aria-hidden className="m-0">
+ <pre aria-hidden className="pointer-events-none relative z-10 m-0">
<code className={`inline-block w-full ${commonClassName}`}>
- <span style={{ whiteSpace: "break-spaces" }}>
+ <span
+ className={twMerge(
+ "whitespace-break-spaces",
+ placeholder && !value && "text-gray-500/50"
+ )}
+ >
{syntaxHighlight(
value,
isVisible || (isSecretFocused && !valueAlwaysHidden),
isImport,
isLoadingValue,
isErrorLoadingValue,
+ (part) => {
+ setHoveredPart(part);
+ },
+ hoveredPart,
+ isCmdOrCtrlPressed,
- onClickSegment
++ onClickSegment,
+ placeholder
)}
</span>
</code>