fix(secrets-permissions): Fix setTimeout and eye icon size

This commit is contained in:
carlosmonastyrski
2025-04-25 08:54:25 -03:00
parent b377d2a6b1
commit 3de5fa066b
2 changed files with 3 additions and 4 deletions
@@ -126,10 +126,9 @@ export const SecretEditRow = ({
} }
} }
if (secretValueHidden) { if (secretValueHidden) {
const resetTimeout = setTimeout(() => { setTimeout(() => {
reset({ value: defaultValue || null }); reset({ value: defaultValue || null });
}, 50); }, 50);
clearTimeout(resetTimeout);
setIsSecretBlurFocus.off(); setIsSecretBlurFocus.off();
} else { } else {
reset({ value }); reset({ value });
@@ -182,7 +181,7 @@ export const SecretEditRow = ({
<Tooltip <Tooltip
content={`You do not have access to view the current value${canEditSecretValue ? ", but you can set a new one" : "."}`} content={`You do not have access to view the current value${canEditSecretValue ? ", but you can set a new one" : "."}`}
> >
<FontAwesomeIcon className="pl-1" icon={faEyeSlash} /> <FontAwesomeIcon className="pl-2" size="sm" icon={faEyeSlash} />
</Tooltip> </Tooltip>
)} )}
<div className="flex-grow border-r border-r-mineshaft-600 pl-1 pr-2"> <div className="flex-grow border-r border-r-mineshaft-600 pl-1 pr-2">
@@ -316,7 +316,7 @@ export const SecretItem = memo(
<Tooltip <Tooltip
content={`You do not have access to view the current value${canEditSecretValue ? ", but you can set a new one" : "."}`} content={`You do not have access to view the current value${canEditSecretValue ? ", but you can set a new one" : "."}`}
> >
<FontAwesomeIcon className="pr-2" icon={faEyeSlash} /> <FontAwesomeIcon className="pr-2" size="sm" icon={faEyeSlash} />
</Tooltip> </Tooltip>
)} )}
{isOverriden ? ( {isOverriden ? (