From b6203e57edfb426581e46089be73790e2d0d78f4 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Fri, 20 Dec 2024 23:11:45 +0800 Subject: [PATCH] fix: fix typo --- ui/src/components/workflow/DeployToLocal.tsx | 14 +++++++------- ui/src/components/workflow/DeployToSSH.tsx | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ui/src/components/workflow/DeployToLocal.tsx b/ui/src/components/workflow/DeployToLocal.tsx index d0fe0605..942f646b 100644 --- a/ui/src/components/workflow/DeployToLocal.tsx +++ b/ui/src/components/workflow/DeployToLocal.tsx @@ -48,7 +48,7 @@ const formSchema = z jksKeypass: z.string().nullish(), jksStorepass: z.string().nullish(), preCommand: z.string().nullish(), - command: z.string().nullish(), + postCommand: z.string().nullish(), shell: z.union([z.literal("sh"), z.literal("cmd"), z.literal("powershell")], { message: t("domain.deployment.form.shell.placeholder"), }), @@ -100,9 +100,9 @@ const DeployToLocal = ({ data }: DeployFormProps) => { jksAlias: (data.config?.jksAlias as string) || "", jksKeypass: (data.config?.jksKeypass as string) || "", jksStorepass: (data.config?.jksStorepass as string) || "", - preCommand: (data.config?.preCommand as string) || "", - command: (data.config?.command as string) || "service nginx reload", shell: (data.config?.shell as "sh" | "cmd" | "powershell") || "sh", + preCommand: (data.config?.preCommand as string) || "", + postCommand: (data.config?.postCommand as string) || "service nginx reload", }, }); @@ -129,7 +129,7 @@ const DeployToLocal = ({ data }: DeployFormProps) => { case "reload_nginx": { form.setValue("shell", "sh"); - form.setValue("command", "sudo service nginx reload"); + form.setValue("postCommand", "sudo service nginx reload"); } break; @@ -137,7 +137,7 @@ const DeployToLocal = ({ data }: DeployFormProps) => { { form.setValue("shell", "powershell"); form.setValue( - "command", + "postCommand", `# 请将以下变量替换为实际值 $pfxPath = "" # PFX 文件路径 $pfxPassword = "" # PFX 密码 @@ -174,7 +174,7 @@ Remove-Item -Path "$pfxPath" -Force { form.setValue("shell", "powershell"); form.setValue( - "command", + "postCommand", `# 请将以下变量替换为实际值 $pfxPath = "" # PFX 文件路径 $pfxPassword = "" # PFX 密码 @@ -432,7 +432,7 @@ Remove-Item -Path "$pfxPath" -Force ( diff --git a/ui/src/components/workflow/DeployToSSH.tsx b/ui/src/components/workflow/DeployToSSH.tsx index bab13cde..f41596ce 100644 --- a/ui/src/components/workflow/DeployToSSH.tsx +++ b/ui/src/components/workflow/DeployToSSH.tsx @@ -47,7 +47,7 @@ const formSchema = z jksKeypass: z.string().nullish(), jksStorepass: z.string().nullish(), preCommand: z.string().nullish(), - command: z.string().nullish(), + postCommand: z.string().nullish(), }) .refine((data) => (data.format === "pem" ? !!data.keyPath?.trim() : true), { message: t("domain.deployment.form.file_key_path.placeholder"), @@ -97,7 +97,7 @@ const DeployToSSH = ({ data }: DeployFormProps) => { jksKeypass: (data.config?.jksKeypass as string) || "", jksStorepass: (data.config?.jksStorepass as string) || "", preCommand: (data.config?.preCommand as string) || "", - command: (data.config?.command as string) || "service nginx reload", + postCommand: (data.config?.postCommand as string) || "", }, }); @@ -327,7 +327,7 @@ const DeployToSSH = ({ data }: DeployFormProps) => { ( {t("domain.deployment.form.shell_command.label")}