diff --git a/frontend/src/components/v2/Button/Button.tsx b/frontend/src/components/v2/Button/Button.tsx index b69545766..7c2a5fd6d 100644 --- a/frontend/src/components/v2/Button/Button.tsx +++ b/frontend/src/components/v2/Button/Button.tsx @@ -51,10 +51,10 @@ const buttonVariants = cva( false: "" }, size: { - xs: ["text-xs", "py-1", "px-1"], - sm: ["text-sm", "py-2", "px-2"], - md: ["text-md", "py-2", "px-4"], - lg: ["text-lg", "py-2", "px-8"] + xs: ["text-xs", "py-1", "px-2"], + sm: ["text-sm", "py-2", "px-4"], + md: ["text-md", "py-2", "px-5"], + lg: ["text-lg", "py-2", "px-6"] } }, compoundVariants: [ @@ -186,16 +186,17 @@ export const Button = forwardRef( className="absolute rounded-xl opacity-80" /> )} -
- {leftIcon} -
+ {leftIcon && ( +
+ {leftIcon} +
+ )} ( > {children} -
- {rightIcon} -
+ {rightIcon && ( +
+ {rightIcon} +
+ )} ); } diff --git a/frontend/src/views/DashboardPage/components/SecretDropzone/SecretDropzone.tsx b/frontend/src/views/DashboardPage/components/SecretDropzone/SecretDropzone.tsx index cac722368..699edea84 100644 --- a/frontend/src/views/DashboardPage/components/SecretDropzone/SecretDropzone.tsx +++ b/frontend/src/views/DashboardPage/components/SecretDropzone/SecretDropzone.tsx @@ -1,7 +1,8 @@ import { ChangeEvent, DragEvent, useEffect, useState } from "react"; import { Controller, useForm } from "react-hook-form"; import { useTranslation } from "react-i18next"; -import { faClone, faSearch, faUpload } from "@fortawesome/free-solid-svg-icons"; +import { faSquareCheck } from "@fortawesome/free-regular-svg-icons"; +import { faClone, faSearch, faSquareXmark, faUpload } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { yupResolver } from "@hookform/resolvers/yup"; import { twMerge } from "tailwind-merge"; @@ -14,13 +15,15 @@ import { Button, Checkbox, FormControl, + IconButton, Input, Modal, ModalContent, ModalTrigger, Select, SelectItem, - Skeleton + Skeleton, + Tooltip } from "@app/components/v2"; import { useDebounce, usePopUp, useToggle } from "@app/hooks"; import { useGetProjectSecrets } from "@app/hooks/api"; @@ -174,6 +177,15 @@ export const SecretDropzone = ({ reset(); }; + const handleSecSelectAll = () => { + if (secrets?.secrets) { + setValue( + "secrets", + secrets?.secrets?.reduce((prev, curr) => ({ ...prev, [curr.key]: curr.value }), {}) + ); + } + }; + return (
@@ -267,7 +279,7 @@ export const SecretDropzone = ({
Secrets
-
+
} onChange={(evt) => setSearchFilter(evt.target.value)} /> + + + + + + + reset()} + > + + +
@@ -308,7 +340,7 @@ export const SecretDropzone = ({