diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-08-09 01:13:58 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-08-09 01:13:58 +0300 |
| commit | ed53df5ef30cc2e235382d815f77e8b1b05f07e8 (patch) | |
| tree | 50fa95c151bdf3450a9164a15df1713347c1d258 /web/html/xui | |
| parent | b541290ded14c3f054bfb9bdafd7802e42e570bf (diff) | |
multi user HTTP & Socks inbounds
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html/xui')
| -rw-r--r-- | web/html/xui/form/protocol/http.html | 19 | ||||
| -rw-r--r-- | web/html/xui/form/protocol/socks.html | 19 |
2 files changed, 28 insertions, 10 deletions
diff --git a/web/html/xui/form/protocol/http.html b/web/html/xui/form/protocol/http.html index b4ba59b7..2eb74582 100644 --- a/web/html/xui/form/protocol/http.html +++ b/web/html/xui/form/protocol/http.html @@ -1,10 +1,19 @@ {{define "form/http"}} <a-form layout="inline"> - <a-form-item label='{{ i18n "username"}}'> - <a-input v-model.trim="inbound.settings.accounts[0].user"></a-input> - </a-form-item> - <a-form-item label='{{ i18n "password" }}'> - <a-input v-model.trim="inbound.settings.accounts[0].pass"></a-input> + <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" }}'> + <template slot="addonAfter"> + <a-button type="primary" 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/socks.html b/web/html/xui/form/protocol/socks.html index e7989b74..db421f41 100644 --- a/web/html/xui/form/protocol/socks.html +++ b/web/html/xui/form/protocol/socks.html @@ -6,11 +6,20 @@ </a-form-item> <br> <template v-if="inbound.settings.auth === 'password'"> - <a-form-item label='{{ i18n "username" }}'> - <a-input v-model.trim="inbound.settings.accounts[0].user"></a-input> - </a-form-item> - <a-form-item label='{{ i18n "password" }}'> - <a-input v-model.trim="inbound.settings.accounts[0].pass"></a-input> + <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" }}'> + <template slot="addonAfter"> + <a-button type="primary" size="small" @click="inbound.settings.delAccount(index)">-</a-button> + </template> + </a-input> + </a-input-group> </a-form-item> </template> <br> |
