mirror of
https://github.com/certd/certd.git
synced 2026-04-15 13:32:37 +08:00
refactor(core): 重构访问控制和插件实例化逻辑
- 修改访问控制和插件注册方式,使用异步函数统一实例化逻辑 - 更新相关组件和控制器以适应新的异步实例化方式 - 优化 DNS 提供商选择器,增加访问类型支持
This commit is contained in:
@@ -29,6 +29,7 @@ export type DomainVerifyPlanInput = {
|
||||
domain: string;
|
||||
type: "cname" | "dns" | "http";
|
||||
dnsProviderType?: string;
|
||||
dnsProviderAccessType?: string;
|
||||
dnsProviderAccessId?: number;
|
||||
cnameVerifyPlan?: Record<string, CnameRecordInput>;
|
||||
httpVerifyPlan?: Record<string, HttpRecordInput>;
|
||||
@@ -99,7 +100,14 @@ HTTP文件验证:不支持泛域名,需要配置网站文件上传`,
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.challengeType === 'dns'
|
||||
})
|
||||
}),
|
||||
component:{
|
||||
on:{
|
||||
selectedChange({form,$event}){
|
||||
form.dnsProviderAccessType = $event.accessType
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
required: true,
|
||||
@@ -107,6 +115,8 @@ HTTP文件验证:不支持泛域名,需要配置网站文件上传`,
|
||||
})
|
||||
dnsProviderType!: string;
|
||||
|
||||
dnsProviderAccessType!: string;
|
||||
|
||||
@TaskInput({
|
||||
title: "DNS解析授权",
|
||||
component: {
|
||||
@@ -117,7 +127,7 @@ HTTP文件验证:不支持泛域名,需要配置网站文件上传`,
|
||||
mergeScript: `return {
|
||||
component:{
|
||||
type: ctx.compute(({form})=>{
|
||||
return form.dnsProviderType
|
||||
return form.dnsProviderAccessType || form.dnsProviderType
|
||||
})
|
||||
},
|
||||
show: ctx.compute(({form})=>{
|
||||
|
||||
Reference in New Issue
Block a user