mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-03 04:25:46 +00:00
improvement: handle overflow and improve ui
This commit is contained in:
@@ -113,6 +113,7 @@ export const CreateSecretImportForm = ({
|
|||||||
return (
|
return (
|
||||||
<Modal isOpen={isOpen} onOpenChange={onTogglePopUp}>
|
<Modal isOpen={isOpen} onOpenChange={onTogglePopUp}>
|
||||||
<ModalContent
|
<ModalContent
|
||||||
|
bodyClassName="overflow-visible"
|
||||||
title="Add Secret Link"
|
title="Add Secret Link"
|
||||||
subTitle="To inherit secrets from another environment or folder"
|
subTitle="To inherit secrets from another environment or folder"
|
||||||
>
|
>
|
||||||
|
|||||||
+8
-4
@@ -31,7 +31,10 @@ const formSchema = z.object({
|
|||||||
.transform((val) =>
|
.transform((val) =>
|
||||||
typeof val === "string" && val.at(-1) === "/" && val.length > 1 ? val.slice(0, -1) : val
|
typeof val === "string" && val.at(-1) === "/" && val.length > 1 ? val.slice(0, -1) : val
|
||||||
),
|
),
|
||||||
secrets: z.object({ key: z.string(), value: z.string().optional() }).array().min(1)
|
secrets: z
|
||||||
|
.object({ key: z.string(), value: z.string().optional() })
|
||||||
|
.array()
|
||||||
|
.min(1, "Select one or more secrets to copy")
|
||||||
});
|
});
|
||||||
|
|
||||||
type TFormSchema = z.infer<typeof formSchema>;
|
type TFormSchema = z.infer<typeof formSchema>;
|
||||||
@@ -145,6 +148,7 @@ export const CopySecretsFromBoard = ({
|
|||||||
</div>
|
</div>
|
||||||
</ModalTrigger>
|
</ModalTrigger>
|
||||||
<ModalContent
|
<ModalContent
|
||||||
|
bodyClassName="overflow-visible"
|
||||||
className="max-w-2xl"
|
className="max-w-2xl"
|
||||||
title="Copy Secret From An Environment"
|
title="Copy Secret From An Environment"
|
||||||
subTitle="Copy/paste secrets from other environments into this context"
|
subTitle="Copy/paste secrets from other environments into this context"
|
||||||
@@ -185,7 +189,7 @@ export const CopySecretsFromBoard = ({
|
|||||||
<div className="mb-4 flex items-center justify-between">
|
<div className="mb-4 flex items-center justify-between">
|
||||||
<div>Secrets</div>
|
<div>Secrets</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex w-full items-center gap-3">
|
<div className="flex w-full items-start gap-3">
|
||||||
<Controller
|
<Controller
|
||||||
control={control}
|
control={control}
|
||||||
name="secrets"
|
name="secrets"
|
||||||
@@ -201,7 +205,7 @@ export const CopySecretsFromBoard = ({
|
|||||||
isSecretsLoading
|
isSecretsLoading
|
||||||
? "Loading secrets..."
|
? "Loading secrets..."
|
||||||
: secrets?.length
|
: secrets?.length
|
||||||
? "select secrets..."
|
? "Select secrets..."
|
||||||
: "No secrets found..."
|
: "No secrets found..."
|
||||||
}
|
}
|
||||||
isLoading={isSecretsLoading}
|
isLoading={isSecretsLoading}
|
||||||
@@ -217,7 +221,7 @@ export const CopySecretsFromBoard = ({
|
|||||||
/>
|
/>
|
||||||
<Tooltip content="Select All">
|
<Tooltip content="Select All">
|
||||||
<IconButton
|
<IconButton
|
||||||
className="mb-3.5 h-9 w-9"
|
className="mt-1 h-9 w-9"
|
||||||
ariaLabel="Select all"
|
ariaLabel="Select all"
|
||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
Reference in New Issue
Block a user