From 97a0e2cae9b6be10d5c4f7ffe69fb24c1b5cea3e Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Wed, 29 Mar 2023 12:25:29 +0200 Subject: [PATCH] Adapt bulk modal --- web/html/xui/client_bulk_modal.html | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/client_bulk_modal.html index 7a03505e11..6ac1ec70cb 100644 --- a/web/html/xui/client_bulk_modal.html +++ b/web/html/xui/client_bulk_modal.html @@ -10,8 +10,7 @@ Random+Prefix Random+Prefix+Num Random+Prefix+Num+Postfix - Random+Prefix+Num@Telegram Username - Prefix+Num+Postfix [ BE CAREFUL! ] + Prefix+Num+Postfix [ BE CAREFUL! ]
@@ -27,15 +26,19 @@ - tg_uname - {{ i18n "pages.client.postfix" }} + {{ i18n "pages.client.postfix" }} - {{ i18n "pages.client.clientCount" }} + + + + + + {{ i18n "pages.inbounds.totalFlow" }}(GB) @@ -83,6 +86,8 @@ lastNum: 1, emailPrefix: "", emailPostfix: "", + subId: "", + tgId: "", ok() { method=clientsBulkModal.emailMethod; if(method>1){ @@ -94,11 +99,13 @@ } prefix = (method>0 && clientsBulkModal.emailPrefix.length>0) ? clientsBulkModal.emailPrefix : ""; useNum=(method>1); - postfix = (method>2 && clientsBulkModal.emailPostfix.length>0) ? (method == 4 ? "@" : "") + clientsBulkModal.emailPostfix : ""; + postfix = (method>2 && clientsBulkModal.emailPostfix.length>0) ? clientsBulkModal.emailPostfix : ""; for (let i = start; i < end; i++) { newClient = clientsBulkModal.newClient(clientsBulkModal.dbInbound.protocol); - if(method==5) newClient.email = ""; + if(method==4) newClient.email = ""; newClient.email += useNum ? prefix + i.toString() + postfix : prefix + postfix; + newClient.subId = clientsBulkModal.subId; + newClient.tgId = clientsBulkModal.tgId; newClient._totalGB = clientsBulkModal.totalGB; newClient._expiryTime = clientsBulkModal.expiryTime; clientsBulkModal.clients.push(newClient); @@ -118,7 +125,8 @@ this.lastNum= 1; this.emailPrefix= ""; this.emailPostfix= ""; - + this.subId= ""; + this.tgId= ""; this.dbInbound = new DBInbound(dbInbound); this.inbound = dbInbound.toInbound(); this.clients = this.getClients(this.inbound.protocol, this.inbound.settings);