ACME证书增加ZeroSSL支持

This commit is contained in:
刘祥超
2021-10-03 13:09:49 +08:00
parent 0bc8bdd841
commit 1fb491d2e1
28 changed files with 795 additions and 33 deletions

View File

@@ -0,0 +1,54 @@
Tea.context(function () {
this.providerCode = ""
this.selectedProvider = null
this.accounts = []
this.accountId = 0
this.changeProvider = function () {
this.accountId = 0
if (this.providerCode.length == 0) {
return
}
let that = this
let provider = this.providers.$find(function (k, v) {
return v.code == that.providerCode
})
if (provider == null) {
return
}
this.selectedProvider = provider
this.$post(".accountsWithCode")
.params({
code: provider.code
})
.success(function (resp) {
this.accounts = resp.data.accounts
})
}
this.addAccount = function () {
let that = this
teaweb.popup("/servers/certs/acme/accounts/createPopup?providerCode=" + this.providerCode, {
height: "24em",
callback: function () {
teaweb.successToast("创建成功,已自动选中", 1500, function () {
that.$post(".accountsWithCode")
.params({
code: that.providerCode
})
.success(function (resp) {
that.accounts = resp.data.accounts
if (that.accounts.length > 0) {
that.accountId = that.accounts[0].id
}
})
})
}
})
}
})