diff --git a/config/config.go b/config/config.go index 1f0750b1..e1c7f911 100644 --- a/config/config.go +++ b/config/config.go @@ -46,5 +46,5 @@ func IsDebug() bool { } func GetDBPath() string { - return fmt.Sprintf("%s/%s.db", GetName(), GetName()) + return fmt.Sprintf("/etc/%s/%s.db", GetName(), GetName()) } diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/client_bulk_modal.html index b28d8d07..ea43feb2 100644 --- a/web/html/xui/client_bulk_modal.html +++ b/web/html/xui/client_bulk_modal.html @@ -3,34 +3,7 @@ :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" }} @@ -75,26 +48,9 @@ quantity: 1, totalGB: 0, expiryTime: '', - emailMethod: 0, - firstNum: 0, - lastNum: 1, - emailPrefix: "", - emailPostfix: "", ok() { - 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++) { + for (let i = 0; i < clientsBulkModal.quantity; 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);