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-13 18:57:36 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-12-13 19:03:11 +0300
commit8d18c8e98f1b6531d1997feb6933419d71401968 (patch)
tree1283d10c68f3a9b9b2cbeeec95fb34a84e9689e3 /web/html/xui/form/protocol
parent82e2241bdd9552f57d24c8de4fce6c5320efba4c (diff)
[gui] redesign forms
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html/xui/form/protocol')
-rw-r--r--web/html/xui/form/protocol/dokodemo.html56
-rw-r--r--web/html/xui/form/protocol/http.html2
-rw-r--r--web/html/xui/form/protocol/shadowsocks.html74
-rw-r--r--web/html/xui/form/protocol/socks.html79
-rw-r--r--web/html/xui/form/protocol/trojan.html106
-rw-r--r--web/html/xui/form/protocol/vless.html112
-rw-r--r--web/html/xui/form/protocol/vmess.html40
7 files changed, 184 insertions, 285 deletions
diff --git a/web/html/xui/form/protocol/dokodemo.html b/web/html/xui/form/protocol/dokodemo.html
index 44d5af51..14891652 100644
--- a/web/html/xui/form/protocol/dokodemo.html
+++ b/web/html/xui/form/protocol/dokodemo.html
@@ -1,42 +1,20 @@
{{define "form/dokodemo"}}
-<a-form layout="inline">
- <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 :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:14} }">
+ <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.number="inbound.settings.port"></a-input-number>
+ </a-form-item>
+ <a-form-item label='{{ i18n "pages.inbounds.network"}}'>
+ <a-select v-model="inbound.settings.network" :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>
+ <a-form-item label='FollowRedirect'>
+ <a-switch v-model="inbound.settings.followRedirect"></a-switch>
+ </a-form-item>
</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 a6a6602d..ff266de5 100644
--- a/web/html/xui/form/protocol/http.html
+++ b/web/html/xui/form/protocol/http.html
@@ -1,5 +1,5 @@
{{define "form/http"}}
-<a-form layout="inline">
+<a-form>
<table style="width: 100%; text-align: center; margin-bottom: 10px;">
<tr>
<td width="45%">{{ i18n "username" }}</td>
diff --git a/web/html/xui/form/protocol/shadowsocks.html b/web/html/xui/form/protocol/shadowsocks.html
index c504deb4..16e353e5 100644
--- a/web/html/xui/form/protocol/shadowsocks.html
+++ b/web/html/xui/form/protocol/shadowsocks.html
@@ -1,6 +1,5 @@
{{define "form/shadowsocks"}}
-<a-form layout="inline">
- <template v-if="inbound.isSSMultiUser">
+<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-panel header='{{ i18n "pages.inbounds.client" }}'>
{{template "form/client"}}
@@ -20,40 +19,39 @@
</table>
</a-collapse-panel>
</a-collapse>
- </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">
- <td>{{ i18n "password" }}
- <a-icon @click="inbound.settings.password = RandomUtil.randomShadowsocksPassword()" type="sync"> </a-icon>
- </td>
- <td>
- <a-form-item>
- <a-input v-model.trim="inbound.settings.password" style="width: 250px"></a-input>
- </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>
- </table>
-</a-form>
+</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">
+ <td>{{ i18n "password" }}
+ <a-icon @click="inbound.settings.password = RandomUtil.randomShadowsocksPassword()" type="sync"> </a-icon>
+ </td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="inbound.settings.password" style="width: 250px"></a-input>
+ </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>
+</table>
{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/protocol/socks.html b/web/html/xui/form/protocol/socks.html
index 7d1985a9..fafef46f 100644
--- a/web/html/xui/form/protocol/socks.html
+++ b/web/html/xui/form/protocol/socks.html
@@ -1,52 +1,33 @@
{{define "form/socks"}}
-<a-form layout="inline">
- <table width="100%" class="ant-table-tbody">
- <tr>
- <td style="width: 30%;">{{ i18n "password" }}</td>
- <td>
- <a-form-item>
- <a-switch :checked="inbound.settings.auth === 'password'"
- @change="checked => inbound.settings.auth = checked ? 'password' : 'noauth'"></a-switch>
- </a-form-item>
- </td>
- </tr>
- <tr v-if="inbound.settings.auth === 'password'">
- <td colspan="2">
- <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.SocksSettings.SocksAccount())">+</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 size="small" @click="inbound.settings.delAccount(index)">-</a-button>
- </template>
- </a-input>
- </a-input-group>
- </td>
- </tr>
- <tr>
- <td>{{ i18n "pages.inbounds.enable" }} udp</td>
- <td>
- <a-form-item>
- <a-switch v-model="inbound.settings.udp"></a-switch>
- </a-form-item>
- </td>
- </tr>
- <tr v-if="inbound.settings.udp">
- <td>IP</td>
- <td>
- <a-form-item>
- <a-input v-model.trim="inbound.settings.ip"></a-input>
- </a-form-item>
- </td>
- </tr>
- </table>
+<a-form :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:14} }">
+ <a-form-item label='{{ i18n "pages.inbounds.enable" }} udp'>
+ <a-switch v-model="inbound.settings.udp"></a-switch>
+ </a-form-item>
+ <a-form-item label="IP" v-if="inbound.settings.udp">
+ <a-input v-model.trim="inbound.settings.ip"></a-input>
+ </a-form-item>
+ <a-form-item label='{{ i18n "password" }}'>
+ <a-switch :checked="inbound.settings.auth === 'password'"
+ @change="checked => inbound.settings.auth = checked ? 'password' : 'noauth'"></a-switch>
+ </a-form-item>
+ <template v-if="inbound.settings.auth === '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.SocksSettings.SocksAccount())">+</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 size="small" @click="inbound.settings.delAccount(index)">-</a-button>
+ </template>
+ </a-input>
+ </a-input-group>
+ </template>
</a-form>
{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html
index a9e2cb24..77a4c27d 100644
--- a/web/html/xui/form/protocol/trojan.html
+++ b/web/html/xui/form/protocol/trojan.html
@@ -1,30 +1,29 @@
{{define "form/trojan"}}
-<a-form layout="inline" style="padding: 10px 0px;">
- <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.trojans.slice(0,1)" v-if="!isEdit">
- <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
- {{template "form/client"}}
- </a-collapse-panel>
- </a-collapse>
- <a-collapse v-else>
- <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.trojans.length">
- <table width="100%">
- <tr class="client-table-header">
- <th>{{ i18n "pages.inbounds.email" }}</th>
- <th>Password</th>
- </tr>
- <tr v-for="(client, index) in inbound.settings.trojans" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
- <td>[[ client.email ]]</td>
- <td>[[ client.password ]]</td>
- </tr>
- </table>
- </a-collapse-panel>
- </a-collapse>
-</a-form>
-<template v-if="inbound.isTcp">
+<a-collapse activeKey="0" v-for="(client, index) in inbound.settings.trojans.slice(0,1)" v-if="!isEdit">
+ <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
+ {{template "form/client"}}
+ </a-collapse-panel>
+</a-collapse>
+<a-collapse v-else>
+ <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.trojans.length">
+ <table width="100%">
+ <tr class="client-table-header">
+ <th>{{ i18n "pages.inbounds.email" }}</th>
+ <th>Password</th>
+ </tr>
+ <tr v-for="(client, index) in inbound.settings.trojans" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
+ <td>[[ client.email ]]</td>
+ <td>[[ client.password ]]</td>
+ </tr>
+ </table>
+ </a-collapse-panel>
+</a-collapse>
+<template v-if="inbound.isTcp && !inbound.stream.isReality">
<a-form layout="inline">
<a-form-item label="Fallbacks">
<a-row>
- <a-button type="primary" size="small" @click="inbound.settings.addFallback()">
+ <a-button type="primary" size="small"
+ @click="inbound.settings.addFallback()">
+
</a-button>
</a-row>
@@ -32,54 +31,27 @@
</a-form>
<!-- trojan fallbacks -->
- <a-form v-for="(fallback, index) in inbound.settings.fallbacks" layout="inline">
+ <a-form v-for="(fallback, index) in inbound.settings.fallbacks" :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:14} }">
<a-divider style="margin:0;">
- fallback[[ index + 1 ]]
+ Fallback[[ index + 1 ]]
<a-icon type="delete" @click="() => inbound.settings.delFallback(index)"
style="color: rgb(255, 77, 79);cursor: pointer;"/>
</a-divider>
- <table width="100%">
- <tr>
- <td style="width: 20%;">Name</td>
- <td>
- <a-form-item>
- <a-input v-model="fallback.name" style="width: 250px"></a-input>
- </a-form-item>
- </td>
- </tr>
- <tr>
- <td>Alpn</td>
- <td>
- <a-form-item>
- <a-input v-model="fallback.alpn" style="width: 250px"></a-input>
- </a-form-item>
- </td>
- </tr>
- <tr>
- <td>Path</td>
- <td>
- <a-form-item>
- <a-input v-model="fallback.path" style="width: 250px"></a-input>
- </a-form-item>
- </td>
- </tr>
- <tr>
- <td>Dest</td>
- <td>
- <a-form-item>
- <a-input v-model="fallback.dest" style="width: 250px"></a-input>
- </a-form-item>
- </td>
- </tr>
- <tr>
- <td>xVer</td>
- <td>
- <a-form-item>
- <a-input-number v-model="fallback.xver" :min="0" :max="2"></a-input-number>
- </a-form-item>
- </td>
- </tr>
- </table>
+ <a-form-item label='Name'>
+ <a-input v-model="fallback.name"></a-input>
+ </a-form-item>
+ <a-form-item label='Alpn'>
+ <a-input v-model="fallback.alpn"></a-input>
+ </a-form-item>
+ <a-form-item label='Path'>
+ <a-input v-model="fallback.path"></a-input>
+ </a-form-item>
+ <a-form-item label='Dest'>
+ <a-input v-model="fallback.dest"></a-input>
+ </a-form-item>
+ <a-form-item label='xVer'>
+ <a-input-number v-model="fallback.xver" :min="0" :max="2"></a-input-number>
+ </a-form-item>
</a-form>
<a-divider style="margin:0;"></a-divider>
</template>
diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html
index c3037935..eb442612 100644
--- a/web/html/xui/form/protocol/vless.html
+++ b/web/html/xui/form/protocol/vless.html
@@ -1,87 +1,59 @@
{{define "form/vless"}}
-<a-form layout="inline" style="padding: 10px 0px;">
- <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.vlesses.slice(0,1)" v-if="!isEdit">
- <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
- {{template "form/client"}}
- </a-collapse-panel>
- </a-collapse>
- <a-collapse v-else>
- <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.vlesses.length">
- <table width="100%">
- <tr class="client-table-header">
- <th>{{ i18n "pages.inbounds.email" }}</th>
- <th>Flow</th>
- <th>ID</th>
- </tr>
- <tr v-for="(client, index) in inbound.settings.vlesses" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
- <td>[[ client.email ]]</td>
- <td>[[ client.flow ]]</td>
- <td>[[ client.id ]]</td>
- </tr>
- </table>
- </a-collapse-panel>
- </a-collapse>
-</a-form>
-<template v-if="inbound.isTcp">
+<a-collapse activeKey="0" v-for="(client, index) in inbound.settings.vlesses.slice(0,1)" v-if="!isEdit">
+ <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
+ {{template "form/client"}}
+ </a-collapse-panel>
+</a-collapse>
+<a-collapse v-else>
+ <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.vlesses.length">
+ <table width="100%">
+ <tr class="client-table-header">
+ <th>{{ i18n "pages.inbounds.email" }}</th>
+ <th>Flow</th>
+ <th>ID</th>
+ </tr>
+ <tr v-for="(client, index) in inbound.settings.vlesses" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
+ <td>[[ client.email ]]</td>
+ <td>[[ client.flow ]]</td>
+ <td>[[ client.id ]]</td>
+ </tr>
+ </table>
+ </a-collapse-panel>
+</a-collapse>
+<template v-if="inbound.isTcp && !inbound.stream.isReality">
<a-form layout="inline">
<a-form-item label="Fallbacks">
<a-row>
- <a-button type="primary" size="small" @click="inbound.settings.addFallback()">
+ <a-button type="primary" size="small"
+ @click="inbound.settings.addFallback()">
+
</a-button>
</a-row>
</a-form-item>
</a-form>
-
+
<!-- vless fallbacks -->
- <a-form v-for="(fallback, index) in inbound.settings.fallbacks" layout="inline">
+ <a-form v-for="(fallback, index) in inbound.settings.fallbacks" :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:14} }">
<a-divider style="margin:0;">
- fallback[[ index + 1 ]]
+ Fallback[[ index + 1 ]]
<a-icon type="delete" @click="() => inbound.settings.delFallback(index)"
style="color: rgb(255, 77, 79);cursor: pointer;"/>
</a-divider>
- <table width="100%">
- <tr>
- <td style="width: 20%;">Name</td>
- <td>
- <a-form-item>
- <a-input v-model="fallback.name" style="width: 250px"></a-input>
- </a-form-item>
- </td>
- </tr>
- <tr>
- <td>Alpn</td>
- <td>
- <a-form-item>
- <a-input v-model="fallback.alpn" style="width: 250px"></a-input>
- </a-form-item>
- </td>
- </tr>
- <tr>
- <td>Path</td>
- <td>
- <a-form-item>
- <a-input v-model="fallback.path" style="width: 250px"></a-input>
- </a-form-item>
- </td>
- </tr>
- <tr>
- <td>Dest</td>
- <td>
- <a-form-item>
- <a-input v-model="fallback.dest" style="width: 250px"></a-input>
- </a-form-item>
- </td>
- </tr>
- <tr>
- <td>xVer</td>
- <td>
- <a-form-item>
- <a-input-number v-model="fallback.xver" :min="0" :max="2"></a-input-number>
- </a-form-item>
- </td>
- </tr>
- </table>
+ <a-form-item label='Name'>
+ <a-input v-model="fallback.name"></a-input>
+ </a-form-item>
+ <a-form-item label='Alpn'>
+ <a-input v-model="fallback.alpn"></a-input>
+ </a-form-item>
+ <a-form-item label='Path'>
+ <a-input v-model="fallback.path"></a-input>
+ </a-form-item>
+ <a-form-item label='Dest'>
+ <a-input v-model="fallback.dest"></a-input>
+ </a-form-item>
+ <a-form-item label='xVer'>
+ <a-input-number v-model="fallback.xver" :min="0" :max="2"></a-input-number>
+ </a-form-item>
</a-form>
<a-divider style="margin:0;"></a-divider>
</template>
diff --git a/web/html/xui/form/protocol/vmess.html b/web/html/xui/form/protocol/vmess.html
index 6d89c1b5..4e9fe749 100644
--- a/web/html/xui/form/protocol/vmess.html
+++ b/web/html/xui/form/protocol/vmess.html
@@ -1,23 +1,21 @@
{{define "form/vmess"}}
-<a-form layout="inline" style="padding: 10px 0px;">
- <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.vmesses.slice(0,1)" v-if="!isEdit">
- <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
- {{template "form/client"}}
- </a-collapse-panel>
- </a-collapse>
- <a-collapse v-else>
- <a-collapse-panel :header="'{{ i18n "pages.client.clientCount" }}: ' + inbound.settings.vmesses.length">
- <table width="100%">
- <tr class="client-table-header">
- <th>{{ i18n "pages.inbounds.email" }}</th>
- <th>ID</th>
- </tr>
- <tr v-for="(client, index) in inbound.settings.vmesses" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
- <td>[[ client.email ]]</td>
- <td>[[ client.id ]]</td>
- </tr>
- </table>
- </a-collapse-panel>
- </a-collapse>
-</a-form>
+<a-collapse activeKey="0" v-for="(client, index) in inbound.settings.vmesses.slice(0,1)" v-if="!isEdit">
+ <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
+ {{template "form/client"}}
+ </a-collapse-panel>
+</a-collapse>
+<a-collapse v-else>
+ <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.vmesses.length">
+ <table width="100%">
+ <tr class="client-table-header">
+ <th>{{ i18n "pages.inbounds.email" }}</th>
+ <th>ID</th>
+ </tr>
+ <tr v-for="(client, index) in inbound.settings.vmesses" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
+ <td>[[ client.email ]]</td>
+ <td>[[ client.id ]]</td>
+ </tr>
+ </table>
+ </a-collapse-panel>
+</a-collapse>
{{end}}