diff options
| author | Ho3ein <ho3ein.sanaei@gmail.com> | 2023-12-10 17:42:52 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-10 17:42:52 +0300 |
| commit | e3f1d3c892a1af48f27fdc36f273a55f38d13b40 (patch) | |
| tree | b11d0c1ed3c15c8f6f891a5e6df8e021d5db8ab6 /web/html/xui/client_bulk_modal.html | |
| parent | 36cf7c0a8fda915b51e75958ce729fd9a61a5c90 (diff) | |
| parent | 9fbe80f87f950673058f0001b3704251fa8b9243 (diff) | |
huge changes
Diffstat (limited to 'web/html/xui/client_bulk_modal.html')
| -rw-r--r-- | web/html/xui/client_bulk_modal.html | 310 |
1 files changed, 199 insertions, 111 deletions
diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/client_bulk_modal.html index d5c60b76..e0295110 100644 --- a/web/html/xui/client_bulk_modal.html +++ b/web/html/xui/client_bulk_modal.html @@ -1,122 +1,207 @@ {{define "clientsBulkModal"}} -<a-modal id="client-bulk-modal" v-model="clientsBulkModal.visible" :title="clientsBulkModal.title" @ok="clientsBulkModal.ok" - :confirm-loading="clientsBulkModal.confirmLoading" :closable="true" :mask-closable="false" - :class="themeSwitcher.darkCardClass" - :ok-text="clientsBulkModal.okText" cancel-text='{{ i18n "close" }}'> +<a-modal id="client-bulk-modal" v-model="clientsBulkModal.visible" :title="clientsBulkModal.title" + @ok="clientsBulkModal.ok" :confirm-loading="clientsBulkModal.confirmLoading" :closable="true" :mask-closable="false" + :ok-text="clientsBulkModal.okText" cancel-text='{{ i18n "close" }}' :class="themeSwitcher.currentTheme"> <a-form layout="inline"> - <a-form-item label='{{ i18n "pages.client.method" }}'> - <a-select v-model="clientsBulkModal.emailMethod" buttonStyle="solid" style="width: 350px" :dropdown-class-name="themeSwitcher.darkCardClass"> - <a-select-option :value="0">Random</a-select-option> - <a-select-option :value="1">Random+Prefix</a-select-option> - <a-select-option :value="2">Random+Prefix+Num</a-select-option> - <a-select-option :value="3">Random+Prefix+Num+Postfix</a-select-option> - <a-select-option :value="4">Prefix+Num+Postfix [ BE CAREFUL! ]</a-select-option> - </a-select> - </a-form-item><br /> - <a-form-item v-if="clientsBulkModal.emailMethod>1"> - <span slot="label">{{ i18n "pages.client.first" }}</span> - <a-input-number v-model="clientsBulkModal.firstNum" :min="1"></a-input-number> - </a-form-item> - <a-form-item v-if="clientsBulkModal.emailMethod>1"> - <span slot="label">{{ i18n "pages.client.last" }}</span> - <a-input-number v-model="clientsBulkModal.lastNum" :min="clientsBulkModal.firstNum"></a-input-number> - </a-form-item> - <a-form-item v-if="clientsBulkModal.emailMethod>0"> - <span slot="label">{{ i18n "pages.client.prefix" }}</span> - <a-input v-model="clientsBulkModal.emailPrefix" style="width: 120px"></a-input> - </a-form-item> - <a-form-item v-if="clientsBulkModal.emailMethod>2"> - <span slot="label">{{ i18n "pages.client.postfix" }}</span> - <a-input v-model="clientsBulkModal.emailPostfix" style="width: 120px"></a-input> - </a-form-item> - <a-form-item v-if="clientsBulkModal.emailMethod < 2"> - <span slot="label">{{ i18n "pages.client.clientCount" }}</span> - <a-input-number v-model="clientsBulkModal.quantity" :min="1" :max="100"></a-input-number> - </a-form-item> - <a-form-item v-if="app.subSettings.enable"> - <span slot="label"> - Subscription + <table width="100%" class="ant-table-tbody"> + <tr> + <td>{{ i18n "pages.client.method" }}</td> + <td> + <a-form-item> + <a-select v-model="clientsBulkModal.emailMethod" buttonStyle="solid" style="width: 250px" + :dropdown-class-name="themeSwitcher.currentTheme"> + <a-select-option :value="0">Random</a-select-option> + <a-select-option :value="1">Random+Prefix</a-select-option> + <a-select-option :value="2">Random+Prefix+Num</a-select-option> + <a-select-option :value="3">Random+Prefix+Num+Postfix</a-select-option> + <a-select-option :value="4">Prefix+Num+Postfix</a-select-option> + </a-select> + </a-form-item> + </td> + </tr> + <tr v-if="clientsBulkModal.emailMethod>1"> + <td>{{ i18n "pages.client.first" }}</td> + <td> + <a-form-item> + <a-input-number v-model="clientsBulkModal.firstNum" :min="1"></a-input-number> + </a-form-item> + </td> + </tr> + <tr v-if="clientsBulkModal.emailMethod>1"> + <td>{{ i18n "pages.client.last" }}</td> + <td> + <a-form-item> + <a-input-number v-model="clientsBulkModal.lastNum" + :min="clientsBulkModal.firstNum"></a-input-number> + </a-form-item> + </td> + </tr> + <tr v-if="clientsBulkModal.emailMethod>0"> + <td>{{ i18n "pages.client.prefix" }}</td> + <td> + <a-form-item> + <a-input v-model="clientsBulkModal.emailPrefix" style="width: 250px"></a-input> + </a-form-item> + </td> + </tr> + <tr v-if="clientsBulkModal.emailMethod>2"> + <td>{{ i18n "pages.client.postfix" }}</td> + <td> + <a-form-item> + <a-input v-model="clientsBulkModal.emailPostfix" style="width: 250px"></a-input> + </a-form-item> + </td> + </tr> + <tr v-if="clientsBulkModal.emailMethod < 2"> + <td>{{ i18n "pages.client.clientCount" }}</td> + <td> + <a-form-item> + <a-input-number v-model="clientsBulkModal.quantity" :min="1" :max="100"></a-input-number> + </a-form-item> + </td> + </tr> + <tr v-if="clientsBulkModal.inbound.canEnableTlsFlow()"> + <td>Flow</td> + <td> + <a-form-item> + <a-select v-model="clientsBulkModal.flow" style="width: 250px" + :dropdown-class-name="themeSwitcher.currentTheme"> + <a-select-option value="" selected>{{ i18n "none" }}</a-select-option> + <a-select-option v-for="key in TLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option> + </a-select> + </a-form-item> + </td> + </tr> + <tr v-if="app.subSettings.enable"> + <td>Subscription <a-tooltip> <template slot="title"> <span>{{ i18n "pages.inbounds.subscriptionDesc" }}</span> </template> + <a-icon @click="client.subId = RandomUtil.randomLowerAndNum(16)" type="sync"></a-icon> + </a-tooltip> + </td> + <td> + <a-form-item> + <a-input v-model.trim="clientsBulkModal.subId" style="width: 250px"></a-input> + </a-form-item> + </td> + </tr> + <tr v-if="app.tgBotEnable"> + <td>Telegram ID + <a-tooltip> + <template slot="title"> + <span>{{ i18n "pages.inbounds.telegramDesc" }}</span> + </template> + <a-icon type="question-circle" theme="filled"></a-icon> + </a-tooltip> + </td> + <td> + <a-form-item> + <a-input v-model.trim="clientsBulkModal.tgId" style="width: 250px"></a-input> + </a-form-item> + </td> + </tr> + <tr> + <td> + <label> + <span>{{ i18n "pages.inbounds.IPLimit" }}</span> + <a-tooltip> + <template slot="title"> + <span>{{ i18n "pages.inbounds.IPLimitDesc" }}</span> + </template> + <a-icon type="question-circle" theme="filled"></a-icon> + </a-tooltip> + </label> + </td> + <td> + <a-form-item> + <a-input-number v-model="clientsBulkModal.limitIp" min="0"></a-input-number> + </a-form-item> + </td> + </tr> + <tr> + <td v-if="clientsBulkModal.inbound.xtls"> + <label>Flow</label> + </td> + <td v-if="clientsBulkModal.inbound.xtls"> + <a-form-item> + <a-select v-model="clientsBulkModal.flow" style="width: 200px" + :dropdown-class-name="themeSwitcher.currentTheme"> + <a-select-option value="">{{ i18n "none" }}</a-select-option> + <a-select-option v-for="key in XTLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option> + </a-select> + </a-form-item> + </td> + </tr> + <tr> + <td> + <span>{{ i18n "pages.inbounds.totalFlow" }}</span>(GB) + <a-tooltip> + <template slot="title"> + 0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span> + </template> + <a-icon type="question-circle" theme="filled"></a-icon> + </a-tooltip> + </td> + <td> + <a-form-item> + <a-input-number v-model="clientsBulkModal.totalGB" :min="0"></a-input-number> + </a-form-item> + </td> + </tr> + <tr> + <td>{{ i18n "pages.client.delayedStart" }}</td> + <td> + <a-form-item> + <a-switch v-model="clientsBulkModal.delayedStart" + @click="clientsBulkModal.expiryTime=0"></a-switch> + </a-form-item> + </td> + </tr> + <tr v-if="clientsBulkModal.delayedStart"> + <td>{{ i18n "pages.client.expireDays" }}</td> + <td> + <a-form-item> + <a-input-number v-model.number="delayedExpireDays" :min="0"></a-input-number> + </a-form-item> + </td> + </tr> + <tr v-else> + <td> + <span>{{ i18n "pages.inbounds.expireDate" }}</span> + <a-tooltip> + <template slot="title"> + <span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span> + </template> + <a-icon type="question-circle" theme="filled"></a-icon> + </a-tooltip> + </td> + <td> + <a-form-item> + <a-date-picker :show-time="{ format: 'HH:mm:ss' }" format="YYYY-MM-DD HH:mm:ss" + :dropdown-class-name="themeSwitcher.currentTheme" v-model="clientsBulkModal.expiryTime" + style="width: 250px;"></a-date-picker> + </a-form-item> + </td> + </tr> + <tr v-if="clientsBulkModal.expiryTime != 0"> + <td> + <span>{{ i18n "pages.client.renew" }}</span> + <a-tooltip> + <template slot="title"> + <span>{{ i18n "pages.client.renewDesc" }}</span> + </template> <a-icon type="question-circle" theme="filled"></a-icon> </a-tooltip> - </span> - <a-input v-model.trim="clientsBulkModal.subId"></a-input> - </a-form-item> - <a-form-item v-if="app.tgBotEnable"> - <span slot="label"> - Telegram ID - <a-tooltip> - <template slot="title"> - <span>{{ i18n "pages.inbounds.telegramDesc" }}</span> - </template> - <a-icon type="question-circle" theme="filled"></a-icon> - </a-tooltip> - </span> - <a-input v-model.trim="clientsBulkModal.tgId"></a-input> - </a-form-item> - <br> - <a-form-item> - <span slot="label"> - <span>{{ i18n "pages.inbounds.IPLimit" }}</span> - <a-tooltip> - <template slot="title"> - <span>{{ i18n "pages.inbounds.IPLimitDesc" }}</span> - </template> - <a-icon type="question-circle" theme="filled"></a-icon> - </a-tooltip> - </span> - <a-input-number v-model="clientsBulkModal.limitIp" min="0"></a-input-number> - </a-form-item> - <br> - <a-form-item v-if="clientsBulkModal.inbound.xtls" label="Flow"> - <a-select v-model="clientsBulkModal.flow" style="width: 200px" :dropdown-class-name="themeSwitcher.darkCardClass"> - <a-select-option value="">{{ i18n "none" }}</a-select-option> - <a-select-option v-for="key in XTLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option> - </a-select> - </a-form-item> - <a-form-item v-if="clientsBulkModal.inbound.canEnableTlsFlow()" label="Flow" layout="inline"> - <a-select v-model="clientsBulkModal.flow" style="width: 200px" :dropdown-class-name="themeSwitcher.darkCardClass"> - <a-select-option value="" selected>{{ i18n "none" }}</a-select-option> - <a-select-option v-for="key in TLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option> - </a-select> - </a-form-item> - <a-form-item> - <span slot="label"> - <span>{{ i18n "pages.inbounds.totalFlow" }}</span> (GB) - <a-tooltip> - <template slot="title"> - 0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span> - </template> - <a-icon type="question-circle" theme="filled"></a-icon> - </a-tooltip> - </span> - <a-input-number v-model="clientsBulkModal.totalGB" :min="0"></a-input-number> - </a-form-item> - <br> - <a-form-item label='{{ i18n "pages.client.delayedStart" }}'> - <a-switch v-model="clientsBulkModal.delayedStart" @click="clientsBulkModal.expiryTime=0"></a-switch> - </a-form-item> - <br> - <a-form-item label='{{ i18n "pages.client.expireDays" }}' v-if="clientsBulkModal.delayedStart"> - <a-input-number v-model="delayedExpireDays" :min="0"></a-input-number> - </a-form-item> - <a-form-item v-else> - <span slot="label"> - <span>{{ i18n "pages.inbounds.expireDate" }}</span> - <a-tooltip> - <template slot="title"> - <span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span> - </template> - <a-icon type="question-circle" theme="filled"></a-icon> - </a-tooltip> - </span> - <a-date-picker :show-time="{ format: 'HH:mm:ss' }" format="YYYY-MM-DD HH:mm:ss" - :dropdown-class-name="themeSwitcher.darkCardClass" - v-model="clientsBulkModal.expiryTime" style="width: 300px;"></a-date-picker> - </a-form-item> + </td> + <td> + <a-form-item> + <a-input-number v-model.number="clientsBulkModal.reset" :min="0"></a-input-number> + </a-form-item> + </td> + </tr> + </table> </a-form> </a-modal> <script> @@ -142,6 +227,7 @@ tgId: "", flow: "", delayedStart: false, + reset: 0, ok() { clients = []; method = clientsBulkModal.emailMethod; @@ -170,6 +256,7 @@ if (clientsBulkModal.inbound.xtls) { newClient.flow = clientsBulkModal.flow; } + newClient.reset = clientsBulkModal.reset; clients.push(newClient); } ObjectUtil.execute(clientsBulkModal.confirm, clients, clientsBulkModal.dbInbound.id); @@ -199,6 +286,7 @@ this.dbInbound = new DBInbound(dbInbound); this.inbound = dbInbound.toInbound(); this.delayedStart = false; + this.reset = 0; }, newClient(protocol) { switch (protocol) { |
