This commit is contained in:
Hossin Asaadi
2022-10-30 18:28:50 -04:00
parent 58327d5062
commit 60b649bf6a
4 changed files with 22 additions and 8 deletions

View File

@@ -11,6 +11,7 @@
visible: false,
confirmLoading: false,
okText: '确定',
isEdit: false,
confirm: null,
inbound: new Inbound(),
dbInbound: new DBInbound(),
@@ -18,7 +19,7 @@
ok() {
ObjectUtil.execute(inModal.confirm, inModal.inbound, inModal.dbInbound);
},
show({ title='', okText='确定', inbound=null, dbInbound=null, confirm=(inbound, dbInbound)=>{} }) {
show({ title='', okText='确定', inbound=null, dbInbound=null, confirm=(inbound, dbInbound)=>{}, isEdit=false }) {
this.title = title;
this.okText = okText;
if (inbound) {
@@ -33,6 +34,7 @@
}
this.confirm = confirm;
this.visible = true;
this.isEdit = isEdit;
},
close() {
inModal.visible = false;
@@ -68,6 +70,9 @@
},
get clientIps() {
return inModal.clientIps;
},
get isEdit() {
return inModal.isEdit;
}
},
methods: {
@@ -82,9 +87,16 @@
if (!msg.success) {
return;
}
ips = JSON.parse(msg.obj)
ips = ips.join(",")
this.inModal.clientIps = ips
try {
ips = JSON.parse(msg.obj)
ips = ips.join(",")
this.inModal.clientIps = ips
} catch (error) {
// text
this.inModal.clientIps = msg.obj
}
},
async clearDBClientIps(email) {
const msg = await HttpUtil.post('/xui/inbound/clearClientIps/'+ email);