mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-31 10:14:15 +00:00
fix(clients): bump auto-generated email length to 10 chars
The "create" form opened with a 9-char random email default, the bulk modal's random portion was only 6 chars, and the inbound-defaults seed used 8 — all below the 10-char minimum we want for new clients. Bring each generator to 10 so an unedited auto-generated email meets the threshold without the user having to extend it.
This commit is contained in:
parent
99df5d70a8
commit
bee8288d41
3 changed files with 3 additions and 3 deletions
|
|
@ -46,7 +46,7 @@ interface ClientBase {
|
||||||
|
|
||||||
function clientBase(seed: ClientBaseSeed = {}): ClientBase {
|
function clientBase(seed: ClientBaseSeed = {}): ClientBase {
|
||||||
return {
|
return {
|
||||||
email: seed.email ?? RandomUtil.randomLowerAndNum(8),
|
email: seed.email ?? RandomUtil.randomLowerAndNum(10),
|
||||||
limitIp: seed.limitIp ?? 0,
|
limitIp: seed.limitIp ?? 0,
|
||||||
totalGB: seed.totalGB ?? 0,
|
totalGB: seed.totalGB ?? 0,
|
||||||
expiryTime: seed.expiryTime ?? 0,
|
expiryTime: seed.expiryTime ?? 0,
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ export default function ClientBulkAddModal({
|
||||||
const postfix = method > 2 && form.emailPostfix.length > 0 ? form.emailPostfix : '';
|
const postfix = method > 2 && form.emailPostfix.length > 0 ? form.emailPostfix : '';
|
||||||
for (let i = start; i < end; i++) {
|
for (let i = start; i < end; i++) {
|
||||||
let email = '';
|
let email = '';
|
||||||
if (method !== 4) email = RandomUtil.randomLowerAndNum(6);
|
if (method !== 4) email = RandomUtil.randomLowerAndNum(10);
|
||||||
email += useNum ? prefix + String(i) + postfix : prefix + postfix;
|
email += useNum ? prefix + String(i) + postfix : prefix + postfix;
|
||||||
out.push(email);
|
out.push(email);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ export default function ClientFormModal({
|
||||||
} else {
|
} else {
|
||||||
setForm({
|
setForm({
|
||||||
...emptyForm(),
|
...emptyForm(),
|
||||||
email: RandomUtil.randomLowerAndNum(9),
|
email: RandomUtil.randomLowerAndNum(10),
|
||||||
uuid: RandomUtil.randomUUID(),
|
uuid: RandomUtil.randomUUID(),
|
||||||
subId: RandomUtil.randomLowerAndNum(16),
|
subId: RandomUtil.randomLowerAndNum(16),
|
||||||
password: RandomUtil.randomLowerAndNum(16),
|
password: RandomUtil.randomLowerAndNum(16),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue