mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-17 22:39:46 +00:00
[sub] more text length for random subID
This commit is contained in:
@@ -134,10 +134,10 @@ class RandomUtil {
|
||||
});
|
||||
}
|
||||
|
||||
static randomText() {
|
||||
static randomText(minLen = 6, varLen = 5) {
|
||||
var chars = 'abcdefghijklmnopqrstuvwxyz1234567890';
|
||||
var string = '';
|
||||
var len = 6 + Math.floor(Math.random() * 5);
|
||||
var len = minLen + Math.floor(Math.random() * varLen);
|
||||
for (var ii = 0; ii < len; ii++) {
|
||||
string += chars[Math.floor(Math.random() * chars.length)];
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="client.email">
|
||||
<td>Subscription <a-icon @click="client.subId = RandomUtil.randomText()" type="sync"></a-icon></td>
|
||||
<td>Subscription <a-icon @click="client.subId = RandomUtil.randomText(16,16)" type="sync"></a-icon></td>
|
||||
<td>
|
||||
<a-form-item>
|
||||
<a-input v-model.trim="client.subId" style="width: 250px"></a-input>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Subscription <a-icon @click="client.subId = RandomUtil.randomText()" type="sync"></a-icon></td>
|
||||
<td>Subscription <a-icon @click="client.subId = RandomUtil.randomText(16,16)" type="sync"></a-icon></td>
|
||||
<td>
|
||||
<a-form-item v-if="client.email">
|
||||
<a-input v-model.trim="client.subId" style="width: 200px;"></a-input>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Subscription <a-icon @click="client.subId = RandomUtil.randomText()" type="sync"></a-icon></td>
|
||||
<td>Subscription <a-icon @click="client.subId = RandomUtil.randomText(16,16)" type="sync"></a-icon></td>
|
||||
<td>
|
||||
<a-form-item v-if="client.email">
|
||||
<a-input v-model.trim="client.subId" style="width: 200px;"></a-input>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Subscription <a-icon @click="client.subId = RandomUtil.randomText()" type="sync"></a-icon></td>
|
||||
<td>Subscription <a-icon @click="client.subId = RandomUtil.randomText(16,16)" type="sync"></a-icon></td>
|
||||
<td>
|
||||
<a-form-item v-if="client.email">
|
||||
<a-input v-model.trim="client.subId" style="width: 200px;"></a-input>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Subscription <a-icon @click="client.subId = RandomUtil.randomText()" type="sync"></a-icon></td>
|
||||
<td>Subscription <a-icon @click="client.subId = RandomUtil.randomText(16,16)" type="sync"></a-icon></td>
|
||||
<td>
|
||||
<a-form-item v-if="client.email">
|
||||
<a-input v-model.trim="client.subId" style="width: 200px;"></a-input>
|
||||
|
||||
Reference in New Issue
Block a user