Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-12-09 18:18:06 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-12-09 18:18:06 +0300
commit0f1f3d843907ee35b19bd5f0aadc37958cee09e1 (patch)
treeaef111aecb13794a4e50debf042191a4f5dacb9b /web/html/xui/form
parent2088a4f815a6ddbb1d8a991614640797fa6ed598 (diff)
<tr> <td> instead of <a-form-item>
convert the form structure to use <tr> and <td> instead of <a-form-item>,
Diffstat (limited to 'web/html/xui/form')
-rw-r--r--web/html/xui/form/client.html381
-rw-r--r--web/html/xui/form/inbound.html133
-rw-r--r--web/html/xui/form/protocol/dokodemo.html56
-rw-r--r--web/html/xui/form/protocol/http.html24
-rw-r--r--web/html/xui/form/protocol/shadowsocks.html58
-rw-r--r--web/html/xui/form/protocol/socks.html77
-rw-r--r--web/html/xui/form/stream/stream_grpc.html24
-rw-r--r--web/html/xui/form/stream/stream_http.html28
-rw-r--r--web/html/xui/form/stream/stream_kcp.html125
-rw-r--r--web/html/xui/form/stream/stream_quic.html60
-rw-r--r--web/html/xui/form/stream/stream_settings.html3
-rw-r--r--web/html/xui/form/stream/stream_tcp.html160
-rw-r--r--web/html/xui/form/stream/stream_ws.html10
-rw-r--r--web/html/xui/form/tls_settings.html560
14 files changed, 1089 insertions, 610 deletions
diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html
index 724f067b..63b949af 100644
--- a/web/html/xui/form/client.html
+++ b/web/html/xui/form/client.html
@@ -1,168 +1,223 @@
{{define "form/client"}}
<a-form layout="inline" v-if="client">
- <a-form-item label='{{ i18n "pages.inbounds.enable" }}'>
- <a-switch v-model="client.enable"></a-switch>
- </a-form-item>
- <br>
- <a-form-item>
- <span slot="label">
- <span>{{ i18n "pages.inbounds.email" }}</span>
- <a-tooltip>
- <template slot="title">
- <span>{{ i18n "pages.inbounds.emailDesc" }}</span>
+ <table width="100%" class="ant-table-tbody">
+ <tr>
+ <td>{{ i18n "pages.inbounds.enable" }}</td>
+ <td>
+ <a-form-item>
+ <a-switch v-model="client.enable"></a-switch>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span>{{ i18n "pages.inbounds.email" }}</span>
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.inbounds.emailDesc" }}</span>
+ </template>
+ <a-icon type="sync" @click="client.email = RandomUtil.randomLowerAndNum(9)"></a-icon>
+ </a-tooltip>
+ </td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="client.email" style="width: 250px"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr v-if="inbound.protocol === Protocols.TROJAN || inbound.protocol === Protocols.SHADOWSOCKS">
+ <td>password
+ <a-icon v-if="inbound.protocol === Protocols.SHADOWSOCKS" @click="client.password = RandomUtil.randomShadowsocksPassword()" type="sync"> </a-icon>
+ <a-icon v-if="inbound.protocol === Protocols.TROJAN" @click="client.password = RandomUtil.randomSeq(10)" type="sync"> </a-icon>
+ </td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="client.password" style="width: 250px"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr v-if="inbound.protocol === Protocols.VMESS || inbound.protocol === Protocols.VLESS">
+ <td>ID <a-icon @click="client.id = RandomUtil.randomUUID()" type="sync"></a-icon></td>
+ <td>
+ <a-input v-model.trim="client.id" style="width: 300px;"></a-input>
+ </td>
+ </tr>
+ <tr v-if="client.email && app.subSettings.enable">
+ <td>Subscription</td>
+ <td>
+ <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>
+ <a-form-item>
+ <a-input v-model.trim="client.subId" style="width: 150px;"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr v-if="client.email && app.tgBotEnable">
+ <td>Telegram ID</td>
+ <td>
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.inbounds.telegramDesc" }}</span>
+ </template>
+ <a-icon type="question-circle" theme="filled"></a-icon>
+ </a-tooltip>
+ <a-form-item>
+ <a-input v-model.trim="client.tgId"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <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>
+ </td>
+ <td>
+ <a-form-item>
+ <a-input-number v-model="client.limitIp" min="0"></a-input-number>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr v-if="client.email && client.limitIp > 0 && isEdit">
+ <td>
+ <span>{{ i18n "pages.inbounds.IPLimitlog" }}</span>
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.inbounds.IPLimitlogDesc" }}</span>
+ </template>
+ <a-icon type="question-circle" theme="filled"></a-icon>
+ </a-tooltip>
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.inbounds.IPLimitlogclear" }}</span>
+ </template>
+ <span style="color: #FF4D4F">
+ <a-icon type="delete" @click="clearDBClientIps(client.email)"></a-icon>
+ </span>
+ </a-tooltip>
+ </td>
+ <td>
+ <a-form layout="block">
+ <a-textarea id="clientIPs" readonly @click="getDBClientIps(client.email)"
+ placeholder="Click To Get IPs" :auto-size="{ minRows: 5, maxRows: 10 }">
+ </a-textarea>
+ </a-form>
+ </td>
+ </tr>
+ <tr v-if="inbound.xtls">
+ <td>Flow</td>
+ <td>
+ <a-form-item>
+ <a-select v-model="client.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 v-else-if="inbound.canEnableTlsFlow()">
+ <td>Flow</td>
+ <td>
+ <a-form-item>
+ <a-select v-model="client.flow" style="width: 200px"
+ :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>
+ <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="client._totalGB" :min="0"></a-input-number>
+ </a-form-item>
+ <template v-if="isEdit && clientStats">
+ <br>
+ <span> {{ i18n "usage" }}:</span>
+ <a-tag :color="clientUsageColor(clientStats, app.trafficDiff)">
+ [[ sizeFormat(clientStats.up) ]] /
+ [[ sizeFormat(clientStats.down) ]]
+ ([[ sizeFormat(clientStats.up + clientStats.down) ]])
+ </a-tag>
+ <a-tooltip>
+ <template slot="title">{{ i18n "pages.inbounds.resetTraffic" }}</template>
+ <a-icon type="retweet"
+ @click="resetClientTraffic(client.email,clientStats.inboundId,$event.target)"
+ v-if="client.email.length > 0"></a-icon>
+ </a-tooltip>
</template>
- </a-tooltip>
- </span>
- <a-icon @click="client.email = RandomUtil.randomLowerAndNum(8)" type="sync"> </a-icon>
- <a-input v-model.trim="client.email" style="width: 200px;"></a-input>
- </a-form-item>
- <a-form-item label="Password" v-if="inbound.protocol === Protocols.TROJAN || inbound.protocol === Protocols.SHADOWSOCKS">
- <a-icon v-if="inbound.protocol === Protocols.SHADOWSOCKS" @click="client.password = RandomUtil.randomShadowsocksPassword()" type="sync"> </a-icon>
- <a-icon v-if="inbound.protocol === Protocols.TROJAN" @click="client.password = RandomUtil.randomSeq(10)" type="sync"> </a-icon>
- <a-input v-model.trim="client.password" style="width: 300px;"></a-input>
- </a-form-item>
- <br>
- <a-form-item label="ID" v-if="inbound.protocol === Protocols.VMESS || inbound.protocol === Protocols.VLESS">
- <a-icon @click="client.id = RandomUtil.randomUUID()" type="sync"> </a-icon>
- <a-input v-model.trim="client.id" style="width: 300px;"></a-input>
- </a-form-item>
- <a-form-item v-if="client.email && app.subSettings.enable">
- <span slot="label">
- Subscription
- <a-tooltip>
- <template slot="title">
- <span>{{ i18n "pages.inbounds.subscriptionDesc" }}</span>
- </template>
- <a-icon type="question-circle" theme="filled"></a-icon>
- </a-tooltip>
- </span>
- <a-icon @click="client.subId = RandomUtil.randomLowerAndNum(16)" type="sync"> </a-icon>
- <a-input v-model.trim="client.subId" style="width: 150px;"></a-input>
- </a-form-item>
- <a-form-item v-if="client.email && 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="client.tgId"></a-input>
- </a-form-item>
- <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="client.limitIp" min="0"></a-input-number>
- </a-form-item>
- <a-form-item v-if="client.email && client.limitIp > 0 && isEdit">
- <span slot="label">
- <span>{{ i18n "pages.inbounds.IPLimitlog" }}</span>
- <a-tooltip>
- <template slot="title">
- <span>{{ i18n "pages.inbounds.IPLimitlogDesc" }}</span>
- </template>
- <a-icon type="question-circle" theme="filled"></a-icon>
- </a-tooltip>
- <a-tooltip>
- <template slot="title">
- <span>{{ i18n "pages.inbounds.IPLimitlogclear" }}</span>
- </template>
- <span style="color: #FF4D4F">
- <a-icon type="delete" @click="clearDBClientIps(client.email)"></a-icon>
- </span>
- </a-tooltip>
- </span>
- <a-form layout="block">
- <a-textarea id="clientIPs" readonly
- @click="getDBClientIps(client.email)"
- placeholder="Click To Get IPs"
- :auto-size="{ minRows: 5, maxRows: 10 }"
- >
- </a-textarea>
- </a-form>
- </a-form-item>
- <br>
- <a-form-item v-if="inbound.xtls" label="Flow">
- <a-select v-model="client.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>
- <a-form-item v-else-if="inbound.canEnableTlsFlow()" label="Flow">
- <a-select v-model="client.flow" style="width: 200px" :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>
- <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="client._totalGB" :min="0"></a-input-number>
- <template v-if="isEdit && clientStats">
- <br>
- <span> {{ i18n "usage" }}:</span>
- <a-tag :color="clientUsageColor(clientStats, app.trafficDiff)">
- [[ sizeFormat(clientStats.up) ]] /
- [[ sizeFormat(clientStats.down) ]]
- ([[ sizeFormat(clientStats.up + clientStats.down) ]])
- </a-tag>
- <a-tooltip>
- <template slot="title">{{ i18n "pages.inbounds.resetTraffic" }}</template>
- <a-icon type="retweet" @click="resetClientTraffic(client.email,clientStats.inboundId,$event.target)"
- v-if="client.email.length > 0"></a-icon>
- </a-tooltip>
- </template>
- </a-form-item>
- <br>
- <a-form-item label='{{ i18n "pages.client.delayedStart" }}'>
- <a-switch v-model="delayedStart" @click="client._expiryTime=0"></a-switch>
- </a-form-item>
- <br>
- <a-form-item label='{{ i18n "pages.client.expireDays" }}' v-if="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.currentTheme"
- v-model="client._expiryTime" style="width: 170px;"></a-date-picker>
- <a-tag color="red" v-if="isEdit && isExpiry">Expired</a-tag>
- </a-form-item>
- <a-form-item v-if="client.expiryTime != 0">
- <span slot="label">
- <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-number v-model.number="client.reset" :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="delayedStart" @click="client._expiryTime=0"></a-switch>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr v-if="delayedStart">
+ <td>{{ i18n "pages.client.expireDays" }}</td>
+ <td>
+ <a-form-item>
+ <a-input-number v-model="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="client._expiryTime"
+ style="width: 170px;"></a-date-picker>
+ <a-tag color="red" v-if="isEdit && isExpiry">Expired</a-tag>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr v-if="client.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>
+ </td>
+ <td>
+ <a-form-item>
+ <a-input-number v-model.number="client.reset" :min="0"></a-input-number>
+ </a-form-item>
+ </td>
+ </tr>
+ </table>
</a-form>
{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/inbound.html b/web/html/xui/form/inbound.html
index b46ce951..5514472b 100644
--- a/web/html/xui/form/inbound.html
+++ b/web/html/xui/form/inbound.html
@@ -1,63 +1,94 @@
{{define "form/inbound"}}
<!-- base -->
<a-form layout="inline">
- <a-form-item label='{{ i18n "enable" }}'>
- <a-switch v-model="dbInbound.enable"></a-switch>
- </a-form-item>
- <br>
- <a-form-item label='{{ i18n "remark" }}'>
- <a-input v-model.trim="dbInbound.remark"></a-input>
- </a-form-item>
- <a-form-item label='{{ i18n "protocol" }}'>
- <a-select v-model="inbound.protocol" style="width: 160px;" :disabled="isEdit" :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option v-for="p in Protocols" :key="p" :value="p">[[ p ]]</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item>
- <span slot="label">
- {{ i18n "monitor" }}
- <a-tooltip>
+ <table width="100%" class="ant-table-tbody">
+ <tr>
+ <td>{{ i18n "enable" }}</td>
+ <td>
+ <a-form-item>
+ <a-switch v-model="dbInbound.enable"></a-switch>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>{{ i18n "remark" }}</td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="dbInbound.remark" style="width: 250px;"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>{{ i18n "protocol" }}</td>
+ <td>
+ <a-form-item>
+ <a-select v-model="inbound.protocol" style="width: 250px;" :disabled="isEdit" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option v-for="p in Protocols" :key="p" :value="p">[[ p ]]</a-select-option>
+ </a-select>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>{{ i18n "monitor" }}
+ <a-tooltip>
<template slot="title">
<span>{{ i18n "pages.inbounds.monitorDesc" }}</span>
</template>
<a-icon type="question-circle" theme="filled"></a-icon>
- </a-tooltip>
- </span>
- <a-input v-model.trim="inbound.listen"></a-input>
- </a-form-item>
- <br>
- <a-form-item label='{{ i18n "pages.inbounds.port" }}'>
- <a-input-number v-model="inbound.port"></a-input-number>
- </a-form-item>
- <br>
- <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="dbInbound.totalGB" :min="0"></a-input-number>
- </a-form-item>
- <a-form-item>
- <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.currentTheme"
- v-model="dbInbound._expiryTime" style="width: 250px;"></a-date-picker>
- </a-form-item>
+ </a-tooltip>
+ </td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="inbound.listen" style="width: 250px;"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>{{ i18n "pages.inbounds.port" }}</td>
+ <td>
+ <a-form-item>
+ <a-input-number v-model.number="inbound.port"></a-input-number>
+ </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="dbInbound.totalGB" :min="0"></a-input-number>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <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="dbInbound._expiryTime" style="width: 250px;"></a-date-picker>
+ </a-form-item>
+ </td>
+ </tr>
+ </table>
</a-form>
+
<!-- vmess settings -->
<template v-if="inbound.protocol === Protocols.VMESS">
{{template "form/vmess"}}
diff --git a/web/html/xui/form/protocol/dokodemo.html b/web/html/xui/form/protocol/dokodemo.html
index 6a37f346..44d5af51 100644
--- a/web/html/xui/form/protocol/dokodemo.html
+++ b/web/html/xui/form/protocol/dokodemo.html
@@ -1,22 +1,42 @@
{{define "form/dokodemo"}}
<a-form layout="inline">
- <a-form-item label='{{ i18n "pages.inbounds.targetAddress"}}'>
- <a-input v-model.trim="inbound.settings.address"></a-input>
- </a-form-item>
- <a-form-item label='{{ i18n "pages.inbounds.destinationPort"}}'>
- <a-input-number v-model="inbound.settings.port"></a-input-number>
- </a-form-item>
- <br>
- <a-form-item label='{{ i18n "pages.inbounds.network"}}'>
- <a-select v-model="inbound.settings.network" style="width: 100px;" :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option value="tcp,udp">TCP+UDP</a-select-option>
- <a-select-option value="tcp">TCP</a-select-option>
- <a-select-option value="udp">UDP</a-select-option>
- </a-select>
- </a-form-item>
- <br>
- <a-form-item label="FollowRedirect">
- <a-switch v-model="inbound.settings.followRedirect"></a-switch>
- </a-form-item>
+ <table width="100%" class="ant-table-tbody">
+ <tr>
+ <td>{{ i18n "pages.inbounds.targetAddress"}}</td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="inbound.settings.address"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>{{ i18n "pages.inbounds.destinationPort"}}</td>
+ <td>
+ <a-form-item>
+ <a-input-number v-model.number="inbound.settings.port"></a-input-number>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>{{ i18n "pages.inbounds.network"}}</td>
+ <td>
+ <a-form-item>
+ <a-select v-model="inbound.settings.network" style="width: 100px;" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option value="tcp,udp">tcp+udp</a-select-option>
+ <a-select-option value="tcp">tcp</a-select-option>
+ <a-select-option value="udp">udp</a-select-option>
+ </a-select>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>FollowRedirect</td>
+ <td>
+ <a-form-item>
+ <a-switch v-model="inbound.settings.followRedirect"></a-switch>
+ </a-form-item>
+ </td>
+ </tr>
+ </table>
</a-form>
{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/protocol/http.html b/web/html/xui/form/protocol/http.html
index 2eb74582..a6a6602d 100644
--- a/web/html/xui/form/protocol/http.html
+++ b/web/html/xui/form/protocol/http.html
@@ -1,19 +1,21 @@
{{define "form/http"}}
<a-form layout="inline">
- <a-form-item>
- <a-row>
- <a-button type="primary" size="small" @click="inbound.settings.addAccount(new Inbound.SocksSettings.SocksAccount())">+</a-button>
- </a-row>
- <a-input-group v-for="(account, index) in inbound.settings.accounts">
- <a-input style="width: 45%" v-model.trim="account.user"
- addon-before='{{ i18n "username" }}'></a-input>
- <a-input style="width: 55%" v-model.trim="account.pass"
- addon-before='{{ i18n "password" }}'>
+ <table style="width: 100%; text-align: center; margin-bottom: 10px;">
+ <tr>
+ <td width="45%">{{ i18n "username" }}</td>
+ <td width="45%">{{ i18n "password" }}</td>
+ <td><a-button size="small" @click="inbound.settings.addAccount(new Inbound.HttpSettings.HttpAccount())">+</a-button></td>
+ </tr>
+ </table>
+ <a-input-group compact v-for="(account, index) in inbound.settings.accounts" style="margin-bottom: 10px;">
+ <a-input style="width: 50%" v-model.trim="account.user" placeholder='{{ i18n "username" }}'>
+ <template slot="addonBefore" style="margin: 0;">[[ index+1 ]]</template>
+ </a-input>
+ <a-input style="width: 50%" v-model.trim="account.pass" placeholder='{{ i18n "password" }}'>
<template slot="addonAfter">
- <a-button type="primary" size="small" @click="inbound.settings.delAccount(index)">-</a-button>
+ <a-button size="small" @click="inbound.settings.delAccount(index)">-</a-button>
</template>
</a-input>
</a-input-group>
- </a-form-item>
</a-form>
{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/protocol/shadowsocks.html b/web/html/xui/form/protocol/shadowsocks.html
index 001a7006..c504deb4 100644
--- a/web/html/xui/form/protocol/shadowsocks.html
+++ b/web/html/xui/form/protocol/shadowsocks.html
@@ -1,7 +1,7 @@
{{define "form/shadowsocks"}}
-<a-form layout="inline" style="padding: 10px 0px;">
+<a-form layout="inline">
<template v-if="inbound.isSSMultiUser">
- <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.shadowsockses.slice(0,1)" v-if="!isEdit">
+ <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.shadowsockses.slice(0,1)" v-if="!isEdit">
<a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
{{template "form/client"}}
</a-collapse-panel>
@@ -20,24 +20,40 @@
</table>
</a-collapse-panel>
</a-collapse>
-</template>
-</a-form>
-<a-form layout="inline">
- <a-form-item label='{{ i18n "encryption" }}'>
- <a-select v-model="inbound.settings.method" style="width: 250px;" :dropdown-class-name="themeSwitcher.currentTheme" @change="SSMethodChange">
- <a-select-option v-for="method in SSMethods" :value="method">[[ method ]]</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item v-if="inbound.isSS2022" label='{{ i18n "password" }}'>
- <a-icon @click="inbound.settings.password = RandomUtil.randomShadowsocksPassword()" type="sync"> </a-icon>
- <a-input v-model.trim="inbound.settings.password" style="width: 250px;"></a-input>
- </a-form-item>
- <a-form-item label='{{ i18n "pages.inbounds.network" }}'>
- <a-select v-model="inbound.settings.network" style="width: 100px;" :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option value="tcp,udp">TCP+UDP</a-select-option>
- <a-select-option value="tcp">TCP</a-select-option>
- <a-select-option value="udp">UDP</a-select-option>
- </a-select>
- </a-form-item>
+ </template>
+ <table width="100%" class="ant-table-tbody">
+ <tr>
+ <td>{{ i18n "encryption" }}</td>
+ <td>
+ <a-form-item>
+ <a-select v-model="inbound.settings.method" style="width: 250px;" @change="SSMethodChange" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option v-for="method in SSMethods" :value="method">[[ method ]]</a-select-option>
+ </a-select>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr v-if="inbound.isSS2022">

contacts: admin@thfree.ru

mirrors for living