mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 14:27:23 +00:00
feat: added support for recursive file creation
This commit is contained in:
+5
-3
@@ -12,13 +12,14 @@ import { useToggle } from "@app/hooks";
|
||||
type Props = {
|
||||
defaultValue?: string | null;
|
||||
secretName: string;
|
||||
secretId?: string;
|
||||
isCreatable?: boolean;
|
||||
isVisible?: boolean;
|
||||
environment: string;
|
||||
secretPath: string;
|
||||
onSecretCreate: (env: string, key: string, value: string) => Promise<void>;
|
||||
onSecretUpdate: (env: string, key: string, value: string) => Promise<void>;
|
||||
onSecretDelete: (env: string, key: string) => Promise<void>;
|
||||
onSecretDelete: (env: string, key: string, secretId?: string) => Promise<void>;
|
||||
};
|
||||
|
||||
export const SecretEditRow = ({
|
||||
@@ -30,7 +31,8 @@ export const SecretEditRow = ({
|
||||
onSecretDelete,
|
||||
environment,
|
||||
secretPath,
|
||||
isVisible
|
||||
isVisible,
|
||||
secretId
|
||||
}: Props) => {
|
||||
const {
|
||||
handleSubmit,
|
||||
@@ -77,7 +79,7 @@ export const SecretEditRow = ({
|
||||
const handleDeleteSecret = async () => {
|
||||
setIsDeleting.on();
|
||||
try {
|
||||
await onSecretDelete(environment, secretName);
|
||||
await onSecretDelete(environment, secretName, secretId);
|
||||
reset({ value: undefined });
|
||||
} finally {
|
||||
setIsDeleting.off();
|
||||
|
||||
+2
-1
@@ -24,7 +24,7 @@ type Props = {
|
||||
getSecretByKey: (slug: string, key: string) => DecryptedSecret | undefined;
|
||||
onSecretCreate: (env: string, key: string, value: string) => Promise<void>;
|
||||
onSecretUpdate: (env: string, key: string, value: string) => Promise<void>;
|
||||
onSecretDelete: (env: string, key: string) => Promise<void>;
|
||||
onSecretDelete: (env: string, key: string, secretId?: string) => Promise<void>;
|
||||
};
|
||||
|
||||
export const SecretOverviewTableRow = ({
|
||||
@@ -149,6 +149,7 @@ export const SecretOverviewTableRow = ({
|
||||
isVisible={isSecretVisible}
|
||||
secretName={secretKey}
|
||||
defaultValue={secret?.value}
|
||||
secretId={secret?._id}
|
||||
isCreatable={isCreatable}
|
||||
onSecretDelete={onSecretDelete}
|
||||
onSecretCreate={onSecretCreate}
|
||||
|
||||
Reference in New Issue
Block a user