mirror of
https://github.com/usual2970/certimate.git
synced 2025-08-11 20:01:45 +00:00
feat: reserved field challengeType
for apply node config
This commit is contained in:
@@ -56,6 +56,7 @@ const ApplyNode = ({ node, disabled }: ApplyNodeProps) => {
|
||||
const newNode = produce(node, (draft) => {
|
||||
draft.config = {
|
||||
...newValues,
|
||||
challengeType: newValues.challengeType || "dns-01", // 默认使用 DNS-01 认证
|
||||
};
|
||||
draft.validated = true;
|
||||
});
|
||||
|
@@ -56,6 +56,7 @@ const MULTIPLE_INPUT_DELIMITER = ";";
|
||||
|
||||
const initFormModel = (): ApplyNodeConfigFormFieldValues => {
|
||||
return {
|
||||
challengeType: "dns-01",
|
||||
keyAlgorithm: "RSA2048",
|
||||
skipBeforeExpiryDays: 20,
|
||||
};
|
||||
@@ -74,6 +75,7 @@ const ApplyNodeConfigForm = forwardRef<ApplyNodeConfigFormInstance, ApplyNodeCon
|
||||
.every((e) => validDomainName(e, { allowWildcard: true }));
|
||||
}, t("common.errmsg.domain_invalid")),
|
||||
contactEmail: z.string({ message: t("workflow_node.apply.form.contact_email.placeholder") }).email(t("common.errmsg.email_invalid")),
|
||||
challengeType: z.string().nullish(),
|
||||
provider: z.string({ message: t("workflow_node.apply.form.provider.placeholder") }).nonempty(t("workflow_node.apply.form.provider.placeholder")),
|
||||
providerAccessId: z
|
||||
.string({ message: t("workflow_node.apply.form.provider_access.placeholder") })
|
||||
@@ -235,6 +237,16 @@ const ApplyNodeConfigForm = forwardRef<ApplyNodeConfigFormInstance, ApplyNodeCon
|
||||
<EmailInput placeholder={t("workflow_node.apply.form.contact_email.placeholder")} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item name="challengeType" label={t("workflow_node.apply.form.challenge_type.label")} rules={[formRule]} hidden>
|
||||
<Select
|
||||
options={["DNS-01"].map((e) => ({
|
||||
label: e,
|
||||
value: e.toLowerCase(),
|
||||
}))}
|
||||
placeholder={t("workflow_node.apply.form.challenge_type.placeholder")}
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item name="provider" label={t("workflow_node.apply.form.provider.label")} hidden rules={[formRule]}>
|
||||
<ApplyDNSProviderSelect
|
||||
allowClear
|
||||
|
Reference in New Issue
Block a user