diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/client_bulk_modal.html
index ea43feb2..ae400a11 100644
--- a/web/html/xui/client_bulk_modal.html
+++ b/web/html/xui/client_bulk_modal.html
@@ -3,7 +3,34 @@
:confirm-loading="clientsBulkModal.confirmLoading" :closable="true" :mask-closable="false"
:ok-text="clientsBulkModal.okText" cancel-text='{{ i18n "close" }}'>
-
+
+
+ Random
+ Random_Prefix
+ Random_Prefix+Num
+ Random_Prefix+Num+Postfix
+ Random_Prefix+Num@Telegram Username
+
+
+
+ First
+
+
+
+ Last
+
+
+
+ Prefix
+
+
+
+ tg_uname
+ Postfix
+
+
+
+
{{ i18n "pages.client.clientCount" }}
@@ -48,9 +75,26 @@
quantity: 1,
totalGB: 0,
expiryTime: '',
+ emailMethod: 0,
+ firstNum: 0,
+ lastNum: 1,
+ emailPrefix: "",
+ emailPostfix: "",
ok() {
- for (let i = 0; i < clientsBulkModal.quantity; i++) {
+ method=clientsBulkModal.emailMethod;
+ if(method>1){
+ start=clientsBulkModal.firstNum;
+ end=clientsBulkModal.lastNum + 1;
+ } else {
+ start=0;
+ end=clientsBulkModal.quantity;
+ }
+ prefix = (method>0 && clientsBulkModal.emailPrefix.length>0) ? "_" + clientsBulkModal.emailPrefix : "";
+ useNum=(method>1);
+ postfix = (method>2 && clientsBulkModal.emailPostfix.length>0) ? (method == 4 ? "@" : "") + clientsBulkModal.emailPostfix : "";
+ for (let i = start; i < end; i++) {
newClient = clientsBulkModal.newClient(clientsBulkModal.dbInbound.protocol);
+ newClient.email += useNum ? prefix + i.toString() + postfix : prefix + postfix;
newClient._totalGB = clientsBulkModal.totalGB;
newClient._expiryTime = clientsBulkModal.expiryTime;
clientsBulkModal.clients.push(newClient);
@@ -105,4 +149,4 @@
},
});
-{{end}}
+{{end}}
\ No newline at end of file