mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-28 15:10:25 +08:00
ACME证书增加ZeroSSL支持
This commit is contained in:
54
web/views/@default/servers/certs/acme/users/createPopup.js
Normal file
54
web/views/@default/servers/certs/acme/users/createPopup.js
Normal 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
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user