diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-03-11 15:44:24 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-03-11 18:10:11 +0300 |
| commit | 5b87b1253555b7e932f79bd86795e350f9f3de2e (patch) | |
| tree | 711ca9b226f2cf9d041db50f81c975913c76ea23 /web/html/xui/settings.html | |
| parent | 8908e8b16a3457c1353cec163a79cd82338be336 (diff) | |
[sub] JSON sub enhancement + minor changes
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html/xui/settings.html')
| -rw-r--r-- | web/html/xui/settings.html | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index 507a93c7..aac10f2a 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -295,11 +295,30 @@ <setting-list-item type="text" title='{{ i18n "pages.settings.subPath"}}' desc='{{ i18n "pages.settings.subPathDesc"}}' v-model="allSetting.subJsonPath"></setting-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.subURI"}}' desc='{{ i18n "pages.settings.subURIDesc"}}' v-model="allSetting.subJsonURI" placeholder="(http|https)://domain[:port]/path/"></setting-list-item> <setting-list-item type="switch" title='{{ i18n "pages.settings.fragment"}}' desc='{{ i18n "pages.settings.fragmentDesc"}}' v-model="fragment"></setting-list-item> - <template v-if="fragment"> - <setting-list-item type="text" title='length' v-model="fragmentLength" placeholder="100-200"></setting-list-item> - <setting-list-item type="text" title='Interval' v-model="fragmentInterval" placeholder="10-20"></setting-list-item> - </template> </a-list> + <a-collapse v-if="fragment"> + <a-collapse-panel header='{{ i18n "pages.settings.fragment"}}'> + <a-list-item style="padding: 20px"> + <a-row> + <a-col :lg="24" :xl="12"> + <a-list-item-meta title='Packets'/> + </a-col> + <a-col :lg="24" :xl="12"> + <a-select + v-model="fragmentPackets" + style="width: 100%" + :dropdown-class-name="themeSwitcher.currentTheme"> + <a-select-option :value="p" :label="p" v-for="p in ['1-1', '1-3', 'tlshello']"> + [[ p ]] + </a-select-option> + </a-select> + </a-col> + </a-row> + </a-list-item> + <setting-list-item type="text" title='Length' v-model="fragmentLength" placeholder="100-200"></setting-list-item> + <setting-list-item type="text" title='Interval' v-model="fragmentInterval" placeholder="10-20"></setting-list-item> + </a-collapse-panel> + </a-collapse> </a-tab-pane> </a-tabs> </a-space> @@ -483,6 +502,16 @@ this.allSetting.subJsonFragment = v ? JSON.stringify(this.defaultFragment) : ""; } }, + fragmentPackets: { + get: function() { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).settings.fragment.packets : ""; }, + set: function(v) { + if (v != ""){ + newFragment = JSON.parse(this.allSetting.subJsonFragment); + newFragment.settings.fragment.packets = v; + this.allSetting.subJsonFragment = JSON.stringify(newFragment); + } + } + }, fragmentLength: { get: function() { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).settings.fragment.length : ""; }, set: function(v) { |
