diff --git a/frontend/src/components/v2/SecretInput/SecretInput.tsx b/frontend/src/components/v2/SecretInput/SecretInput.tsx index 73d40026a..8380eb4a1 100644 --- a/frontend/src/components/v2/SecretInput/SecretInput.tsx +++ b/frontend/src/components/v2/SecretInput/SecretInput.tsx @@ -26,7 +26,8 @@ const replaceContentWithDot = (str: string) => { }; const syntaxHighlight = (orgContent?: string | null, isVisible?: boolean) => { - if (!orgContent) return ""; + if (orgContent === "") return "EMPTY"; + if (!orgContent) return "missing"; if (!isVisible) return replaceContentWithDot(orgContent); const content = stripSpanTags(orgContent); const newContent = content.replace( @@ -69,7 +70,7 @@ export const SecretInput = ({ dangerouslySetInnerHTML={{ __html: syntaxHighlight(value, isVisible || isSecretFocused) }} - className="absolute top-0 left-0 z-0 h-full w-full text-ellipsis whitespace-pre-line break-all" + className={`absolute top-0 left-0 z-0 h-full w-full text-ellipsis whitespace-pre-line break-all ${!value && value !== "" && "text-red-600 italic"}`} /> ( - + {env || "-"} {secretPath && (
- + {secretPath}
)} @@ -66,7 +66,7 @@ export const SecretImportItem = ({ onClick={() => setIsExpanded.toggle()} > - + {
- + diff --git a/frontend/src/views/SecretOverviewPage/components/FolderBreadCrumbs/FolderBreadCrumbs.tsx b/frontend/src/views/SecretOverviewPage/components/FolderBreadCrumbs/FolderBreadCrumbs.tsx index 7f55681b9..05ec048a5 100644 --- a/frontend/src/views/SecretOverviewPage/components/FolderBreadCrumbs/FolderBreadCrumbs.tsx +++ b/frontend/src/views/SecretOverviewPage/components/FolderBreadCrumbs/FolderBreadCrumbs.tsx @@ -33,7 +33,7 @@ export const FolderBreadCrumbs = ({ secretPath = "/", onResetSearch }: Props) => role="button" tabIndex={0} > - + {(secretPath || "") .split("/") diff --git a/frontend/src/views/SecretOverviewPage/components/SecretOverviewTableRow/SecretEditRow.tsx b/frontend/src/views/SecretOverviewPage/components/SecretOverviewTableRow/SecretEditRow.tsx index 859eda957..803504778 100644 --- a/frontend/src/views/SecretOverviewPage/components/SecretOverviewTableRow/SecretEditRow.tsx +++ b/frontend/src/views/SecretOverviewPage/components/SecretOverviewTableRow/SecretEditRow.tsx @@ -63,7 +63,7 @@ export const SecretEditRow = ({ }; const handleFormSubmit = async ({ value }: { value?: string | null }) => { - if (value && secretName) { + if ((value || value === "") && secretName) { if (isCreatable) { await onSecretCreate(environment, secretName, value); } else { diff --git a/frontend/src/views/SecretOverviewPage/components/SecretOverviewTableRow/SecretOverviewTableRow.tsx b/frontend/src/views/SecretOverviewPage/components/SecretOverviewTableRow/SecretOverviewTableRow.tsx index 715bba221..52f5f1d78 100644 --- a/frontend/src/views/SecretOverviewPage/components/SecretOverviewTableRow/SecretOverviewTableRow.tsx +++ b/frontend/src/views/SecretOverviewPage/components/SecretOverviewTableRow/SecretOverviewTableRow.tsx @@ -1,9 +1,9 @@ import { faCircle } from "@fortawesome/free-regular-svg-icons"; -import { faCheck, faEye, faEyeSlash, faKey, faXmark } from "@fortawesome/free-solid-svg-icons"; +import { faAngleDown, faCheck, faEye, faEyeSlash, faKey, faXmark } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { twMerge } from "tailwind-merge"; -import { Button, TableContainer, Td, Tr } from "@app/components/v2"; +import { Button, TableContainer, Td, Tooltip, Tr } from "@app/components/v2"; import { useToggle } from "@app/hooks"; import { DecryptedSecret } from "@app/hooks/api/secrets/types"; @@ -35,12 +35,14 @@ export const SecretOverviewTableRow = ({ return ( <> setIsFormExpanded.toggle()} className="group"> - {environments.map(({ slug }, i) => { @@ -51,15 +53,20 @@ export const SecretOverviewTableRow = ({ ); @@ -67,14 +74,14 @@ export const SecretOverviewTableRow = ({ {isFormExpanded && ( -
-
-
- +
+
+
+
+ +
+
{secretKey}
-
{secretKey}
-
- {!isSecretEmpty && } - {isSecretEmpty && } +
+
+ {!isSecretEmpty && } + {isSecretEmpty && + + } +
+