mirror of
https://github.com/certd/certd.git
synced 2026-04-14 12:30:54 +08:00
chore: 1
This commit is contained in:
@@ -196,6 +196,7 @@ export const useSettingStore = defineStore({
|
||||
notification.warn({
|
||||
message: $t("vip.needVipTip"),
|
||||
});
|
||||
mitter.emit("openVipModal");
|
||||
throw new Error($t("vip.needVipTip"));
|
||||
}
|
||||
},
|
||||
|
||||
@@ -104,6 +104,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
color: "gold",
|
||||
icon: "mingcute:vip-1-line",
|
||||
click: () => {
|
||||
settingStore.checkPlus();
|
||||
openDomainImportDialog({
|
||||
afterSubmit: () => {
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -71,11 +71,16 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
},
|
||||
actionbar: {
|
||||
buttons: {
|
||||
add: {
|
||||
icon: "ion:add-circle-outline",
|
||||
},
|
||||
import: {
|
||||
title: "导入CNAME记录",
|
||||
type: "primary",
|
||||
text: "批量导入",
|
||||
icon: "mingcute:vip-1-line",
|
||||
click: () => {
|
||||
settingStore.checkPlus();
|
||||
openCnameImportDialog({
|
||||
afterSubmit: () => {
|
||||
setTimeout(() => {
|
||||
@@ -89,7 +94,9 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
title: "导出CNAME记录之后,可用于批量导入cname解析到域名注册商",
|
||||
type: "primary",
|
||||
text: "批量导出",
|
||||
icon: "mingcute:vip-1-line",
|
||||
click: () => {
|
||||
settingStore.checkPlus();
|
||||
crudBinding.value.toolbar.buttons.export.click({});
|
||||
},
|
||||
},
|
||||
|
||||
@@ -233,7 +233,11 @@ export class DomainService extends BaseService<DomainEntity> {
|
||||
})
|
||||
const challengeType = "dns"
|
||||
|
||||
const importDomain = async (domainRecord: any) => {
|
||||
const getPage = async (pager: Pager) => {
|
||||
return await dnsProvider.getDomainListPage(pager)
|
||||
}
|
||||
|
||||
const itemHandle = async (domainRecord: any) => {
|
||||
task.incrementCurrent()
|
||||
const domain = domainRecord.domain
|
||||
|
||||
@@ -273,7 +277,7 @@ export class DomainService extends BaseService<DomainEntity> {
|
||||
task.setTotal(pageRes.total || 0)
|
||||
}
|
||||
const start = async () => {
|
||||
await doPageTurn({ pager, getPage: dnsProvider.getDomainListPage, itemHandle: importDomain, batchHandle })
|
||||
await doPageTurn({ pager, getPage, itemHandle, batchHandle })
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
Reference in New Issue
Block a user