diff --git a/web/html/xui/inbound_client_table.html b/web/html/xui/inbound_client_table.html
index 8cb09cc8..b90121ab 100644
--- a/web/html/xui/inbound_client_table.html
+++ b/web/html/xui/inbound_client_table.html
@@ -6,7 +6,7 @@
{{ i18n "pages.client.edit" }}
-
+
{{ i18n "info" }}
@@ -18,7 +18,7 @@
{{ i18n "delete"}}
-
+
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html
index 7c993aea..1c6aadd6 100644
--- a/web/html/xui/inbounds.html
+++ b/web/html/xui/inbounds.html
@@ -363,8 +363,10 @@
isEdit: false
});
},
- openEditClient(dbInbound_id, index) {
- dbInbound = this.dbInbounds.find(row => row.id === dbInbound_id);
+ openEditClient(dbInboundId, client) {
+ dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
+ clients = this.getInboundClients(dbInbound);
+ index = this.findIndexOfClient(clients, client);
clientModal.show({
title: '{{ i18n "pages.client.edit"}}',
okText: '{{ i18n "pages.client.submitEdit"}}',
@@ -378,6 +380,10 @@
isEdit: true
});
},
+ findIndexOfClient(clients,client) {
+ firstKey = Object.keys(client)[0];
+ return clients.findIndex(c => c[firstKey] === client[firstKey]);
+ },
async addClient(inbound, dbInbound) {
const data = {
id: dbInbound.id,
@@ -415,7 +421,10 @@
onOk: () => this.submit('/xui/inbound/del/' + dbInbound.id),
});
},
- delClient(dbInboundId,index) {
+ delClient(dbInboundId,client) {
+ dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
+ clients = this.getInboundClients(dbInbound);
+ index = this.findIndexOfClient(clients, client);
this.$confirm({
title: '{{ i18n "pages.inbounds.deleteInbound"}}',
content: '{{ i18n "pages.inbounds.deleteInboundContent"}}',