mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 02:26:40 +00:00
Show copy button again
This commit is contained in:
+11
@@ -14,6 +14,8 @@ import { useRevealAcmeEabSecret } from "@app/hooks/api/certificateProfiles/queri
|
|||||||
import { faCheck, faCopy } from "@fortawesome/free-solid-svg-icons";
|
import { faCheck, faCopy } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
|
const RESET_COPIED_DELAY = 1 * 1000;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
@@ -67,6 +69,9 @@ export const RevealAcmeEabSecretModal = ({ isOpen, onClose, profile }: Props) =>
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigator.clipboard.writeText(directoryUrl);
|
navigator.clipboard.writeText(directoryUrl);
|
||||||
setIsAcmeDirectoryUrlCopied.on();
|
setIsAcmeDirectoryUrlCopied.on();
|
||||||
|
setTimeout(() => {
|
||||||
|
setIsAcmeDirectoryUrlCopied.off();
|
||||||
|
}, RESET_COPIED_DELAY);
|
||||||
}}
|
}}
|
||||||
className="w-10"
|
className="w-10"
|
||||||
>
|
>
|
||||||
@@ -88,6 +93,9 @@ export const RevealAcmeEabSecretModal = ({ isOpen, onClose, profile }: Props) =>
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigator.clipboard.writeText(eabKid);
|
navigator.clipboard.writeText(eabKid);
|
||||||
setIsEabKidCopied.on();
|
setIsEabKidCopied.on();
|
||||||
|
setTimeout(() => {
|
||||||
|
setIsEabKidCopied.off();
|
||||||
|
}, RESET_COPIED_DELAY);
|
||||||
}}
|
}}
|
||||||
className="w-10"
|
className="w-10"
|
||||||
>
|
>
|
||||||
@@ -109,6 +117,9 @@ export const RevealAcmeEabSecretModal = ({ isOpen, onClose, profile }: Props) =>
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigator.clipboard.writeText(eabSecret);
|
navigator.clipboard.writeText(eabSecret);
|
||||||
setIsEabSecretCopied.on();
|
setIsEabSecretCopied.on();
|
||||||
|
setTimeout(() => {
|
||||||
|
setIsEabSecretCopied.off();
|
||||||
|
}, RESET_COPIED_DELAY);
|
||||||
}}
|
}}
|
||||||
className="w-10"
|
className="w-10"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user