diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-12-04 23:06:04 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-12-04 23:06:04 +0300 |
| commit | ba2d02ae1d1ff202c290c0c4800a1ea30a36c823 (patch) | |
| tree | e1bd574c7c8c378ee96b4e3fc82fe8d0343cd1db /web/html/xui | |
| parent | 6a404ed6e8abeacbc6eb44537e87684521480d20 (diff) | |
[bug] fix qrcode and info for searched clients
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html/xui')
| -rw-r--r-- | web/html/xui/inbound_client_table.html | 4 | ||||
| -rw-r--r-- | web/html/xui/inbounds.html | 18 |
2 files changed, 15 insertions, 7 deletions
diff --git a/web/html/xui/inbound_client_table.html b/web/html/xui/inbound_client_table.html index 5109fb28..e977e6b5 100644 --- a/web/html/xui/inbound_client_table.html +++ b/web/html/xui/inbound_client_table.html @@ -2,7 +2,7 @@ <template slot="actions" slot-scope="text, client, index"> <a-tooltip> <template slot="title">{{ i18n "qrCode" }}</template> - <a-icon style="font-size: 24px;" class="normal-icon" type="qrcode" v-if="record.hasLink()" @click="showQrcode(record,index);"></a-icon> + <a-icon style="font-size: 24px;" class="normal-icon" type="qrcode" v-if="record.hasLink()" @click="showQrcode(record.id,client);"></a-icon> </a-tooltip> <a-tooltip> <template slot="title">{{ i18n "pages.client.edit" }}</template> @@ -10,7 +10,7 @@ </a-tooltip> <a-tooltip> <template slot="title">{{ i18n "info" }}</template> - <a-icon style="font-size: 24px;" class="normal-icon" type="info-circle" @click="showInfo(record,index);"></a-icon> + <a-icon style="font-size: 24px;" class="normal-icon" type="info-circle" @click="showInfo(record.id,client);"></a-icon> </a-tooltip> <a-tooltip> <template slot="title">{{ i18n "pages.inbounds.resetTraffic" }}</template> diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index f6f2ddf9..3d872cdb 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -995,11 +995,19 @@ } return newDbInbound; }, - showQrcode(dbInbound, clientIndex) { + showQrcode(dbInboundId, client) { + dbInbound = this.dbInbounds.find(row => row.id === dbInboundId); + inbound = dbInbound.toInbound(); + clients = this.getClients(dbInbound.protocol, inbound.settings); + index = this.findIndexOfClient(dbInbound.protocol, clients, client); newDbInbound = this.checkFallback(dbInbound); - qrModal.show('{{ i18n "qrCode"}}', newDbInbound, clientIndex); + qrModal.show('{{ i18n "qrCode"}}', newDbInbound, index); }, - showInfo(dbInbound, index) { + showInfo(dbInboundId, client) { + dbInbound = this.dbInbounds.find(row => row.id === dbInboundId); + inbound = dbInbound.toInbound(); + clients = this.getClients(dbInbound.protocol, inbound.settings); + index = this.findIndexOfClient(dbInbound.protocol, clients, client); newDbInbound = this.checkFallback(dbInbound); infoModal.show(newDbInbound, index); }, @@ -1163,8 +1171,8 @@ isClientOnline(email) { return this.onlineClients.includes(email); }, - isRemovable(dbInbound_id) { - return this.getInboundClients(this.dbInbounds.find(row => row.id === dbInbound_id)).length > 1; + isRemovable(dbInboundId) { + return this.getInboundClients(this.dbInbounds.find(row => row.id === dbInboundId)).length > 1 }, inboundLinks(dbInboundId) { dbInbound = this.dbInbounds.find(row => row.id === dbInboundId); |
