mirror of https://github.com/certd/certd
chore:
parent
7ee9d915fb
commit
51f29d6093
|
@ -5,6 +5,7 @@ export type Registrable = {
|
|||
title: string;
|
||||
desc?: string;
|
||||
group?: string;
|
||||
deprecated?: string;
|
||||
};
|
||||
|
||||
export type RegistryItem<T> = {
|
||||
|
@ -67,6 +68,9 @@ export class Registry<T> {
|
|||
for (const key in this.storage) {
|
||||
const define = this.getDefine(key);
|
||||
if (define) {
|
||||
if (define?.deprecated) {
|
||||
continue;
|
||||
}
|
||||
list.push({ ...define, key });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,6 +174,9 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||
const dnsProviderPlugin = dnsProviderRegistry.get(dnsProviderType);
|
||||
const DnsProviderClass = dnsProviderPlugin.target;
|
||||
const dnsProviderDefine = dnsProviderPlugin.define as DnsProviderDefine;
|
||||
if (dnsProviderDefine.deprecated) {
|
||||
throw new Error(dnsProviderDefine.deprecated);
|
||||
}
|
||||
const access = await this.accessService.getById(dnsProviderAccessId);
|
||||
|
||||
// @ts-ignore
|
||||
|
|
|
@ -30,8 +30,9 @@ function next() {
|
|||
|
||||
<style lang="less">
|
||||
.tutorial-modal {
|
||||
top: 50px;
|
||||
.ant-modal-body {
|
||||
height: 70vh;
|
||||
height: 80vh;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</div>
|
||||
|
||||
<div class="image-box">
|
||||
<a-image :src="currentStepItem.image" />
|
||||
<a-image :src="currentStepItem.image" :preview-mask="previewMask" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script setup lang="tsx">
|
||||
type Step = {
|
||||
title: string;
|
||||
subTitle?: string;
|
||||
|
@ -256,19 +256,26 @@ function stepChanged(index: number) {
|
|||
current.value = index;
|
||||
currentItem.value = 0;
|
||||
}
|
||||
function previewMask() {
|
||||
return (
|
||||
<div title="点击放大" class="h-100 w-100">
|
||||
{" "}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.tutorial-steps {
|
||||
.step-item {
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
padding: 20px;
|
||||
.text {
|
||||
width: 100%;
|
||||
width: 350px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
@ -285,12 +292,22 @@ function stepChanged(index: number) {
|
|||
background: #eee;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
img {
|
||||
height: 100%;
|
||||
.ant-image-mask {
|
||||
background: rgba(255, 255, 255, 0);
|
||||
}
|
||||
.ant-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
}
|
||||
.desc {
|
||||
margin-top: 10px;
|
||||
font-size: 16px;
|
||||
|
|
|
@ -53,7 +53,7 @@ export class AccessController extends CrudController<AccessService> {
|
|||
}
|
||||
|
||||
@Post('/define', { summary: Constants.per.authOnly })
|
||||
async define(@Query('type') type:string) {
|
||||
async define(@Query('type') type: string) {
|
||||
const access = this.service.getDefineByType(type);
|
||||
return this.ok(access);
|
||||
}
|
||||
|
@ -63,6 +63,9 @@ export class AccessController extends CrudController<AccessService> {
|
|||
const list = this.service.getDefineList();
|
||||
const dict = [];
|
||||
for (const item of list) {
|
||||
if (item?.deprecated) {
|
||||
continue;
|
||||
}
|
||||
dict.push({
|
||||
value: item.name,
|
||||
label: item.title,
|
||||
|
|
|
@ -13,7 +13,7 @@ export class DnsProviderController extends BaseController {
|
|||
service: DnsProviderService;
|
||||
|
||||
@Post('/list', { summary: Constants.per.authOnly })
|
||||
async list(@Query(ALL) query:any) {
|
||||
async list(@Query(ALL) query: any) {
|
||||
query.userId = this.ctx.user.id;
|
||||
const list = this.service.getList();
|
||||
return this.ok(list);
|
||||
|
|
|
@ -8,6 +8,9 @@ export class PluginService {
|
|||
const list = [];
|
||||
for (const key in collection) {
|
||||
const Plugin = collection[key];
|
||||
if (Plugin?.define.deprecated) {
|
||||
continue;
|
||||
}
|
||||
list.push({ ...Plugin.define, key });
|
||||
}
|
||||
return list;
|
||||
|
|
|
@ -2,8 +2,9 @@ import { IsAccess, AccessInput } from '@certd/pipeline';
|
|||
|
||||
@IsAccess({
|
||||
name: 'dnspod',
|
||||
title: 'dnspod',
|
||||
title: 'dnspod(已废弃)',
|
||||
desc: '腾讯云的域名解析接口已迁移到dnspod',
|
||||
deprecated: 'dnspod已废弃,请换成腾讯云',
|
||||
})
|
||||
export class DnspodAccess {
|
||||
@AccessInput({
|
||||
|
|
|
@ -6,8 +6,9 @@ import { DnspodAccess } from '../access/index.js';
|
|||
@IsDnsProvider({
|
||||
name: 'dnspod',
|
||||
title: 'dnspod(已过时,请尽快换成腾讯云)',
|
||||
desc: '请尽快换成腾讯云类型',
|
||||
desc: '已废弃,请尽快换成腾讯云类型',
|
||||
accessType: 'dnspod',
|
||||
deprecated: 'dnspod已废弃,请换成腾讯云',
|
||||
})
|
||||
export class DnspodDnsProvider extends AbstractDnsProvider {
|
||||
@Autowire()
|
||||
|
|
Loading…
Reference in New Issue