mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-08 16:00:26 +08:00
阶段性提交
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
Tea.context(function () {
|
||||
this.serverType = "httpProxy";
|
||||
this.addresses = [];
|
||||
this.tlsProtocolName = ""
|
||||
|
||||
this.serverNames = [];
|
||||
@@ -10,29 +9,10 @@ Tea.context(function () {
|
||||
this.success = NotifySuccess("保存成功", "/servers");
|
||||
|
||||
this.changeServerType = function () {
|
||||
this.addresses = [];
|
||||
this.origins = [];
|
||||
this.tlsProtocolName = "";
|
||||
};
|
||||
|
||||
this.addPort = function () {
|
||||
teaweb.popup("/servers/addPortPopup?serverType=" + this.serverType, {
|
||||
callback: function (resp) {
|
||||
var addr = resp.data.address;
|
||||
this.addresses.push(addr);
|
||||
if (["https", "https4", "https6"].$contains(addr.protocol)) {
|
||||
this.tlsProtocolName = "HTTPS";
|
||||
} else if (["tls", "tls4", "tls6"].$contains(addr.protocol)) {
|
||||
this.tlsProtocolName = "TLS";
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
this.removeAddr = function (index) {
|
||||
this.addresses.$remove(index);
|
||||
};
|
||||
|
||||
this.addServerName = function () {
|
||||
teaweb.popup("/servers/addServerNamePopup", {
|
||||
callback: function (resp) {
|
||||
|
||||
Reference in New Issue
Block a user